Rev. 1.40
17�
De�e��e� 1�� �01�
Rev. 1.40
173
De�e��e� 1�� �01�
BS67F340/BS67F350/BS67F360/BS67F370
Enhanced Touch A/D Flash MCU with LCD Driver
BS67F340/BS67F350/BS67F360/BS67F370
Enhanced Touch A/D Flash MCU with LCD Driver
A/D Operation
The START bit in the ADCR0 register is used to start the AD conversion. When the microcontroller
sets this bit from low to high and then low again, an analog to digital conversion cycle will be
initiated.
The ADBZ bit in the ADCR0 register is used to indicate whether the analog to digital conversion
process is in progress or not. This bit will be automatically set to 1 by the microcontroller after an
A/D conversion is successfully initiated. When the A/D conversion is complete, the ADBZ will be
cleared to 0. In addition, the corresponding A/D interrupt request flag will be set in the interrupt
control register, and if the interrupts are enabled, an internal interrupt signal will be generated. This
A/D internal interrupt signal will direct the program flow to the associated A/D internal interrupt
address for processing. If the A/D internal interrupt is disabled, the microcontroller can poll the
ADBZ bit in the ADCR0 register to check whether it has been cleared as an alternative method of
detecting the end of an A/D conversion cycle.
The clock source for the A/D converter, which originates from the system clock f
SYS
, can be chosen
to be either f
SYS
or a subdivided version of f
SYS
. The division ratio value is determined by the
ADCK2~ADCK0 bits in the ADCR1 register. Although the A/D clock source is determined by the
system clock f
SYS
and by bits ADCK2~ADCK0, there are some limitations on the maximum A/D
clock source speed that can be selected. As the recommended range of permissible A/D clock period,
t
ADCK
, is from 0.5μs to 10μs, care must be taken for system clock frequencies. For example, as the
system clock operates at a frequency of 8MHz, the ADCK2~ADCK0 bits should not be set to 000,
001 or 111. Doing so will give A/D clock periods that are less than the minimum A/D clock period
which may result in inaccurate A/D conversion values. Refer to the following table for examples,
where values marked with an asterisk * show where, depending upon the device, special care must
be taken, as the values may be less than the specified minimum A/D Clock Period.
However, the recommended A/D clock period is from 1μs to 2μs if the input signal to be converted
is the temperature sensor output voltage or reference voltage.
f
SYS
A/D Clock Period (t
ADCK
)
ADCK[2:0]
= 000
(f
SYS
)
ADCK[2:0]
= 001
(f
SYS
/2)
ADCK[2:0]
= 010
(f
SYS
/4)
ADCK[2:0]
= 011
(f
SYS
/8)
ADCK[2:0]
= 100
(f
SYS
/16)
ADCK[2:0]
= 101
(f
SYS
/32)
ADCK[2:0]
= 110
(f
SYS
/64)
ADCK[2:0]
= 111
(f
SYS
/128)
1MHz
1μs
2μs
4μs
8μs
16μs *
32μs *
64μs *
128μs *
2MHz
�00ns
1μs
2μs
4μs
8μs
16μs *
32μs *
64μs *
4MHz
��0ns *
�00ns
1μs
2μs
4μs
8μs
16μs *
32μs *
8MHz
1��ns *
��0ns *
�00ns
1μs
2μs
4μs
8μs
16μs *
12MHz
83ns *
1�7ns *
333ns *
��7ns
1.33μs
2.67μs
5.33μs
10.67μs *
16MHz
��.�ns *
1��ns *
��0ns *
�00ns
1μs
2μs
4μs
8μs
A/D Clock Period Examples for External Analog Inputs
Controlling the power on/off function of the A/D converter circuitry is implemented using the
ADCEN bit in the ADCR0 register. This bit must be set high to power on the A/D converter.
When the ADCEN bit is set high to power on the A/D converter internal circuitry a certain delay,
as indicated in the timing diagram, must be allowed before an A/D conversion is initiated. Even if
no pins are selected for use as A/D inputs, if the ADCEN bit is high, then some power will still be
consumed. In power conscious applications it is therefore recommended that the ADCEN is set low
to reduce power consumption when the A/D converter function is not being used.