PullUp/ PullDown Resistors
Posted: Thu Jun 23, 2022 11:42 pm
Hi everyone hope u are OK, my question today is how do we enable internal pull-up resistors and pull-down resistors in a pic microcontroller like the PIC18F442 ?
Old forums - please visit https://www.flowcode.co.uk/forums
https://www.flowcode.co.uk/mmforums/
Code: Select all
INTCON2bits.nRBPU = 0;
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.