English
Language : 

BS67F340 Datasheet, PDF (168/281 Pages) Holtek Semiconductor Inc – Enhanced Touch A/D Flash MCU with LCD Driver
BS67F340/BS67F350/BS67F360/BS67F370
Enhanced Touch A/D Flash MCU with LCD Driver
A/D Converter Data Registers – ADRL, ADRH
As these devices contain 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 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. Note that the A/D data register contents can only be read in the A/
D conversion completion interrupt service subroutine when the Auto-conversion mode is enabled by
setting the ATM bit in the ADCR1 register to 1. The A/D data registers contents will be cleared to
zero if the A/D converter is disabled.
ADRH
ADRL
ADRFS
7654321076543210
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 – ADCR0, ADCR1
To control the function and operation of the A/D converter, two control registers known as
ADCR0 and ADCR1 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 clock source as well as controlling the start function and monitoring the A/D converter busy
status. As these devices contain only one actual analog to digital converter hardware circuit, each
of the external and internal analog signals must be routed to the converter. The ACS3~ACS0 bits
in the ADCR0 register and the TSE and BGMEN bits in the TSC1 and TSC0 registers are used to
determine that the specific external channel input or relevant internal temperature sensor signal is
selected to be converted. If the internal temperature sensor analog signal is selected to be converted,
the ACS3~ACS0 bits should be set as “1xxx” together with proper configurations of TSE and
BGMEN bits.
TSE BGMEN
0
x
1
0
1
1
ACS3~ACS0
x000~x111
1xxx
1xxx
Input Signals
AN0~AN7
VTSO
VTSVREF
Description
External channel analog input
Temperature Sensor output voltage
Temperature Sensor reference voltage
A/D Converter Input Signal Selection
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.40
168
December 15, 2016