HT45R37V Holtek Semiconductor Inc., HT45R37V Datasheet - Page 37

no-image

HT45R37V

Manufacturer Part Number
HT45R37V
Description
C/r-f Type 8-bit Otp Mcu
Manufacturer
Holtek Semiconductor Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
HT45R37V
Manufacturer:
HOLTEK
Quantity:
3 200
Analog to Digital Converter
The need to interface to real world analog signals is a
common requirement for many electronic systems.
However, to properly process these signals by a
microcontroller, they must first be converted into digital
signals by A/D converters. By integrating the A/D con-
version electronic circuitry into the microcontroller, the
need for external components is reduced significantly
with the corresponding follow-on benefits of lower costs
and reduced component space requirements.
A/D Overview
The device contains an 2-channel analog to digital con-
verter which can directly interface to external analog sig-
nals, such as that from sensors or other control signals
and convert these signals directly into either a 12-bit dig-
ital value.
The accompanying block diagram shows the overall in-
ternal structure of the A/D converter, together with its as-
sociated registers.
A/D Converter Data Registers - ADRL, ADRH
The device, which has an internal 12-bit A/D converter,
requires two data registers, 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 digit-
ised conversion value. Only the high byte register,
ADRH, utilises its full 8-bit contents. The low byte regis-
ter utilises only 4 bit of its 8-bit contents as it contains
only the lowest bits of the 12-bit converted value.
In the following table, D0~D11 is the A/D conversion
data result bits.
Rev. 1.00
Channels
Input
2
Conversion
Bits
12
PB0~PB1
Input
Pins
A/D Converter Structure
¸
37
A/D Converter Control Registers - ADCR, ACSR
To control the function and operation of the A/D con-
verter, two control registers known as ADCR and ACSR
are provided. These 8-bit registers define functions
such as the selection of which analog channel is con-
nected 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 con-
version 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
2 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 ADCR control register also contains the
PCR2~PCR0 bits which determine which pins on Port B
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 PCR2~PCR0 bits are all set to zero, then all the Port
B pins will be setup as normal I/Os and the internal A/D
converter circuitry will be powered off to reduce the power
consumption.
The START bit in the register is used to start and reset
the A/D converter. When the microcontroller sets this bit
from low to high and then low again, an analog to digital
Register
ADRH
ADRL
D11 D10 D9
Bit
D3
7
A/D Data Registers
Bit
D2
6
Bit
D1
5
Bit
D0
D8
4
Bit
D7
3
October 20, 2009
HT45R37V
Bit
D6
2
Bit
D5
1
Bit
D4
0

Related parts for HT45R37V