Without Automatic Settling Time Control:
Æ
Setup the conversion in the ADC Control Register ADCCONT
Æ
Poll for SETTL_BUSY flag
Æ
After settling time has elapsed, write to the ADC Conversion Start Register ADCCONV to start conversion
Æ
Poll for ADC_BUSY flag
Æ
After conversion time has elapsed, read conversion data in the ADC Data Register ADCDATA
With Automatic Settling Time Control:
Æ
Setup the conversion in the ADC Control Register ADCCONT
Æ
Poll for SETTL_BUSY flag
Æ
Poll for ADC_BUSY flag
Æ
After conversion time has elapsed, read conversion data in the ADC Data Register ADCDATA
6.2.2 Sequencer Mode
The Sequencer Mode is very useful for periodic measurements or to always provide actual conversion data. The
sequencer converts all enabled ADC channels and stores the results in the Sequencer Data RAM. After a
programmable time the sequencer repeats the sequence.
To use the sequencer, all channels must be configured for the sequence in the Sequencer Instruction RAM. In the
Sequencer Instruction RAM the channels are enabled for the sequence, and the gain and the mode (single-ended
or differential) are selected.
Once the sequencer is started, all enabled channels are converted and the results are stored in the Sequencer
Data RAM. When the last sequencer instruction has been completed, the Data Available Flag DATA_AV in the
Sequencer Status Register (ADCSEQSTAT) is set to '1' and, if enabled, an interrupt request will be asserted. The
user can now read the ADC data from the Sequencer Data RAM (note: only the enabled channels are updated;
Channels not enabled in the Sequencer Instruction RAM are not updated and may contain invalid data from
former conversions). After that, the DATA_AV flag must be cleared by writing a '1' to the Sequencer Status
Register ADCSEQSTAT bit 0.
The repeat frequency of the sequencer can be programmed in the Sequencer Timer Register. The Sequencer
Timer is programmable from 100μs to 6.5535s in steps of 100μs. Whenever the timer reaches the programmed
value, the sequencer starts a new sequence.
A special function is the Sequencer Continuous Mode. It is activated if the Sequencer Timer Register is set to
0x0000. In this mode the sequencer immediately starts a new sequence when the actual sequence has been
completed. If the sequencer is in Sequencer Continuous Mode, the user can read valid data from the Sequencer
Data RAM at any time. The Sequencer Data RAM locations of the enabled ADC channels are updated with every
sequence.
If the Sequencer Continuous Mode is active, the Timer Error Flag (TIMER_ERROR) and the Data Overflow Error
Flag (DATA_OVERFLOW_ERROR) are not active and will read as ‘0’. Clearing the Data Available Flag
DATA_AV is not necessary in the Sequencer Continuous Mode (it will not produce an interrupt), but it may be
useful in order to monitor the completion of the sequences.
The sequencer may also be triggered by an external signal instead of the timer. In this case the Timer Error Flag
(TIMER_ERROR) is not active. A new external trigger is accepted only after a sequence has completed. An
external trigger while the sequencer runs is ignored.
The update rate depends on the number of enabled channels:
Update Rate = 16μs
Â
number of enabled channels
TPMC851 User Manual Issue 1.0.9
Page 49 of 65