English
Language : 

PIC16F946 Datasheet, PDF (154/274 Pages) Microchip Technology – 64-Pin Flash-Based, 8-Bit CMOS Microcontrollers with LCD Driver and nanoWatt Technology
PIC16F946
REGISTER 12-1:
ANSEL – ANALOG SELECT REGISTER (ADDRESS: 91h)
R/W-1 R/W-1 R/W-1 R/W-1
R/W-1
R/W-1
ANS7
ANS6
ANS5
ANS4
ANS3
ANS2
bit 7
R/W-1
ANS1
R/W-1
ANS0
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
- 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
REGISTER 12-2:
ADCON0 – A/D CONTROL REGISTER (ADDRESS: 1Fh)
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
ADFM VCFG1 VCFG0 CHS2
CHS1
CHS0
bit 7
R/W-0
GO/DONE
R/W-0
ADON
bit 0
bit 7
bit 6
bit 5
bit 4-2
bit 1
bit 0
ADFM: A/D Result Formed Select bit
1 = Right justified
0 = Left justified
VCFG1: Voltage Reference bit
1 = VREF- pin
0 = VSS
VCFG0: Voltage Reference bit
1 = VREF+ pin
0 = VDD
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)
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
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
- 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
DS41265A-page 152
Preliminary
© 2005 Microchip Technology Inc.