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 support@ccsinfo.com

Change of pin function if ICD disabled

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



Joined: 22 Jan 2005
Posts: 12
Location: Rio de Janeiro, Brazil

View user's profile Send private message MSN Messenger

Change of pin function if ICD disabled
PostPosted: Thu Feb 24, 2005 12:12 pm     Reply with quote

Hi.

I have a strange little problem.

I have the folloving code in my timer interrupt routine.
IF(milsec++ == 100){decisec++; milsec=0;output_toggle(PIN_B5);}
This works fine when the statement

#device ICD=TRUE
Is used.
I want to remove the ICD=TRUE statement to make the chip read protected, but then the LED stops flashing.

Anybody knows why ?
Device = 18F252
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Feb 24, 2005 12:39 pm     Reply with quote

Pin B5 is the PGM pin on the 18F252. I suspect that you forgot to
put NOLVP at the end of your #fuses statement. Without that setting,
the PIC will be left in Low Voltage Programming mode, and will then
lock up if pin B5 goes high.
John_Rio



Joined: 22 Jan 2005
Posts: 12
Location: Rio de Janeiro, Brazil

View user's profile Send private message MSN Messenger

Thanks.
PostPosted: Thu Feb 24, 2005 12:58 pm     Reply with quote

That did it.

I was not aware of that.
Once again thanks.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Feb 24, 2005 1:12 pm     Reply with quote

This one problem with LVP vs. NOLVP has probably cost the entire
PIC engineering/student community 100,000 hours. (Let's say every
student or engineer spends 1 hour puzzling over this problem once
in their career.) So for probably one customer who insisted on this
feature, Microchip has cost the entire community tons of time.
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