PullUp/ PullDown Resistors
Moderator: Benj
- Steve
- Matrix Staff
- Posts: 3431
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Re: PullUp/ PullDown Resistors
According to the datasheet for that device, only PORTB has an option for internal pull-ups. You have to add some C code in a C icon at the beginning of your program to enable them. Hopefully this will work:
Code: Select all
INTCON2bits.nRBPU = 0;
- Steve
- Matrix Staff
- Posts: 3431
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Re: PullUp/ PullDown Resistors
I don't think you can as there is a single setting for all of PORTB. This is from the datasheet:
If you need a pull-up (or pull-down) on an individual pin, then you'll have to chose a chip which has that functionality, or alternatively use an external resistor.Each of the PORTB pins has a weak internal pull-up. A single control bit can turn on all the pull-ups. This is performed by clearing bit RBPU (INTCON2<7>). The weak pull-up is automatically turned off when the port pin is configured as an output. The pull-ups are disabled on a Power-on Reset.