English
Language : 

PIC16F707 Datasheet, PDF (53/284 Pages) Microchip Technology – 40/44-Pin, Flash Microcontrollers with nanoWatt XLP and mTouch™ Technology
PIC16F707/PIC16LF707
6.2.1 ANSELA REGISTER
The ANSELA register (Register 6-4) is used to
configure the Input mode of an I/O pin to analog.
Setting the appropriate ANSELA bit high will cause all
digital reads on the pin to be read as ‘0’ and allow
analog functions on the pin to operate correctly.
The state of the ANSELA bits has no affect on digital
output functions. A pin with TRIS clear and ANSEL set
will still operate as a digital output, but the Input mode
will be analog. This can cause unexpected behavior
when executing read-modify-write instructions on the
affected port.
REGISTER 6-4: ANSELA: PORTA ANALOG SELECT REGISTER
R/W-1
ANSA7
bit 7
R/W-1
ANSA6
R/W-1
ANSA5
R/W-1
ANSA4
R/W-1
ANSA3
R/W-1
ANSA2
R/W-1
ANSA1
R/W-1
ANSA0
bit 0
Legend:
R = Readable bit
-n = Value at POR
W = Writable bit
‘1’ = Bit is set
‘0’ = Bit is cleared
x = Bit is unknown
bit 7-0
ANSA<7:0>: Analog Select between Analog or Digital Function on pins RA<7:0>, respectively
0 = Digital I/O. Pin is assigned to port or digital special function.
1 = Analog input. Pin is assigned as analog input(1). Digital Input buffer disabled.
Note 1: When setting a pin to an analog input, the corresponding TRIS bit must be set to Input mode in order to
allow external control of the voltage on the pin.
6.2.2 PIN DESCRIPTIONS
Each PORTA pin is multiplexed with other functions. The
pins and their combined functions are briefly described
here. For specific information about individual functions
such as the A/D Converter (ADC), refer to the
appropriate section in this data sheet.
6.2.2.1 RA0/AN0/VCAP
The RA0 pin is configurable to function as one of the
following:
• General purpose I/O
• Analog input for the A/D
• Slave Select input for the SSP(1)
• Voltage Regulator Capacitor pin (PIC16F707
only)
Note 1: SS pin location may be selected as RA5
or RA0.
6.2.2.2 RA1/AN1/CPSA0
The RA1 pin is configurable to function as one of the
following:
• General purpose I/O
• Analog input for the A/D
• Capacitive sensing input
6.2.2.3 RA2/AN2/CPSA1/DACOUT
The RA2 pin is configurable to function as one of the
following:
• General purpose I/O
• Analog input for the A/D
• Capacitive sensing input
• DAC Output
 2010 Microchip Technology Inc.
Preliminary
DS41418A-page 53