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

Initializing a port on download?

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







Initializing a port on download?
PostPosted: Wed Mar 12, 2003 7:00 pm     Reply with quote

I've got a new 18F452 based board that has a CPLD who's chip select is port C pin 5, active low. Unfortunatly, right after download that pin is low, so my CPLD is selected. Even more unfortunate, the CPLD uses the ICD-S lines. The upshot is I can't run this thing with ICD attached.

Is there a way, like a #rom or something, to have port C pin 5 start out hi? I understand that I won't be able to use the ICD whilst talking to my CPLD, I can live with that. But I'd sure like to use it when I'm not using the CPLD.
___________________________
This message was ported from CCS's old forum
Original Post ID: 12592
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

Re: Initializing a port on download?
PostPosted: Wed Mar 12, 2003 7:39 pm     Reply with quote

:=I've got a new 18F452 based board that has a CPLD who's chip select is port C pin 5, active low. Unfortunatly, right after download that pin is low, so my CPLD is selected. Even more unfortunate, the CPLD uses the ICD-S lines. The upshot is I can't run this thing with ICD attached.
:=
:=Is there a way, like a #rom or something, to have port C pin 5 start out hi? I understand that I won't be able to use the ICD whilst talking to my CPLD, I can live with that. But I'd sure like to use it when I'm not using the CPLD.
----------------------------------------------------

Do you know why Pin C5 is starting out low ?
The default state for that pin, upon power-up, is to be
an input. So unless you're running code that deliberately
sets it as a low-true output, it should stay as an input.
Then, you should be able to put a pull-up resistor on it,
to keep it high. Maybe 10K ?
___________________________
This message was ported from CCS's old forum
Original Post ID: 12594
jharkins
Guest







Re: Initializing a port on download?
PostPosted: Thu Mar 13, 2003 11:15 am     Reply with quote

Hmmm, I don't know why it starts out low. One of the first things I do is setup the CPLD. It could be my assumption was wrong, maybe me driving those 2 lines (D6 and 7) confuses the ICD and it just hangs in the midst of CPLD programming. I don't think so though, it hangs right after download with a message along the lines of "Can't halt target, check the oscillator and MCLR". It's times like this I wish I had a logic analyzer, not just a scope.

Never thought I'd have to worry about how many insertions I could get out of an RJ45 before it gave out Smile
___________________________
This message was ported from CCS's old forum
Original Post ID: 12628
Shane Rowell
Guest







Re: Initializing a port on download?
PostPosted: Thu Mar 13, 2003 12:38 pm     Reply with quote

I have to agree with PCMProgrammer. Add the pull-up.

:=I've got a new 18F452 based board that has a CPLD who's chip select is port C pin 5, active low. Unfortunatly, right after download that pin is low, so my CPLD is selected. Even more unfortunate, the CPLD uses the ICD-S lines. The upshot is I can't run this thing with ICD attached.
:=
:=Is there a way, like a #rom or something, to have port C pin 5 start out hi? I understand that I won't be able to use the ICD whilst talking to my CPLD, I can live with that. But I'd sure like to use it when I'm not using the CPLD.
___________________________
This message was ported from CCS's old forum
Original Post ID: 12631
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