GPIO.0, 1, 2, 4 and 5 have pull-up enable/disable bits in WPU, but
OPTION_REG.7 needs to be clear also.
OPTION_REG.7 (GPPU) is the global pull-up enable/disable bit.
OPTION_REG.7 = 0 ' GPIO pull-ups enabled by individual WPU bits
TRISIO = %00000001 ' GPIO.0 = input, rest outputs (except for GPIO.3)
WPU = %00000001 ' enable pull-up on GPIO.0, disable the rest.
It's pretty straight forward. Look in your data sheet under OPTION_REG &
WPU sections for details.




Bookmarks