A/D Converter Register Description - Holtek BS86DH12C Manual

High voltage touch a/d flash mcu with hvio
Table of Contents

Advertisement

BS86DH12C
High Voltage Touch A/D Flash MCU with HVIO

A/D Converter Register Description

Overall operation of the A/D converter is controlled using five registers. A read only register pair
exists to store the A/D Converter data 12-bit value. The remaining two registers, SADC0 and
SADC1, are control registers which set the operating conditions and control function of the A/D
converter.
Register
Name
SADOL
(ADRFS=0)
SADOL
(ADRFS=1)
SADOH
(ADRFS=0)
SADOH
(ADRFS=1)
SADC0
START
SADC1
SAINS2
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. The A/D data registers contents will be unchanged if the A/D
converter is disabled.
ADRFS
7
0
D11 D10 D9
1
0
A/D Converter Control Registers – SADC0, SADC1
To control the function and operation of the A/D converter, two control registers known as SADC0
and SADC1 are provided. These 8-bit registers define functions such as the selection of which
analog signal is connected to the internal A/D converter, the digitised data format, the A/D 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 SACS3~SACS0 bits in
the SADC0 register are used to determine which external channel input is selected to be converted.
The SAINS2~SAINS0 bits in the SADC1 register are used to determine that the analog signal to be
converted comes from the internal analog signal or external analog channel input.
The relevant pin-shared function selection bits determine which pins on I/O Ports are used as analog
inputs for the A/D converter input and which pins are not to be used as the A/D converter input.
When the pin is selected to be an A/D input, its original function whether it is an I/O or other pin-
shared function will be removed. In addition, any internal pull-high resistor connected to the pin will
be automatically removed if the pin is selected to be an A/D converter input.
Rev. 1.00
7
6
5
D3
D2
D1
D7
D6
D5
D11
D10
D9
ADBZ
ADCEN
SAINS1
SAINS0
SAVRS1
A/D Converter Register List
SADOH
6
5
4
3
2
1
D8
D7
D6
D5
0
0
0
D11 D10 D9
A/D Converter Data Registers
105
Bit
4
3
2
D0
D4
D3
D2
D8
D7
D6
D11
D10
ADRFS
SACS3
SACS2
SAVRS0 SACKS2 SACKS1 SACKS0
SADOL
0
7
6
5
4
D4
D3
D2
D1
D0
D8
D7
D6
D5
D4
1
0
D1
D0
D5
D4
D9
D8
SACS1
SACS0
3
2
1
0
0
0
0
0
D3
D2
D1
D0
October 26, 2018

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the BS86DH12C and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents