English
Language : 

MC68HC05JJ6 Datasheet, PDF (128/216 Pages) Freescale Semiconductor, Inc – General Release Specification Microcontrollers
Analog Subsystem
8.7 Voltage Measurement Methods
The methods for obtaining a voltage measurement can use software
techniques to express these voltages as absolute or ratiometric
readings.
In most applications, the external capacitor, the clock source, the
reference voltage and the charging current may vary between devices
and with changes in supply voltage or ambient temperature. All of these
variations must be considered when determining the desired resolution
of the measurement. The maximum and minimum extremes for the full
scale count will be:
NFSMIN = CEXTMIN x VFSMIN x fOSCMIN / (P x ICHGMAX)
NFSMAX = CEXTMAX x VFSMAX x fOSCMAX / (P x ICHGMIN)
The minimum count should be the desired resolution; and the counting
mechanism must be capable of counting to the maximum. The final
scaling of the count will be by a math routine which calculates:
VX = VREF x (NX – NOFF) / (NREF – NOFF)
Where:
VREF = Known reference voltage
VX = Unknown voltage between VSS and VREF
NX = Conversion count for unknown voltage
NREF = Conversion count for known reference voltage (VREF)
NOFF = Conversion count for minimum reference voltage (VSS)
When VREF is a stable voltage source, such as a zener or other
reference source, then the unknown voltage will be determined as an
absolute reading. If VREF is the supply source to the device (VDD), then
the unknown voltage will be determined as a ratio of VDD or a ratiometric
reading.
If the unknown voltage applied to the comparator is greater than its
common-mode range (VDD –1.5 volts), then the external capacitor will
try to charge to the same level. This will cause both comparator inputs
to be above the common-mode range and the output of the comparator
will be indeterminate. In this case, the comparator output flags may also
General Release Specification
128
Analog Subsystem
MC68HC05JJ6/MC68HC05JP6 — Rev. 3.2
Freescale Semiconductor