
Rev. 1.00
1�3 of ���
�an�a�� 1�� �01�
Standard 8051 8-Bit Flash MCU
HT85F2260/HT85F2270/HT85F2280
Analog to Digital Converter –
ADC
Analog to Digital Converter –
ADC
A/D Converter Register Description
A read only register pair exists to store the ADC data 12-bit value. The remaining registers are
control registers which setup the operating and control function of the A/D converter.
A/D Converter Register List
Name
Bit
7
6
5
4
3
2
1
0
ADRL(ADRFS=0)
D3
D�
D1
D0
—
—
—
—
ADRL(ADRFS=1)
D7
D6
D�
D4
D3
D�
D1
D0
ADRH(ADRFS=0)
D11
D10
D9
D8
D7
D6
D�
D4
ADRH(ADRFS=1)
—
—
—
—
D11
D10
D9
D8
ADCR0
START
EOCB
ADOFF
ADRFS
ACS3
ACS�
ACS1
ACS0
ADCR1
ACS4
TSEN
—
VREFAS VREFIS
ADCK�
ADCK1
ADCK0
ADCR�
ACE7
ACE6
ACE�
ACE4
ACE3
ACE�
ACE1
ACE0
ADPGA
—
—
—
—
—
ADGN�
ADGN1
ADGN0
A/D Converter Data Registers – ADRL, ADRH
As the devices contain an internal 12-bit A/D converter, they require two data registers to store the
converted value. These are a high byte register, known as ADRH, and a low byte register, known
as ADRL. 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 ADCR0
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.
A/D Data Registers
ADRFS
ADRH
ADRL
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
0
D11 D10
D9
D8
D7
D6
D�
D4
D3
D�
D1
D0
0
0
0
0
1
0
0
0
0
D11 D10
D9
D8
D7
D6
D�
D4
D3
D�
D1
D0
A/D Converter Control Registers – ADCR0, ADCR1, ADCR2, ADPGA
To control the function and operation of the A/D converter, four control registers known as
ADCR0, ADCR1, ADCR2 and ADPGA are provided. These 8-bit registers define functions such
as analog channel selection, converted data format, PGA gain, clock source as well as the start
bit and end of conversion flag. As the device contains only one actual analog to digital converter
hardware circuit, each of the individual 8 analog inputs must be routed to the converter. It is the
function of the ACS4~ACS0 bits to determine which analog channel input pin, reference voltage or
internal temperature sensor is actually connected to the internal A/D converter.
The ADCR2 control register bits determine whether the pins on Port 4 are to be used as A/D
converter analog inputs or used as logic I/O pins. Setting the corresponding bit high will select the
A/D input function, clearing the bit to zero will select the I/O function. When the pin is selected
to be an A/D input, its logic I/O function will be removed and any internal pull-high resistors
connected to these pins will be automatically removed.
The ADPGA register determines the gain of the Programmable Gain Amplifier which is used to
amplify the analog input signal before conversion by the A/D Converter.