English
Language : 

BS67F340 Datasheet, PDF (175/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
ADCEN
off
START
tON2ST
on
A/D sampling time
tADS
Start of A/D conversion
A/D sampling time
tADS
Start of A/D conversion
off
on
Start of A/D conversion
ADBZ
End of A/D
conversion
End of A/D
conversion
ACS[3:0]
(TSE=0)
x011B
A/D channel
switch
x010B
tADC
A/D conversion time
x000B
tADC
A/D conversion time
x001B
tADC
A/D conversion time
A/D Conversion Timing – External Channel Input
Summary of A/D Conversion Steps
The following summarises the individual steps that should be executed in order to implement an A/D
conversion process.
• Step 1
Select the required A/D conversion clock by properly programming the ADCK2~ADCK0 bits in
the ADCR1 register.
• Step 2
Enable the A/D converter by setting the ADCEN bit in the ADCR0 register to one.
• Step 3
Select which signal is to be connected to the internal A/D converter by correctly configuring the
ACS3~ACS0 bits
If the TSE bit is 0 and ACS3~ACS0 bits are equal to x000~x111, then an external channel input
is selected.
If the TSE bit is 1 and ACS3~ACS0 bits are equal to 1xxx, then the relevant internal temperature
sensor signal is selected.
• Step 4
Select the reference voltgage source by configuring the K_VPTAT, K_REFO and VREFS bits.
• Step 5
Select the A/D converter output data format by configuring the ADRFS bit.
• Step 6
If A/D conversion interrupt is used, the interrupt control registers must be correctly configured
to ensure the A/D interrupt function is active. The master interrupt bontrol bit, EMI, and the A/D
conversion interrupt control bit, ADE, must both be set high in advance.
• Step 7
The A/D conversion procedure can now be initialized by setting the START bit from low to high
and then low again.
• Step 8
If A/D conversion is in progress, the ADBZ flag will be set high. After the A/D conversion
process is complete, the ADBZ flag will go low and then the output data can be read from ADRH
and ADRL registers.
Note: When checking for the end of the conversion process, if the method of polling the ADBZ bit
in the ADCR0 register is used, the interrupt enable step above can be omitted. However, the
interrupt method must be used to check for the end of the conversion process and obtain the
corresponding digital output data if the auto-conversion mode is enabled.
Rev. 1.40
175
December 15, 2016