Rev. 1.00
118
September 11, 2018
Rev. 1.00
119
September 11, 2018
HT45F4050
A/D NFC Flash MCU
HT45F4050
A/D NFC Flash MCU
A/D Converter Register Description
Overall operation of the A/D converter is controlled using six registers. A read only register pair
exists to store the A/
D
converter data 12-bit value. The remaining three registers are control registers
which setup the operating and control function of the A/D converter. An additional register VBGRC
is used
for
bandgap reference voltage on/off control
.
Register
Name
Bit
7
6
5
4
3
2
1
0
SADOL(ADRFS=0)
D3
D2
D1
D0
—
—
—
—
SADOL(ADRFS=1)
D7
D6
D5
D4
D3
D2
D1
D0
SADOH(ADRFS=0)
D11
D10
D9
D8
D7
D6
D5
D4
SADOH(ADRFS=1)
—
—
—
—
D11
D10
D9
D8
SADC0
START
ADBZ
ADCEN
ADRFS
SACS3
SACS2
SACS1
SACS0
SADC1
SAINS3
SAINS2
SAINS1
SAINS0
—
SACKS2 SACKS1 SACKS0
SADC2
ADPGAEN
—
—
PGAIS
SAVRS1 SAVRS0 PGAGS1 PGAGS0
VBGRC
—
—
—
—
—
—
—
VBGREN
A/D Converter Registers List
A/D Converter Data Registers – SADOL, SADOH
As the device contains an internal 12-bit A/D converter, it requires two data registers to store the
converted value. These are a high byte register, known as SADOH, and a low byte register, known
as SADOL. After the conversion process takes place, these registers can be directly read by the
microcontroller to obtain the digitised conversion value. As only 12 bits of the 16-bit register space
is utilised, the format in which the data is stored is controlled by the ADRFS bit in the SADC0
register as shown in the accompanying table. D0~D11 are the A/D conversion result data bits.
Any unused bits will be read as zero. Note that the A/D converter data register contents will keep
unchanged if the A/D converter is disabled.
ADRFS
SADOH
SADOL
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
0
D11 D10
D9
D8
D7
D6
D5
D4
D3
D2
D1
D0
0
0
0
0
1
0
0
0
0
D11 D10
D9
D8
D7
D6
D5
D4
D3
D2
D1
D0
A/D Converter Data Registers
A/D Converter Control Registers – SADC0, SADC1, SADC2, VBGRC
To control the function and operation of the A/D converter, several control registers known as
SADC0, SADC1, SADC2 are provided. These 8-bit registers define functions such as the selection
of which analog channel is connected to the internal A/D converter, the digitised data format, the A/D
converter
clock source as well as controlling the start function and monitoring the A/D converter
busy status. As the 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 SAIN bit field in the
SADC1 register and SACS bit field in the SADC0 register are used to which analog signal derived
from the external or internal signals will be connected to the A/D converter. The A/D converter
also contains programmable gain amplifier, PGA, to generate the A/D converter internal reference
voltage. The overall operation of the PGA is controlled using the SADC2 register.
An additional register named VBGRC is provided. The VBGREN bit in the VBGRC register is used
for Bandgap reference voltage control.