English
Language : 

MC3S12RG128 Datasheet, PDF (238/546 Pages) Freescale Semiconductor, Inc – Microcontrollers
Chapter 8 Analog-to-Digital Converter (ATD10B8CV3)
8.4.2.3 Low Power Modes
The ATD can be configured for lower MCU power consumption in 3 different ways:
1. Stop mode: This halts A/D conversion. Exit from stop mode will resume A/D conversion, but due
to the recovery time the result of this conversion should be ignored.
2. Wait mode with AWAI = 1: This halts A/D conversion. Exit from wait mode will resume A/D
conversion, but due to the recovery time the result of this conversion should be ignored.
3. Writing ADPU = 0 (Note that all ATD registers remain accessible.): This aborts any A/D
conversion in progress.
Note that the reset value for the ADPU bit is zero. Therefore, when this module is reset, it is reset into the
power down state.
8.5 Initialization/Application Information
8.5.1 Setting up and starting an A/D conversion
The following describes a typical setup procedure for starting A/D conversions. It is highly recommended
to follow this procedure to avoid common mistakes.
Each step of the procedure will have a general remark and a typical example
8.5.1.1 Step 1
Power up the ATD and concurrently define other settings in ATDCTL2
Example: Write to ATDCTL2: ADPU=1 -> powers up the ATD, ASCIE=1 enable interrupt on finish of a
conversion sequence.
8.5.1.2 Step 2
Wait for the ATD Recovery Time tREC before you proceed with Step 3.
Example: Use the CPU in a branch loop to wait for a defined number of bus clocks.
8.5.1.3 Step 3
Configure how many conversions you want to perform in one sequence and define other settings in
ATDCTL3.
Example: Write S4C=1 to do 4 conversions per sequence.
8.5.1.4 Step 4
Configure resolution, sampling time and ATD clock speed in ATDCTL4.
Example: Use default for resolution and sampling time by leaving SRES8, SMP1 and SMP0 clear. For a
bus clock of 40MHz write 9 to PR4-0, this gives an ATD clock of 0.5*40MHz/(9+1) = 2MHz which is
within the allowed range for fATDCLK.
MC3S12RG128 Data Sheet, Rev. 1.05
238
Freescale Semiconductor