Rev. 1.00
122
September 11, 2018
Rev. 1.00
123
September 11, 2018
HT45F4050
A/D NFC Flash MCU
HT45F4050
A/D NFC Flash MCU
SAVRS[1:0]
Reference Source
Description
00
AV
DD
Internal A/D converter power supply voltage
01
VREF pin
External A/D converter reference pin VREF
1x
V
R
Internal A/D converter PGA output voltage
A/D Converter Reference Voltage Selection
A/D Converter Input Signals
All of the
external
A/D Converter analog input pins are pin-shared with the I/O pins as well as other
functions. The corresponding pin-shared function selection bits in the PxS0 and PxS1 registers,
determine whether the
external
input pins are setup as A/D converter analog channel inputs or
whether they have other functions. If the corresponding pin is setup to be an A/D converter
analog
channel input, the original pin functions will be disabled. In this way, pins can be changed under
program control to change their function between A/D inputs and other functions. All pull-high
resistors, which are setup through register programming, will be automatically disconnected if the
pins are setup as A/D inputs. Note that it is not necessary to first setup the A/D pin as an input in
the port control register to enable the A/D Converter input as when the relevant A/D converter input
function selection bits enable an A/D converter input, the status of the port control register will be
overridden.
As this device contains only one actual analog to digital converter hardware circuit, each of the
external and internal analog signals must be routed to the converter. The SAINS3~SAINS0 bits in
the SADC1 register are used to determine that the analog signal to be converted comes from the
external channel input or internal analog signal. The SACS3~SACS0 bits in the SADC0 register are
used to determine which external channel input is selected to be converted. If the SAINS3~SAINS0
bits are set to "0000", "
0100
"
or
"
11xx
"
the external channel input will be selected to be converted
and the SACS bit field can determine which external channel is selected.
When the SAINS field is set to the value of "0x01", "0x10" or "0x11", the internal analog signal will
be selected. If the internal analog signal is selected to be converted, the external channel signal input
will automatically be switched off regardless of the SACS field value. It will prevent the external
channel input from being connected together with the internal analog signal.
SAINS[3:0]
SACS[3:0]
Input Signals
Description
0000, 0100, 11xx
0000~1100
AN0~AN12
External channel analog input ANn
11xx
—
Floating, no external channel is selected
0001
xxxx
AV
DD
Internal A/D converter power supply voltage
0010
xxxx
AV
DD
/2
Internal A/D converter power supply voltage/2
0011
xxxx
AV
DD
/4
Internal A/D converter power supply voltage/4
0101
xxxx
V
R
Internal A/D converter PGA output voltage
0110
xxxx
V
R
/2
Internal A/D converter PGA output voltage/2
0111
xxxx
V
R
/4
Internal A/D converter PGA output voltage/4
10xx
xxxx
Ground
Connected to the ground
"x": Don’t care
A/D Converter Input Signal Selection