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

Pullups

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



Joined: 12 Nov 2007
Posts: 37

View user's profile Send private message

Pullups
PostPosted: Sun Sep 14, 2008 11:01 pm     Reply with quote

I write code 16f628a and 16f819 chip.
I need pullup-resistor port B.
Which is best style:
port_b_pullups(TRUE); or
port_b_pullups(0b11111111);

Sorry my bad english.
elm383



Joined: 13 Jul 2007
Posts: 7

View user's profile Send private message

PostPosted: Sun Sep 14, 2008 11:20 pm     Reply with quote

Depends on the PIC model you are using. Try looking in the CCS HELP (press F1 and search for PORT_x_PULLUPS ( ) ). If I'm not mistaken, for your case, you can't enable individual bits and only one control bit is used to either to turn all on or off. Meaning you'll have to go with just TRUE. TRUE is defined for boolean 1. If you put 0x11111111, this is equivalent to 255 in decimal.

(At least this is from what I personally understand.)
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