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

how to set internal resistor

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



Joined: 10 Sep 2003
Posts: 60

View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger ICQ Number

how to set internal resistor
PostPosted: Tue Feb 15, 2005 11:21 am     Reply with quote

I use this module to pull up the port b when all bits are input:

#ifdef __PCM__
port_b_pullups(true);
#endif

1. what's about pulldown command?

2. If I only want set particular bit pullups, any command to solve it?
e.g. I want pull up PB0, what should I do?

Thanks!

Regards: Einly,
_________________
Einly
rwyoung



Joined: 12 Nov 2003
Posts: 563
Location: Lawrence, KS USA

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

PostPosted: Tue Feb 15, 2005 1:52 pm     Reply with quote

OK, I'll say it: RTFM.

Now that is out of my system, most PIC16Fs (if not all) cannot individually address the weak Port B pull up. A single bit in the OPTION REGister enables or disables ALL the pull ups at the same time.

And as far as I know there is no pull-down built into any PIC I/O port.
_________________
Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month!
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Tue Feb 15, 2005 2:59 pm     Reply with quote

When the pull-up bit is set, if a pin, on portb, is configured as an output the corresponding pull-up is disabled.
Mark



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

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

PostPosted: Tue Feb 15, 2005 9:30 pm     Reply with quote

I'll second that! Read the manual or actually the datasheet. It tells all.


RTFD 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