Rev. 1.00
76
August 29, 2018
Rev. 1.00
77
August 29, 2018
HT45F6530
AC Voltage Regulator Flash MCU
HT45F6530
AC Voltage Regulator Flash MCU
Bit 3~2
SAVRS1~SAVRS0
: A/D converter reference voltage select
00: Internal A/D converter power, V
DD
01: External VREF pin
1x: Internal PGA output voltage, V
R
These bits are used to select the A/D converter reference voltage source. When the
internal reference voltage source is selected, the reference voltage derived from the
external VREF pin will automatically be switched off.
Bit 1~0
PGAGS1~PGAGS0
: PGA gain select
00: Gain=1
01: Gain=2
10: Gain=3
11: Gain=4
A/D Converter Reference Voltage
The actual reference voltage supply to the A/D converter can be supplied from the positive power
supply pin, VDD, or from an external reference source supplied on pin VREF, or from the internal
PGA output voltage, V
R
. The desired selection is made using the SAVRS1 and SAVRS0 bits in the
SADC2 register. When the SAVRS bit field is set to “00”, the A/D converter reference voltage will
come from the VDD pin. If the SAVRS bit field is set to “01”, the A/D converter reference voltage
will come from the VREF pin. Otherwise, the A/D converter reference voltage will come from the
PGA output, V
R
. 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 bits should be properly
configured to disable other pin functions. However, if the internal reference signal, V
DD
or V
R
, is
selected as the A/D converter reference source, the external reference input from the VREF pin
will automatically be switched off by the hardware. The analog input values must not be allowed to
exceed the value of the selected reference voltage, V
REF
.
In addition, the A/D converter also has a VREFI pin which is one of PGA inputs for A/D converter
reference. To select this PGA input signal, the PGAIS bit in the SADC2 register must be cleared to
zero and the relevant pin-shared control bits should be properly configured. However, the PGA input
can be also supplied from the internal independent reference voltage, V
BG
. If the internal voltage
V
BG
is selected as the PGA input source, the external voltage on the VREFI pin will automatically be
switched off by the hardware. The PGA input voltage can be amplified through a programmable gain
amplifier, PGA, which is controlled by the ADPGAEN bit in the SADC2 register. The PGA gain can
be equal to 1, 2, 3 or 4.
SAVRS[1:0]
Reference
Description
00
V
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 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 PxS1 and PxS0
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