Auto Page CPX-3600 Especificaciones Pagina 173

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 243
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 172
ST72321xx-Auto 10-bit A/D converter (ADC)
Doc ID 13829 Rev 1 173/243
17.3 Functional description
The conversion is monotonic, meaning that the result never decreases if the analog input
does not and never increases if the analog input does not.
If the input voltage (V
AIN
) is greater than V
AREF
(high-level voltage reference) then the
conversion result is FFh in the ADCDRH register and 03h in the ADCDRL register (without
overflow indication).
If the input voltage (V
AIN
) is lower than V
SSA
(low-level voltage reference) then the
conversion result in the ADCDRH and ADCDRL registers is 00 00h.
The A/D converter is linear and the digital result of the conversion is stored in the ADCDRH
and ADCDRL registers. The accuracy of the conversion is described in Section 19:
Electrical characteristics.
R
AIN
is the maximum recommended impedance for an analog input signal. If the impedance
is too high, this will result in a loss of accuracy due to leakage and sampling not being
completed in the allotted time.
17.3.1 A/D converter configuration
The analog input ports must be configured as input, no pull-up, no interrupt. Refer to the
Chapter 9: I/O ports. Using these pins as analog inputs does not affect the ability of the port
to be read as a logic input.
In the ADCCSR register:
Select the CS[3:0] bits to assign the analog channel to convert.
17.3.2 Starting the conversion
In the ADCCSR register:
Set the ADON bit to enable the A/D converter and to start the conversion. From this
time on, the ADC performs a continuous conversion of the selected channel.
When a conversion is complete:
The EOC bit is set by hardware.
The result is in the ADCDR registers.
A read to the ADCDRH or a write to any bit of the ADCCSR register resets the EOC bit.
To read the 10 bits, perform the following steps:
1. Poll the EOC bit.
2. Read the ADCDRL register.
3. Read the ADCDRH register. This clears EOC automatically.
Note: The data is not latched, so both the low and the high data register must be read before the
next conversion is complete, so it is recommended to disable interrupts while reading the
conversion result.
To read only 8 bits, perform the following steps:
1. Poll the EOC bit.
2. Read the ADCDRH register. This clears EOC automatically.
Vista de pagina 172
1 2 ... 168 169 170 171 172 173 174 175 176 177 178 ... 242 243

Comentarios a estos manuales

Sin comentarios