Datasheet
PIC16F87/88
DS30487D-page 52 2002-2013 Microchip Technology Inc.
TABLE 5-2: SUMMARY OF REGISTERS ASSOCIATED WITH PORTA
FIGURE 5-1: BLOCK DIAGRAM OF RA0/AN0:RA1/AN1 PINS
Address Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Value on
POR, BOR
Value on
all other
Resets
05h PORTA RA7 RA6 RA5 RA4 RA3 RA2 RA1 RA0 xxxx 0000
(1)
xxx0 0000
(2)
uuuu 0000
(1)
uuu0 0000
(2)
85h TRISA TRISA7 TRISA6 TRISA5
(3)
PORTA Data Direction Register 1111 1111 1111 1111
9Fh ADCON1 ADFM ADCS2 VCFG1 VCFG0
— — — — 0000 ---- 0000 ----
9Bh ANSEL
(4)
— ANS6 ANS5 ANS4 ANS3 ANS2 ANS1 ANS0 -111 1111 -111 1111
Legend: x = unknown, u = unchanged, - = unimplemented locations read as ‘0’. Shaded cells are not used by PORTA.
Note 1: This value applies only to the PIC16F87.
2: This value applies only to the PIC16F88.
3: Pin 5 is an input only; the state of the TRISA5 bit has no effect and will always read ‘1’.
4: PIC16F88 device only.
Data
Bus
QD
Q
CK
P
N
WR
PORTA
WR
TRISA
Data Latch
TRIS Latch
RD TRISA
RD PORTA
Analog
V
SS
VDD
I/O pin
QD
Q
CK
Input Mode
DQ
EN
To Comparator
TTL
Input Buffer
VDD
To A/D Module Channel Input (PIC16F88 only)