BS86DH12C
High Voltage Touch A/D Flash MCU with HVIO
• Step 9
The A/D conversion procedure can now be initialized by setting the START bit from low to high
and then low again.
• Step 10
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
SADOH and SADOL registers.
Note: When checking for the end of the conversion process, if the method of polling the ADBZ bit
in the SADC0 register is used, the interrupt enable step above can be omitted.
Programming Considerations
During microcontroller operations where the A/D converter is not being used, the A/D internal
circuitry can be switched off to reduce power consumption, by clearing bit ADCEN to zero in the
SADC0 register. When this happens, the internal A/D converter circuits will not consume power
irrespective of what analog voltage is applied to their input lines. If the A/D converter input lines are
used as normal I/Os, then care must be taken as if the input voltage is not at a valid logic level, then
this may lead to some increase in power consumption.
A/D Transfer Function
As the device contains a 12-bit A/D converter, its full-scale converted digitised value is equal to
FFFH. Since the full-scale analog input value is equal to the actual A/D converter reference voltage,
V
, this gives a single bit analog input value of reference voltage value divided by 4096.
REF
The A/D Converter input voltage value can be calculated using the following equation:
The diagram shows the ideal transfer function between the analog input value and the digitised
output value for the A/D converter. Except for the digitised zero value, the subsequent digitised
values will change at a point 0.5 LSB below where they would change without the offset, and the
last full scale digitised value will change at a point 1.5 LSB below the V
V
voltage is the actual A/D converter reference voltage source determined by the SAVRS field.
REF
A/D Conversion
Result
Rev. 1.00
1 LSB=V
REF
A/D input voltage=A/D output digital value×(V
FFFH
FFEH
FFDH
0.5 LSB
03H
02H
01H
0
1
2
3
Analog Input Voltage
Ideal A/D Transfer Function
111
÷4096
÷4096)
REF
level. Note that here the
REF
1.5 LSB
V
4096
4093 4094 4095 4096
October 26, 2018
REF
Need help?
Do you have a question about the BS86DH12C and is the answer not in the manual?