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

Curious about IO Port Status During PIC is Powered Up

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



Joined: 12 Feb 2009
Posts: 54

View user's profile Send private message

Curious about IO Port Status During PIC is Powered Up
PostPosted: Sun Jul 24, 2011 9:02 pm     Reply with quote

Hi

I'm just want to know what is the condition for every i/o pins that PIC has during power up before the program inside it is started to execute?. Is it all pins are in High Impedance?The PIC datasheet describes the pins condition only during MCLR Low and Watchdog Timer Reset but during power up, i unable to find it.

Looking forward the answer and thanks in advance.
Ttelmah



Joined: 11 Mar 2010
Posts: 19506

View user's profile Send private message

PostPosted: Mon Jul 25, 2011 2:08 am     Reply with quote

Look at the TRIS register in the data sheet.
Note that the bits in this _default_ on power on, to '1`.
A '1' on a TRIS bit says 'set pin as input'.

So pins on the PIC all wake up as inputs (some exceptions, on later chips where some may wake as analog inputs, and a few may wake 'driven' - on things like the power PWM, there is fuse selecting whether the pins are driven on wake up, or left unconnected to the peripheral).

Best Wishes
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Mon Jul 25, 2011 6:48 am     Reply with quote

It depends on what you mean by "power up". If there is time between the application of VCC and the assertion of MCLR, the IO pins are usually undefined during that period. That is why good circuit design makes that time short or non-existant. Sometimes you have to rely on brown-out circuitry or a Power Up Timer to handle this. Once MCLR is asserted the IO pin status is clearly defined in the datasheet. Every PIC I have used defaults its pins to input, but as Ttelmah suggests, check your PIC for exceptions. After MCLR is released the program controls the IO pins.
_________________
The search for better is endless. Instead simply find very good and get the job done.
khalis



Joined: 12 Feb 2009
Posts: 54

View user's profile Send private message

PostPosted: Wed Jul 27, 2011 1:33 am     Reply with quote

Thanks again for the explanation. I already looked into it and it was useful for me and my team. Very Happy
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