PIC16F882/883/884/886/887
REGISTER 3-4:
ANSELH: ANALOG SELECT HIGH REGISTER
U-0
—
U-0
—
R/W-1
R/W-1
R/W-1
ANS11
R/W-1
R/W-1
ANS9
R/W-1
ANS8
ANS13
ANS12
ANS10
bit 7
bit 0
Legend:
R = Readable bit
-n = Value at POR
W = Writable bit
‘1’ = Bit is set
U = Unimplemented bit, read as ‘0’
‘0’ = Bit is cleared x = Bit is unknown
bit 7-6
bit 5-0
Unimplemented: Read as ‘0’
ANS<13:8>: Analog Select bits
Analog select between analog or digital function on pins AN<13:8>, respectively.
1= Analog input. Pin is assigned as analog input(1)
0= Digital I/O. Pin is assigned to port or special function.
.
Note 1: Setting a pin to an analog input automatically disables the digital input circuitry, weak pull-ups, and
interrupt-on-change if available. The corresponding TRIS bit must be set to Input mode in order to allow
external control of the voltage on the pin.
REGISTER 3-5:
PORTB: PORTB REGISTER
R/W-x
RB7
R/W-x
RB6
R/W-x
RB5
R/W-x
RB4
R/W-x
RB3
R/W-x
RB2
R/W-x
RB1
R/W-x
RB0
bit 7
bit 0
Legend:
R = Readable bit
-n = Value at POR
W = Writable bit
‘1’ = Bit is set
U = Unimplemented bit, read as ‘0’
‘0’ = Bit is cleared x = Bit is unknown
bit 7-0
RB<7:0>: PORTB I/O Pin bit
1= Port pin is > VIH
0= Port pin is < VIL
REGISTER 3-6:
TRISB: PORTB TRI-STATE REGISTER
R/W-1
TRISB7
bit 7
R/W-1
R/W-1
R/W-1
R/W-1
R/W-1
R/W-1
R/W-1
TRISB6
TRISB5
TRISB4
TRISB3
TRISB2
TRISB1
TRISB0
bit 0
Legend:
R = Readable bit
-n = Value at POR
W = Writable bit
‘1’ = Bit is set
U = Unimplemented bit, read as ‘0’
‘0’ = Bit is cleared x = Bit is unknown
bit 7-0
TRISB<7:0>: PORTB Tri-State Control bit
1= PORTB pin configured as an input (tri-stated)
0= PORTB pin configured as an output
DS41291D-page 48
Preliminary
© 2007 Microchip Technology Inc.