PeripheralsIP2022 Users Manual
294
www.ubicom.com
configured as either an input or an output depending which device
is slower and has a need to stall incoming data.
4.7
Analog to Digital Converter (ADC)
The on-chip A/D converter has the following features:
10-bit ADC, ½ LSB accuracy
8 input channels
48 kHz maximum sampling rate
One-shot conversion.
Optional external reference voltage
Vmax = AVdd (max 2.7V)
Result returned in the ADCH and ADCL registers
Figure 4-13 shows the A/D converter circuitry. The ADC input pins
use alternate functions of the Port G pins. The result of an ADC
sample is the analog value measured on the selected pin. To
correctly read an external voltage, the pin being sampled must be
configured as an input in the port direction register (i.e. the RGDIR
register). If the pin is configured as an output, then the result will
indicate the voltage level being driven by the output buffer.