ii
BA + 2: PPI Port C — Digital I/O (Read/Write) .............................................................................................. 4-4
BA + 3: 8255 PPI Control Word (Write Only) ................................................................................................. 4-4
BA + 4: 8254 Timer/Counter 0 (Read/Write) ................................................................................................... 4-6
BA + 5: 8254 Timer/Counter 1 (Read/Write) ................................................................................................... 4-6
BA + 6: 8254 Timer/Counter 2 (Read/Write) ................................................................................................... 4-6
BA + 7: 8254 Control Word (Write Only) ....................................................................................................... 4-6
BA + 8: Read MSB Data/Start 12-Bit Conversion (Read/Write) ..................................................................... 4-7
BA + 9: Read LSB Data/Start 8-Bit Conversion (Read/Write) ........................................................................ 4-7
BA + 10: Read Status/Clear IRQ (Read/Write) ................................................................................................ 4-7
BA + 11: IRQ Enable (Write Only) .................................................................................................................. 4-7
Programming the DM210/DM5210 ....................................................................................................................... 4-8
Clearing and Setting Bits in a Port ..................................................................................................................... 4-8
A/D Conversions .............................................................................................................................................. 4-10
• Initializing the 8255 PPI ............................................................................................................................ 4-10
• Selecting a Channel ................................................................................................................................... 4-10
• Enabling and Disabling Interrupts ............................................................................................................. 4-10
• Starting an A/D Conversion ...................................................................................................................... 4-10
• Channel Scanning ...................................................................................................................................... 4-10
• Monitoring Conversion Status ................................................................................................................... 4-11
• Reading the Converted Data ...................................................................................................................... 4-11
Interrupts .......................................................................................................................................................... 4-12
• What Is an Interrupt? ................................................................................................................................. 4-12
• Interrupt Request Lines ............................................................................................................................. 4-12
• 8259 Programmable Interrupt Controller .................................................................................................. 4-13
• Interrupt Mask Register (IMR) .................................................................................................................. 4-13
• End-of-Interrupt (EOI) Command ............................................................................................................. 4-13
• What Exactly Happens When an Interrupt Occurs? .................................................................................. 4-13
• Using Interrupts in Your Programs ........................................................................................................... 4-13
• Writing an Interrupt Service Routine (ISR) .............................................................................................. 4-13
• Saving the Startup Interrupt Mask Register (IMR) and Interrupt Vector .................................................. 4-15
• Restoring the Startup IMR and Interrupt Vector ....................................................................................... 4-15
• Common Interrupt Mistakes ...................................................................................................................... 4-15
Timer/Counters ................................................................................................................................................ 4-16
Digital I/O ........................................................................................................................................................ 4-17
Example Programs and Flow Diagrams ............................................................................................................... 4-18
C Programs ....................................................................................................................................................... 4-18
BASIC Programs ............................................................................................................................................. 4-18
Flow Diagrams ................................................................................................................................................. 4-18
• Single Convert Flow Diagram (Figure 4-3) ............................................................................................... 4-19
• Channel Scanning Flow Diagram (Figure 4-4) .......................................................................................... 4-19
CHAPTER 5 CALIBRATION ...............................................................................................
5-1
Required Equipment ............................................................................................................................................... 5-3
A/D Calibration ...................................................................................................................................................... 5-4
Unipolar Calibration .......................................................................................................................................... 5-4
Bipolar Calibration ............................................................................................................................................ 5-5
APPENDIX A DM210/DM5210 SPECIFICATIONS ...........................................................
A-1
APPENDIX B P2 CONNECTOR PIN ASSIGNMENTS ....................................................
B-1
APPENDIX C COMPONENT DATA SHEETS ....................................................................
C-1
APPENDIX D WARRANTY AND RETURN POLICY .......................................................
D-1
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com