ii
•
Contents
3.2
I/O Address Map................................................................14
3.3
Digital Data Registers.......................................................15
3.4
Control Register...............................................................15
3.5
External Trigger Enable Register......................................17
3.6
External Trigger Disable Register.....................................17
3.7
Change of State (COS) Control Register...........................17
3.8
Interrupt Source Control (ISC) Register.............................18
3.9
Clear Interrupt Register....................................................18
3.10
Timer/Counter Register.....................................................19
3.11
High Level Programming..................................................19
Chapter 4 Operation Theorem................................20
4.1
Digital I/O Ports.................................................................20
4.1.1
Introduction.....................................................................................20
4.1.2
External Trigger.............................................................................20
4.2
8254 Timer/Counter Operation..........................................21
4.2.1
Introduction.....................................................................................21
4.2.2
Cascaded 32 bits Timer..............................................................22
4.2.3
Event Counter and Edge Control..............................................22
4.3
Interrupt Circuit.................................................................22
4.3.1
System Architecture....................................................................22
4.3.2
IRQ Level Setting...........................................................................22
4.3.3
Dual Interrupt System..................................................................22
4.3.4
Interrupt Source Control (ISC)...................................................23
4.3.5
Change of State (COS) Interrupt...............................................24
4.4
12V and 5V Power Supply................................................25
Chapter 5 C/C++ Libraries.......................................26
5.1
Libraries Installation........................................................26
5.2
Programming Guide .........................................................27
5.2.1
Naming Convention......................................................................27
5.2.2
Data Types......................................................................................27
5.3
_7396_Initial......................................................................28
5.4
_7396_DI............................................................................28
5.5
_7396_DO..........................................................................30
5.6
_7396_Config_Port ............................................................30
5.7
_7396_Software_Reset......................................................33
5.8
_7396_INT_Source_Control ...............................................33
5.9
_7396_COSIRQ_Control.....................................................34