ii
Programming the DM5806 .................................................................................................................................... 4-7
Clearing and Setting Bits in a Port .................................................................................................................... 4-8
Initializing the 8255 PPI .................................................................................................................................... 4-9
Digital I/O Operations ....................................................................................................................................... 4-9
Timer/Counters .................................................................................................................................................. 4-9
Interrupts.......................................................................................................................................................... 4-11
What Is an Interrupt ................................................................................................................................... 4-11
Interrupt Request Lines ............................................................................................................................... 4-11
8259 Programmable Interrupt Controller.................................................................................................... 4-11
Interrupt Mask Register (IMR)....................................................................................................................4-11
End-of-Interrupt (EOI) Command ..............................................................................................................4-11
What Exactly Happens When an Interrupt Occurs ................................................................................... 4-11
Using Interrupts in Your Programs ............................................................................................................. 4-12
Writing an Interrupt Service Routine (ISR) ................................................................................................ 4-12
Saving the Startup Interrupt Mask Register (IMR) and Interrupt Vector ................................................... 4-13
Restoring the Startup IMR and Interrupt Vector......................................................................................... 4-14
Common Interrupt Mistakes........................................................................................................................ 4-14
Example Programs ............................................................................................................................................... 4-14
C and Pascal Programs .................................................................................................................................... 4-14
BASIC Programs ............................................................................................................................................. 4-14
APPENDIX A — DM5806 SPECIFICATIONS .................................................................................. A-1
APPENDIX B — I/O CONNECTOR PIN ASSIGNMENTS ............................................................. B-1
APPENDIX C — COMPONENT DATA SHEETS............................................................................. C-1
APPENDIX D — WARRANTY............................................................................................................ D-1