View previous topic :: View next topic |
Author |
Message |
Einly
Joined: 10 Sep 2003 Posts: 60
|
how to set internal resistor |
Posted: Tue Feb 15, 2005 11:21 am |
|
|
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
|
|
Posted: Tue Feb 15, 2005 1:52 pm |
|
|
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
|
|
Posted: Tue Feb 15, 2005 2:59 pm |
|
|
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
|
|
Posted: Tue Feb 15, 2005 9:30 pm |
|
|
I'll second that! Read the manual or actually the datasheet. It tells all.
RTFD |
|
|
|