CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Fail to program config, lvp

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Calamar



Joined: 07 Sep 2003
Posts: 60
Location: Buenos Aires (Argentina)

View user's profile Send private message Send e-mail MSN Messenger

Fail to program config, lvp
PostPosted: Sat Mar 22, 2003 10:54 am     Reply with quote

Dears sirs:

I'm having some trougles to program th 16f873 using
the programmer(Hardawre) showed in the page:

<a href="http://www.finitesite.com/d3jsys/" TARGET="_blank">http://www.finitesite.com/d3jsys/</a>

The same page recomend FPP (Flash Pic Programmer, software),
well, please look at the folowing C code, check out the fuses




#include <16F873.h>
#fuses XT, NOPROTECT, NOPUT, NOWDT, BROWNOUT, NOLVP, NOCPD, NOWRT
#byte PORTB=6
#byte PORTA=5
#byte PORTC=7
#use standard_io ( a )
#use standard_io ( b )
#use standard_io ( c )

main() {
setup_adc(ADC_OFF);
set_tris_a(0);
set_tris_b(0);
set_tris_c(0);
while(1)
{


PORTA=0;

PORTB=0;

PORTC=255;
}


}



when I try to programmer the pic using FPP, it write the program code
correctly but doen't write the fuse (Fail to program config)

changing NOLVP to LVP in the fuses the confing reach write correctly,
but the pics doesn't work correctly, i have read that it is because
I must set NOLVP, but the fpp doesn't let me do it.
___________________________
This message was ported from CCS's old forum
Original Post ID: 12956
_________________
Best Regards
Daniel H. Sagarra
La Plata (Argentina)
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

Re: Fail to program config, lvp
PostPosted: Sat Mar 22, 2003 12:13 pm     Reply with quote

:=Dears sirs:
:=
:=I'm having some trougles to program th 16f873 using
:=the programmer(Hardawre) showed in the page:
:=
:= <a href="http://www.finitesite.com/d3jsys/" TARGET="_blank"> <a href="http://www.finitesite.com/d3jsys/" TARGET="_blank">http://www.finitesite.com/d3jsys/</a></a>
:=
:=The same page recomend FPP (Flash Pic Programmer, software),
:=well, please look at the folowing C code, check out the fuses
:=
:=
:=
:=
:=#include <16F873.h>
:=#fuses XT, NOPROTECT, NOPUT, NOWDT, BROWNOUT, NOLVP, NOCPD, NOWRT
:=#byte PORTB=6
:=#byte PORTA=5
:=#byte PORTC=7
:=#use standard_io ( a )
:=#use standard_io ( b )
:=#use standard_io ( c )
:=
:=main() {
:= setup_adc(ADC_OFF);
:= set_tris_a(0);
:= set_tris_b(0);
:= set_tris_c(0);
:=while(1)
:= {
:=
:=
:= PORTA=0;
:=
:= PORTB=0;
:=
:= PORTC=255;
:= }
:=
:=
:=}
:=
:=
:=
:=when I try to programmer the pic using FPP, it write the program code
:=correctly but doen't write the fuse (Fail to program config)
:=
:=changing NOLVP to LVP in the fuses the confing reach write correctly,
:=but the pics doesn't work correctly, i have read that it is because
:=I must set NOLVP, but the fpp doesn't let me do it.
:=
--------------------------------------------------------

That programmer uses Low Voltage Programming. You should
set the #fuse to LVP, to get rid of your error message.

The reason you get an error message is because the LVP
fuse cannot be changed when using a LVP programmer. The
"TLVP" programmer, which you are using, is a LVP programmer.
So, that error message is correct. But that's good. You
want to use LVP mode with that programmer.

This is explained in section 12.18 of the 16F87x data sheet.
Also, that section has some warnings about not using pin B3,
when you have LVP mode enabled. You should read that section
carefully and follow the warnings. If you don't, your program
will "lock-up" and not work.
-----

When you see on this board some warnings to use "NOLVP",
that's for normal programmers. It's a warning for people
who use the PicStart-Plus and the Warp-13a, etc. Most
people use that type of programmer. But that warning does
not apply to you since you're using the TLVP programmer.
___________________________
This message was ported from CCS's old forum
Original Post ID: 12958
Calamar



Joined: 07 Sep 2003
Posts: 60
Location: Buenos Aires (Argentina)

View user's profile Send private message Send e-mail MSN Messenger

Re: Fail to program config, lvp
PostPosted: Sat Mar 22, 2003 5:11 pm     Reply with quote

I have been reading the 1.18 section and I have some questions

can I disable LPV once the program is running ??
if I can after that I colud program the pic again ??
if I can't, where should the RB3 be conected when the
program is running.. y think so I am having noise problems
because the program stop when y write in RB2...
___________________________
This message was ported from CCS's old forum
Original Post ID: 12964
_________________
Best Regards
Daniel H. Sagarra
La Plata (Argentina)
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

Re: Fail to program config, lvp
PostPosted: Sat Mar 22, 2003 10:40 pm     Reply with quote

:=I have been reading the 1.18 section and I have some questions
:=
:=can I disable LPV once the program is running ??

No, you can't. It's a configuration bit, and it can only
be changed during programming. The LVP fuse can only be
changed by a "High Voltage" programmer, such as a PicStart-Plus
or Warp-13a.

:=if I can after that I could program the pic again ??
:=if I can't, where should the RB3 be conected when the
:=program is running.. I think so I am having noise problems
:=because the program stop when y write in RB2...

RB3 should have a pull-down resistor on it. Try using a 10K
resistor, connected to Ground. This will keep it at a low
level, and prevent noise on Pin B3 from locking up the PIC.

The data sheet recommends, that if you enable Port B pull-ups,
you should set pin B3 as an output. In other words, do this:

output_low(PIN_B3); // Set pin B3 low before enabling pullups
port_b_pullups(TRUE);

You only have to set Pin B3 low, if you enable Port B pull-ups.
Many PIC projects do not need to use Port B pull-ups.
___________________________
This message was ported from CCS's old forum
Original Post ID: 12966
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group