AN2688 Freescale Semiconductor / Motorola, AN2688 Datasheet - Page 14

no-image

AN2688

Manufacturer Part Number
AN2688
Description
Implementing a 10-Bit Sigma-Delta Analog-to-Digital Converter Using the HC9S08Rx MCU Family Analog Comparator
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2688/D
14
The continuous-time Σ∆ modulator software:
The Σ∆ AD converter software:
Implementing a 10-Bit Sigma-Delta Analog-to-Digital Converter
Using the HC9S08Rx MCU Family Analog Comparator
Configures the I/O ports and registers
Sets the timer interrupt to a 128-kHz frequency
Clears PTE0 and the MCU stays in wait mode until an interrupt is reached.
After the timer overflows, PTE0 is set high and the comparator output flag
(ACO) is verified.
Code returns to wait mode and the process stays in a loop
Comprises both the modulator and the filter codes
Configures the I/O ports and registers
Sets the timer interrupt to occur periodically at a 60-kHz frequency
Clears counter and result variables and the program enters wait mode
Verifies the modulator routine ACO
The difference between the codes is:
The next step is to increment the counter and check its value.
Both counter and results are cleared and the program returns to wait mode
Freescale Semiconductor, Inc.
For More Information On This Product,
If ACO is set, PTA1 and PTA2 are also set high
When ACO is cleared, PTA1 and PTA2 are cleared as well
When ACO is set, PTA1 and PTA2 are also set and the result is
incremented.
If ACO is cleared, PTA1 and PTA2 are cleared as well but the result is
not incremented.
If counter is less than 1024, decimal, the program returns to wait mode.
Otherwise, when the counter is at 1024, PTB and PTC ports output the
AD conversion result.
Go to: www.freescale.com
MOTOROLA

Related parts for AN2688