Datasheet

MC68HC908GP32 Data Sheet, Rev. 10
Freescale Semiconductor 53
Chapter 4
Analog-to-Digital Converter (ADC)
4.1 Introduction
This section describes the 8-bit analog-to-digital converter (ADC).
4.2 Features
Features of the ADC module include:
Eight channels with multiplexed input
Linear successive approximation with monotonicity
8-bit resolution
Single or continuous conversion
Conversion complete flag or conversion complete interrupt
Selectable ADC clock
4.3 Functional Description
The ADC provides eight pins for sampling external sources at pins PTB7/AD7–PTB0/AD0. An analog
multiplexer allows the single ADC converter to select one of eight ADC channels as ADC voltage in
(V
ADIN
). V
ADIN
is converted by the successive approximation register-based analog-to-digital converter.
When the conversion is completed, ADC places the result in the ADC data register and sets a flag or
generates an interrupt. (See Figure 4-1.)
4.3.1 ADC Port I/O Pins
PTB7/AD7–PTB0/AD0 are general-purpose I/O (input/output) pins that share with the ADC channels. The
channel select bits define which ADC channel/port pin will be used as the input signal. The ADC overrides
the port I/O logic by forcing that pin as input to the ADC. The remaining ADC channels/port pins are
controlled by the port I/O logic and can be used as general-purpose I/O. Writes to the port register or DDR
will not have any affect on the port pin that is selected by the ADC. Read of a port pin in use by the ADC
will return a logic 0.
4.3.2 Voltage Conversion
When the input voltage to the ADC equals V
REFH
, the ADC converts the signal to $FF (full scale). If the
input voltage equals V
REFL
, the ADC converts it to $00. Input voltages between V
REFH
and V
REFL
are a
straight-line linear conversion.
NOTE
Inside the ADC module, the reference voltages V
REFH
is connected to the
ADC analog power, V
DDAD
; and V
REFL
is connected to the ADC analog
ground, V
SSAD
. Therefore, the ADC input voltage should not exceed these
analog supply voltages.