PDA

View Full Version : Weak pullup on 18f2620



Alberto
- 12th October 2016, 19:37
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.



The above is taken from the datasheet. Since I NEED to set portB.5 as an output and leave all the remaining 7 pins as input (trisB = %11011111). Can I use the weak pullup? Or it will disabled ?

How should I read the above note: a single pin set as output will turn the weak pullup off?

What does mean "The pull-ups are disabled on a Power-on Reset" ?


Thank you for any clearification.

Alberto

HenrikOlsson
- 12th October 2016, 22:39
It means that INTCON2.7 is set by default (pullups disabled).
When you clear the bit the pullups are enabled. But only for pins configured as inputs. If the PIC is reset the pullups are disabled.

A single pin set to output disabled the pullup for that pin.

At least that's how I read it.

/Henrik.

Alberto
- 14th October 2016, 13:00
Thank you Henrik.

Alberto