Specifications
mikroElektronika | Free Online Book | PIC Microcontrollers | Chapter 3: I/O Ports
Fig. 3-13 Port D and TRISD Register
Port E and TRISE Register
Port E is a 4-bit wide, bidirectional port. The TRISE register’s bits determine the function of its pins. Similar to other
ports, a logic one (1) in the TRISE register configures the appropriate port pin as input. The exception is RE3 which is input
only and its TRIS bit is always read as ‘1’.
Fig. 3-14 Port E and TRISE Register
Similar to Ports A and B, three pins can be configured as analog inputs in this case. The ANSELH register bits determine
whether a pin will act as analog input (AN) or digital input/output:
● RE0 = AN5 (determined by bit ANS5 of the ANSELregister);
● RE1 = AN6 (determined by bit ANS6 of the ANSELregister); and
● RE2 = AN7 (determined by bit ANS7 of the ANSELregister).
ANSEL and ANSELH Registers
The ANSEL and ANSELH registers are used to configure the input mode of an I/O pin to analog or digital.
http://www.mikroe.com/en/books/picmcubook/ch3/ (8 of 10)5/3/2009 11:32:31 AM