6.2.3 Application Examples
The following examples all use interrupts. The use of interrupts can be replaced by polling the according status
flags in the ADC Status Register or the Sequencer Status Register.
6.2.3.1 Fastest Conversion of an arbitrary Single Channel
Æ
Program the desired channel and gain in the ADC Control Register ADCCONT. Activate the Automatic
Settling Time Control (ASTC = '1') and the IRQ after Conversion (IRQC = '1')
Æ
The channel is now converted without any further user action. After completion of the conversion an interrupt
is issued which signals that the conversion data is available in the ADCDATA Register
Æ
Acknowledge the Interrupt in the ADC Status Register ADCSTAT (ADC_READY = '1') and read ADCDATA
Figure 6-1 : Flow: Fastest conversion of an arbitrary single channel
Conversion time is approx. 17.25μs.
6.2.3.2 Fastest Conversion of a specific Single Channel
Æ
Program the ADC Control Register with desired channel and gain and activate the IRQ after Settling Time
(IRQS = '1') and the IRQ after Conversion (IRQC = '1')
Æ
When the IRQ after Settling Time is issued, the channel is ready for conversion. Write to the ADC Conversion
Start Register ADCCONV and acknowledge the Interrupt in the ADC Status Register ADCSTAT (SETTL_IRQ
= '1')
TPMC851 User Manual Issue 1.0.9
Page 51 of 65