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

port pin behavior on reset question

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



Joined: 29 Jan 2005
Posts: 10

View user's profile Send private message

port pin behavior on reset question
PostPosted: Wed Jul 27, 2005 6:11 pm     Reply with quote

I'm using the 18LF8720 and the ICD 2 as a debugger with MPLAB ver 7.10. Compiler is PCWH ver 3.206.
Port F pins F1 and F4 are set up as outputs (SET_TRIS_F( 0x2c ). The program sets them both high and this is confirmed by stoping operation and viewing PORTF SFR bits 1 and 4 in a watch window. A Process Reset (hot key F6) is issued in MPLAB. Bit 1 is set to 0 but not bit 4 as viewed in the watch window. Operation is continued by pressing hot key F9. After stopping operation port F is viewed again. Bit 1 and bit 4 are now both high.

I understand they should both be high when operation resumed because nothing sent them low. Why does bit 1 go low with a reset? Why does bit 4 not go low with the reset? Both outputs are pulled down with a 10K resistor.
thanks
Ttelmah
Guest







PostPosted: Thu Jul 28, 2005 2:13 am     Reply with quote

Look at the data sheet. By default, the TRIS register is setup to make all pins inputs on a reset. This will be the setting, till you reach your TRIS instruction. Though you say both have pull-down resistors (which should then make them both go to '0'), are these enough to actually pull-down the pins with the circuitry attached?.

Best Wishes
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