DM5210 analog input module 4-20 RTD Embedded Technologies, Inc.
This flow diagram shows you the steps for taking a single sample on a sequence of channels. After programming
Port B as a Mode 0 output port, you select the starting channel in your sequence of channels to be scanned. After
making your initial channel selection, you must allow for enough of a delay in your program for the selected channel
to settle before starting the first A/D conversion. As soon as the first conversion is started, you can then immediately
select your next channel in the sequence. Once the conversion is started, the signal on the sampled channel has been
“locked in”, and you do not have to wait for an end-of-convert transition before programming the next channel.
Selecting the next channel as soon as the conversion of the previous channel is started ensures that enough time is
allowed for the new channel to settle before the next conversion is started, regardless of your PC type. Except for the
initial delay between the starting channel selection and first conversion, you do not have to be concerned with
building delays into your program and the accuracy of the conversions when following this program structure. Note
that the data you read in the Read LSB, Read MSB steps will always be the data from the previously selected
channel, not the data from the channel selected in the Select Next Channel block.
Start Conversion:
BA + 8 for 12-bit;
BA + 9 for 8-bit
Check
End-of-Convert
EOC = 1?
Yes
No
Select Starting Channel
Read LSB:
BA + 9
(Contains bits 0-3 of 12-bit
conversion)
Continue?
No
Yes
Stop Program
Read MSB:
BA + 8
(Contains bits 4-11 of 12-bit
conversion; bits 0-7 of 8-bit
conversion)
Program 8255 PPI: Port B out
Select Next Channel
Fig. 4-4 — Channel Scanning Flow Diagram
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com