12-channels Timer/Counter Board
User Manual, Ver. 2.6, Sep. 2015, PMH-016-26 Page: 3
6.3.3 Digital Input .............................................................................................................................................. 38
6.3.4 Digital Output............................................................................................................................................ 39
6.3.5 Interrupt Control/Status Register of PCI-TMC12(A) .................................................................................. 39
6.4 PCI-TMC12A FEATURES ....................................................................................................................................... 42
6.4.1 Default Shipping Settings for the PCI-TMC12A ......................................................................................... 42
6.4.2 Clock Input for the 8254 Chip .................................................................................................................... 43
6.4.3 Xor-control Register for the PCI-TMC12A .................................................................................................. 45
6.4.4 Block Diagram for the Interrupt System .................................................................................................... 46
6.4.5 New Demo Program .................................................................................................................................. 48
7. PROGRAMMING THE INTEL 8254 ...................................................................................................................... 49
7.1 CONTROL WORD FORMAT ...................................................................................................................................... 49
7.2 COUNTER LATCH COMMAND................................................................................................................................... 51
7.3 READ BACK COMMAND ......................................................................................................................................... 52
7.4 STATUS BYTE FORMAT ............................................................................................................................................ 53
8. DEMO PROGRAMS ............................................................................................................................................ 54
8.1 DEMO PROGRAMS FOR DOS .................................................................................................................................. 55
8.1.1 Demo1: Using the Digital Output .............................................................................................................. 56
8.1.2 Demo2: Using the Digital Input ................................................................................................................. 57
8.1.3 Demo3: Wave Generator ........................................................................................................................... 58
8.1.4 Demo4: Generating a Delay of 1 ms ......................................................................................................... 60
8.1.5 Demo5: 16-bit Event Counter .................................................................................................................... 61
8.1.6 Demo6: Software Counter ......................................................................................................................... 62
8.1.7 Demo7: Watchdog Timer .......................................................................................................................... 63
8.1.8 Demo8: Pulse Width Measurement .......................................................................................................... 65
8.1.9 Demo9: Frequency Measurement ............................................................................................................. 67
8.1.10 Demo10: Find Card Number ..................................................................................................................... 69
8.1.11 Demo11: Count Low Pulse ......................................................................................................................... 70
8.1.12 Demo12: Low Pulse Width ........................................................................................................................ 72
8.1.13 Demo13: High Pulse Width ....................................................................................................................... 75
8.1.14 Ndemo1: Using the LEDs ........................................................................................................................... 77
8.1.15 Ndemo2: Generating Two Starting Clocks Clocks ...................................................................................... 78
8.1.16 Ndemo3: Implementing a Watchdog Timer (Modified Version of Demo7) ............................................... 80
8.1.17 Ndemo4: Implementing an Active High Interrupt ..................................................................................... 82
8.1.18 Ndemo5: Implementing an Active Low Interrupt ...................................................................................... 84
APPENDIX: DAUGHTER BOARD .................................................................................................................................... 86
A1. DB-37 86