
PIC16F946
DS41265A-page 152
Preliminary
2005 Microchip Technology Inc.
REGISTER 12-1:
ANSEL – ANALOG SELECT REGISTER (ADDRESS: 91h)
REGISTER 12-2:
ADCON0 – A/D CONTROL REGISTER (ADDRESS: 1Fh)
R/W-1
ANS7
ANS6
ANS5
ANS4
ANS3
ANS2
ANS1
ANS0
bit 7
bit 0
bit 7-0:
ANS<7:0>: Analog Select bits
Select between analog or digital function on pins AN<7:0>, 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.
Legend:
R = Readable bit
W = Writable bit
U = Unimplemented bit, read as ‘0’
- n = Value at POR
‘1’ = Bit is set
‘0’ = Bit is cleared
x = Bit is unknown
R/W-0
ADFM
VCFG1
VCFG0
CHS2
CHS1
CHS0
GO/DONE
ADON
bit 7
bit 0
bit 7
ADFM: A/D Result Formed Select bit
1
= Right justified
0
= Left justified
bit 6
VCFG1: Voltage Reference bit
1
= VREF- pin
0
= VSS
bit 5
VCFG0: Voltage Reference bit
1
= VREF+ pin
0
= VDD
bit 4-2
CHS<2:0>: Analog Channel Select bits
000
= Channel 00 (AN0)
001
= Channel 01 (AN1)
010
= Channel 02 (AN2)
011
= Channel 03 (AN3)
100
= Channel 04 (AN4)
101
= Channel 05 (AN5)
110
= Channel 06 (AN6)
111
= Channel 07 (AN7)
bit 1
GO/DONE: A/D Conversion Status bit
1
= A/D conversion cycle in progress. Setting this bit starts an A/D conversion cycle.
This bit is automatically cleared by hardware when the A/D conversion has completed.
0
= A/D conversion completed/not in progress
bit 0
ADON: A/D Conversion Status bit
1
= A/D converter module is operating
0
= A/D converter is shut off and consumes no operating current
Legend:
R = Readable bit
W = Writable bit
U = Unimplemented bit, read as ‘0’
- n = Value at POR
‘1’ = Bit is set
‘0’ = Bit is cleared
x = Bit is unknown