Just to set the record. For this device and by the datasheet, PORTA.4 is not an open drain as some suggested. It's really a full CMOS output pin. So you don't even need the pull-up resistor.
But YES, you have to disable the internal analog comparators and ADCs.
Learning opportunityBet I wont forget about this register![]()
Bookmarks