Specifications
mikroElektronika | Free Online Book | PIC Microcontrollers | Chapter 3: I/O Ports
Fig. 3-15 ANSEL and ANSELH Registers
The rule is:
To configure a pin as an analog input, the appropriate bit of the ANSEL or ANSELH registers must be set (1). To configure
pin as digital input/output, the appropriate bit must be cleared (0).
The state of the ANSEL bits has no affect on digital output functions. The result of any attempt to read some port pin
configured as analog input will be 0.
Fig. 3-16 ANSEL and ANSELH Configuration
In Short:
You will probably never write a program which fully utilises all the Ports in an efficient manner to justify learning all
http://www.mikroe.com/en/books/picmcubook/ch3/ (9 of 10)5/3/2009 11:32:31 AM