Rev. 1.40
174
De�e��e� 1�� �01�
Rev. 1.40
17�
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 Reference Voltage
The reference voltage supply to the A/D Converter can be supplied from the positive power supply
pin, V
DD
, an external reference source supplied on pin VREF or an internal temperature sensor
reference voltage V
TSVREF
. The internal temperature sensor reference voltage can be derived from the
intenal V
BG
or V
PTAT
voltage selected using the K_VPTAT bit in the TSC3 register and then amplified
through a programmable gain amplifier except the one sourced from V
DD
. The PGA gain can be
equal to 1.675 or 1 selected by the K_REFO bit in the TSC0 register. As the VREF pin is pin-shared
with other functions, when the VREF pin is selected as the reference voltage supply pin, the VREF
pin-shared function control bits should first be properly configured to disable other pin-shared
functions.
A/D Input Pins
All of the external A/D analog input pins are pin-shared with the I/O pins as well as other functions.
The corresponding pin-shared function selection bits in the PxS0 and PxS1 registers, determine
whether the external input pins are setup as A/D converter analog channel inputs or whether they
have other functions. If the corresponding pin is setup to be an A/D converter analog channel input,
the original pin functions will be disabled. In this way, pins can be changed under program control
to change their function between A/D inputs and other functions. All pull-high resistors, which are
setup through register programming, will be automatically disconnected if the pins are setup as A/D
inputs. Note that it is not necessary to first setup the A/D pin as an input in the port control register
to enable the A/D input as when the relevant A/D input function selection bits enable an A/D input,
the status of the port control register will be overridden.
The A/D converter has its own reference voltage pin, VREF. However, the reference voltage can
also be supplied from the power supply pin or an internal temperature sensor circuit, a choice which
is made through the VREFP_EXT and VREFS bits in the TSC2 and ADCR1 register respectively.
Note that the analog input signal values must not be allowed to exceed the value of the selected A/D
reference voltage.
Conversion Rate and Timing Diagram
A complete A/D conversion contains two parts, data sampling and data conversion. The data
sampling which is defined as t
ADS
takes 4 A/D clock cycles and the data conversion takes 12 A/D
clock cycles. Therefore a total of 16 A/D clock cycles for an external input A/D conversion which is
defined as t
ADC
are necessary. However, an A/D conversion for an internal temperature sensor signal
will take a total of 56 A/D clock cycles.
Maximum single A/D conversion rate=A/D clock period/16 (External channel input signal)
Maximum single A/D conversion rate=A/D clock period/56 (Internal Temperature sensor signal)
The accompanying diagram shows graphically the various stages involved in an analog to digital
conversion process and its associated timing. After an A/D conversion process has been initiated
by the application program, the microcontroller internal hardware will begin to carry out the
conversion, during which time the program can continue with other functions. The time taken for the
A/D conversion is 16 t
ADCK
clock cycles where t
ADCK
is equal to the A/D clock period.