Ouch,mmm well
, seems you're totally right, I totally missed that part, my apologies
Each of the PORTD pins has a weak internal pull-up. A
single control bit, RDPU (PORTE<7>), can turn on all
the pull-ups. This is performed by setting RDPU. The
weak pull-up is automatically turned off when the port
pin is configured as a digital output or as one of the
other multiplexed peripherals. The pull-ups are
disabled on a Power-on Reset. The PORTE register is
shown in Section 10.5 “PORTE, TRISE and LATE
Registers”.
PORTE.7=1 ' this will indeed enable pull-up on PORTD
Intcon2.7=1 will disable the pull-ups as per the datasheet. (pdf page 102)
Out of curiosity, why do you say that you're unable to disable the pull-ups? If you read some voltage from them, maybe you read some "parasitic voltage", and If I remember correctly, some of these I/O on PORTB are also set as analog at POR. See ADCON0 (p262)
ADCON0=%00001111 ' turn of all ADCs
You can also trick PORTB adc with the config fuses.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks