Rev. 1.10
90
November 04, 2019
Rev. 1.10
91
November 04, 2019
HT45F5Q-3
Battery Charger Flash MCU
HT45F5Q-3
Battery Charger Flash MCU
Care must be taken if the SAINS2~SAINS0 bits are set to “001” to select the internal
analog signal to be converted. When the internal analog signal is selected to be
converted, the external input pin must never be selected as the A/D input signal by
properly setting the SACS3~SACS0 bits with a value from 1010 to 1111. Otherwise,
the external channel input will be connected together with the internal analog signal.
This will result in unpredictable situations such as an irreversible damage.
Bit 4~3
SAVRS1~SAVRS0
: A/D converter reference voltage selection
00: External VREF pin
01: Internal A/D converter power, V
DD
1x: External VREF pin
These bits are used to select the A/D converter reference voltage source. Care must be
taken if the SAVRS1~SAVRS0 bits are set to “01” to select the internal A/D converter
power as the reference voltage source. When the internal A/D converter power is
selected as the reference voltage, the VREF pin cannot be configured as the reference
voltage input by properly configuring the corresponding pin-shared function control
bits. Otherwise, the external input voltage on VREF pin will be connected to the
internal A/D converter power. This will result in unpredictable situations.
Bit 2~0
SACKS2~SACKS0
: A/D converter clock rate selection bit
000: f
SYS
001: f
SYS
/2
010: f
SYS
/4
011: f
SYS
/8
100: f
SYS
/16
101: f
SYS
/32
110: f
SYS
/64
111: f
SYS
/128
A/D Converter Reference Voltage
The reference voltage supply to the A/D converter can be supplied from the positive power supply,
V
DD
, or from an external reference source supplied on pin VREF. The desired selection is made
using the SAVRS1 and SAVRS0 bits. When the SAVRS bit field is set to “01”, the A/D converter
reference voltage will come from the V
DD
. Otherwise, if the SAVRS bit field is set to any other value
except “01”, the A/D converter reference voltage will come from the VREF pin. As the VREF pin
is pin-shared with other functions, when the VREF pin is selected as the reference voltage supply
pin, the VREF pin-shared function control bit should be properly configured to disable other pin
functions. However, if the internal A/D converter power is selected as the reference voltage, the
VREF pin must not be configured as the reference voltage input function to avoid the internal
connection between the VREF pin and A/D converter power V
DD
. The analog input values must not
be allowed to exceed the value of the selected A/D reference voltage.
A/D Converter Input Signal
All the external A/D analog channel input pins are pin-shared with the I/O pins as well as other
functions. The corresponding control bits for each A/D external input pin in the PxS0 and PxS1
registers determine whether the input pins are setup as A/D converter analog inputs or whether
they have other functions. If the pin is setup to be as an A/D 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 input as when the pin-shared function control bits enable an A/D input, the status of the port
control register will be overridden.