SNIU028D February 2016 – September 2020 UCD3138 , UCD3138064 , UCD3138064A , UCD3138128 , UCD3138A , UCD3138A64
The ADC12 FSM can “auto-sequence” up to 16 conversions of any combination of ADC channels in a single sequence configuration. The result of each conversion is stored into 16 ADC result registers, representing the raw ADC data. The desired ADC channel for each sequenced conversion is programmed into the ADC sequence select registers. Any of the 16 ADC channels can be programmed into one of the conversion slots configured by the ADC Sequence Select Registers. Also, it is possible to program the same ADC channel into multiple or all of the conversion slots for a given sequence. The conversion sequence always starts with the programmed ADC channel in ADC Sequence Select Register 0 (Bits 3:0). Conversions will continue until the configured number of maximum conversions is reached.
The sequencer can be triggered by the firmware or through a multitude of external trigger sources. The external trigger sources include the rising edge of any DPWM output, any of the 7 Analog Comparator results or the external ADC_EXT_TRIG pin (allowing trigger from off device). Additionally, the sequencer can be configured to perform a single sequence or continually start the sequence of the external trigger source. The sequencer can also be enabled to generate an interrupt to the embedded processor at the end of a sequence.
The start of the sequencer can be delayed from the receipt of an external trigger. A counter within the ADC12 Control Finite State Machine will delay the start of the sequence based on a programmable delay configured by firmware. After the delay, the sequencer will start the conversions. For example, in order to initiate a sequence of measurements 128nS after the ADC_EXT_TRIG pin trips, the following setting should be applied.
AdcRegs.ADCCTRL.bit.EXT_TRIG_SEL = 8; // ADC_EXT_TRIG pin triggers the conversion
AdcRegs.ADCCTRL.bit.EXT_TRIG_DLY = 8; // 8 times 16 ns delay after the pin toggling
AdcRegs.ADCCTRL.bit.EXT_TRIG_EN = 1; // Enable ADC-12 triggering via external sources
Channel Mapping - The ADC12 is utilized to measure both internal and external voltage signals. The 16 inputs to the ADC12 block are referred to by channel numbers. 14 of the ADC Channels are connected to external pins. The remaining 2 channels are tied to an internal temperature sensor and an internal test channel. The following table details the channel mapping utilized on UCD3138.
Channel Number | Internal/External Signal | Description |
---|---|---|
0 | AD-00 | GP Analog Input to ADC12 |
1 | AD-01 | GP Analog Input to ADC12 |
2 | AD-02 | GP Analog Input to ADC12 |
3 | AD-03 | GP Analog Input to ADC12 |
4 | AD-04 | GP Analog Input to ADC12 |
5 | AD-05 | GP Analog Input to ADC12 |
6 | AD-06 | GP Analog Input to ADC12 |
7 | AD-07 | GP Analog Input to ADC12 |
8 | AD-08 | GP Analog Input to ADC12 |
9 | AD-09 | GP Analog Input to ADC12 |
10 | AD-10 | GP Analog Input to ADC12 |
11 | AD-11 | GP Analog Input to ADC12 |
12 | AD-12 | GP Analog Input to ADC12 |
13 | AD-13 | GP Analog Input to ADC12 |
14 | Temp Sensor | Internal Temperature Sensor |
15 | Test Channel | Internal Test Channel (Test Use Only) |