DM5210 analog input module 4-19 RTD Embedded Technologies, Inc.
The following paragraphs provide a description and flow diagrams for performing A/D conversions and channel
scanning. These diagrams will help you to build your own custom applications programs.
• Single Convert Flow Diagram (Figure 4-3)
This flow diagram shows you the steps for taking a single sample on a selected channel. A sample is taken each
time you send the Start Convert command. All of the samples will be taken on the same channel and until you change
the channel by writing a new value to the bottom four bits in the PPI Port B register (BA + 1). Changing this value
before each Start Convert command is issued lets you take the next reading from a different channel.
• Channel Scanning Flow Diagram (Figure 4-4)
Start Conversion:
BA + 8 for 12-bit;
BA + 9 for 8-bit
Check
End-of-Convert
EOC = 1?
Yes
No
Select Channel
Read LSB:
BA + 9
(Contains bits 0-3 of 12-bit
conversion)
Continue?
No
Yes
Stop Program
Change Channel?
No
Yes
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
Fig. 4-3 — Single Conversion Flow Diagram
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com