Conversion Start Modes; Timer Triggered Start; Start Immediately; Edge Triggered - Philips P89LPC938 User Manual

Single-chip microcontroller
Table of Contents

Advertisement

Philips Semiconductors
Table 10:
Burst0
0
1

3.2.3 Conversion start modes

3.2.3.1 Timer triggered start

An A/D conversion is started by the overflow of Timer 0. Once a conversion has started,
additional Timer 0 triggers are ignored until the conversion has completed. The Timer
triggered start mode is available in all A/D operating modes.This mode is selected by the
TMMx bit and the ADCS01 and ADCS00 bits (see

3.2.3.2 Start immediately

Programming this mode immediately starts a conversion.This start mode is available in all
A/D operating modes.This mode is selected by setting the ADCS01 and ADCS00 bits in
the ADCON0 register (See

3.2.3.3 Edge triggered

An A/D conversion is started by rising or falling edge of P1.4. Once a conversion has
started, additional edge triggers are ignored until the conversion has completed. The edge
triggered start mode is available in all A/D operating modes.This mode is selected by
setting the ADCS01 and ADCS00 bits in the ADCON0 register (See
Table

3.2.4 Stopping and restarting conversions

An A/D conversion or set of conversions can be stopped by clearing the ADCS01 and
ADCS00 bits in ADCON0 (and also theTMM0 bit in ADCON0 if the conversion was started
in Timer triggered mode). Prior to resuming conversions, the user will need to reset the
input multiplexer to the first user specified channel. This can be accomplished by writing
the ADINS register with the desired channels.

3.2.5 Boundary limits interrupt

The A/D converter has both a high and low boundary limit register. The user may select
whether an interrupt is generated when the conversion result is within (or equal to) the
high and low boundary limits or when the conversion result is outside the boundary limits.
An interrupt will be generated, if enabled, if the result meets the selected interrupt criteria.
The boundary limit may be disabled by clearing the boundary limit interrupt enable.
An early detection mechanism exists when the interrupt criteria has been selected to be
outside the boundary limits. In this case, after the four MSBs have been converted, these
four bits are compared with the four MSBs of the boundary high and low registers. If the
four MSBs of the conversion meet the interrupt criteria (i.e.- outside the boundary limits)
an interrupt will be generated, if enabled. If the four MSBs do not meet the interrupt
criteria, the boundary limits will again be compared after all 8 MSBs have been converted.
The boundary status register (BNDSTA0) flags the channels which caused a boundary
interrupt.
User manual
Conversion mode bits
SCC0
1
0
Table 12
14).
Rev. 03 — 7 June 2005
...continued
Scan0
ADC0 conversion mode
0
Fixed channel, continuous
Dual channel, continuous
0
Auto scan, continuous
Table 12
and
Table
14).
UM10119
P89LPC938 User manual
and
Table
14).
Table 12
and
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
26 of 139

Advertisement

Table of Contents
loading

Table of Contents