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

Startup code?

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







Startup code?
PostPosted: Wed Sep 15, 2004 5:26 am     Reply with quote

I have my first protoype PIC board, and it works!!! (after faff with the xtal and psu and having to go out and buy a 'scope!)

Now, I'm using the ICD2 thing so have an RJ45 socket on board.

If I use the ICD to program the device, is there a CCS compiler command to get it to start on the reset timer? Cos it works fine on debug using the ICD but doesn't do anything on normal power up with the wire not in the RJ45.

Also, should I put an RC on the reset line? I thort the whole point of the start timer was to not need any pullups or anything?

Its a 16LF877A running at 3.3V, 9.804MHz

TIA

Adam.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Wed Sep 15, 2004 5:51 am     Reply with quote

You have to configure it not to be in debug mode. Usually you would comment out this line
Code:

ICD=TRUE;
Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Wed Sep 15, 2004 5:12 pm     Reply with quote

And make sure you don't have the fuse DEBUG in you #fuses statement. If you do, change it to NODEBUG.
Guest








PostPosted: Thu Sep 16, 2004 2:25 am     Reply with quote

Weeelll.. I tried that. Still no joy. Is there a list of the meaning of all the fuses somewhere? The header file is a bit vague; I mean, it lists them, but doesn't say exactly what they do.... Sure, I can guess, but maybe thats why its not working?

Also, do I have to pull up the reset line or can I leave it floating? Yes, yes, I know, RTFM....

<pause>

OK, I've R'd the F-ing M.... Seems I need an RC network on my MCLR pin. Ah well. That would explain why it doesn't fire up without the ICD cable plugged in....
Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Thu Sep 16, 2004 3:42 am     Reply with quote

You shouldn't need a RC network on the MCLR pin. Pulling it up with a resistor should be enough.
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