
Rev. 1.00
�6
��ne 1�� �01�
Rev. 1.00
�7
��ne 1�� �01�
HT46R003B
Cost-Effective A/D 8-bit OTP MCU
HT46R003B
Cost-Effective A/D 8-bit OTP MCU
A/D Converter Control Registers – ADCR, ACSR, ADPCR
To control the function and operation of the A/D converter, two control registers known as ADCR,
ACSR and ADPCR are provided. These 8-bit registers define functions such as the on/off function,
the selection of which analog channel is connected to the internal A/D converter, which pins are
used as analog inputs and which are used as normal I/Os, the A/D clock source as well as controlling
the start function and monitoring the A/D converter end of conversion status.
The ACS2~ACS0 bits in the ADCR register define the channel number. As the device contains only
one actual analog to digital converter circuit, each of the individual 5 analog inputs must be routed
to the converter. It is the function of the ACS2~ACS0 bits in the ADCR register to determine which
analog channel is actually connected to the internal A/D converter.
The PCR4~PCR0 bits contained in the ADPCR register which determine which pins on PA5,
PA3~PA0 are used as analog inputs for the A/D converter and which pins are to be used as normal I/O
pins. If the PCRn bit has a value of 1, then the corresponding pin, namely one of the AN0~AN3
analog inputs, will be set as analog inputs. Note that if the PCRn bit is set to zero, then the
corresponding pin on PA5, PA3~PA0 will be set as a normal I/O pin, the analog input channels will
be all disabled and the A/D converter circuitry will be powered off.
The ADPCR control register contains the PCR4~PCR0 bits which determine which pins on
PA0~PA3, PA5 are used as analog inputs for the A/D converter and which pins are to be used as
normal I/O pins. Note that if the PCR4~PCR0 bits are all set to zero, then all the PA5, PA3~PA0
pins will be set as normal I/Os.
ADCR Register
Bit
7
6
5
4
3
2
1
0
Name
START
EOCB
—
—
—
ACS�
ACS1
ACS0
R/W
R/W
R
—
—
—
R/W
R/W
R/W
POR
0
1
—
—
—
0
0
0
Bit 7
START
: Start the A/D conversion
0→1→0: Start
0→1: Reset the A/D converter and set EOCB to "1"
This bit is used to initiate an A/D conversion process. The bit is normally low but if set
high and then cleared low again, the A/D converter will initiate a conversion process.
When the bit is set high the A/D converter will be reset.
Bit 6
EOCB
: End of A/D conversion flag
0: A/D conversion ended
1: A/D conversion in progress
This read only flag is used to indicate when an A/D conversion process has completed.
When the conversion process is running, the bit will be high.
Bit 5~3
Unimplemented, read as “0”
Bit 2~0
ACS2~ACS0
: A/D channel selection
000: AN0
001: AN1
010: AN2
011: AN3
100: AN4
101: AN4
110: AN4
111: AN3