Instruction manual

AMPDIO DRIVERS
5.2 Register Grouping........................................................................................................................... 62
5.2.1 Cluster X, Y and Z Groups.......................................................................................................... 62
5.2.2 Counter Connection Register Group........................................................................................... 62
5.2.3 Interrupts Group .......................................................................................................................... 62
5.3 The Drivers View of The Register Layout ....................................................................................... 62
5.4 The Register Details ....................................................................................................................... 65
5.4.1 82C55 Programmable Peripheral Interface Registers................................................................. 65
5.4.1.1 82C55 Programmable Peripheral Interface PPI Data Register Port A .................................... 65
5.4.1.2 82C55 Programmable Peripheral Interface PPI Data Register Port B .................................... 66
5.4.1.3 82C55 Programmable Peripheral Interface PPI Data Register Port C .................................... 67
5.4.1.4 82C55 Programmable Peripheral Interface PPI Command Register ...................................... 68
5.4.2 82C54Counter Timer Registers................................................................................................... 70
5.4.2.1 82C54 Counter 0 Data Register .............................................................................................. 70
5.4.2.2 82C54 Counter 1 Data Register .............................................................................................. 71
5.4.2.3 Counter 2 Data Register.......................................................................................................... 72
5.4.2.4 Counter/Timer Control Register............................................................................................... 73
5.4.3 Clock and Gate Configuration Registers..................................................................................... 75
5.4.3.1 Group Clock Connection Registers ......................................................................................... 76
5.4.3.2 Group Gate Connection Registers .......................................................................................... 77
6 PROGRAMMING WITH THE AMPDIO DRIVER............................................................................... 79
6.1 Windows DLL and Examples .......................................................................................................... 79
6.2 Support in DOS............................................................................................................................... 79
6.2.1 Windows Library Source Code.................................................................................................... 79
6.3 Using the Dynamic Link Library ...................................................................................................... 80
6.3.1 C/C++.......................................................................................................................................... 80
6.3.1.1 Microsoft C/C++....................................................................................................................... 80
6.3.1.2 Borland C++............................................................................................................................. 80
6.3.2 Visual Basic 5.0 and 6.0.............................................................................................................. 81
6.3.3 Delphi 3.0 Onwards..................................................................................................................... 82
6.3.4 Visual Basic .NET........................................................................................................................ 83
6.3.5 Visual C# .NET............................................................................................................................ 85
6.4 DIO_TC.DLL Library Functions....................................................................................................... 86
6.4.1 Initialization Functions................................................................................................................. 87
6.4.1.1 Register a Board with the Library registerBoard................................................................. 87
6.4.1.2 Extended Register Board Function registerBoardEx .......................................................... 88
6.4.1.3 Register a PCI Board by Model, Bus and Slot Position registerBoardPci........................... 88
6.4.1.4 Get the Model Number of a Board GetBoardModel............................................................ 89
6.4.1.5 Get Board Base Address GetBoardBase............................................................................ 90
6.4.1.6 Get Board IRQ GetBoardIRQ ............................................................................................. 90
6.4.1.7 Get Board PCI Bus Position GetBoardPciPosition.............................................................. 90
6.4.1.8 Unregister a Board FreeBoard............................................................................................ 91
6.4.1.9 Get Driver Version DIO_TC_driverVersion......................................................................... 91
6.4.1.10 Get DLL Version DIO_TC_dllVersion.................................................................................. 92
6.4.1.11 Get Hardware Version DIO_TC_hardwareVersion............................................................. 92
6.4.1.12 Get Real Hardware Version DIO_TC_realHardwareVersion.............................................. 93
6.4.1.13 Control Hardware Reinitialization DIO_TC_SetResetOnRegister ...................................... 94
6.4.1.14 Check Whether Hardware Will be Reinitialized DIO_TC_GetResetOnRegister................. 94
6.4.2 Interrupt Control Functions.......................................................................................................... 95
6.4.2.1 Enable a Board's Interrupts enableInterrupts...................................................................... 95
6.4.2.2 Disable a Board's Interrupts disableInterrupts .................................................................... 95
6.4.2.3 Check whether a Board's Interrupts are Enabled interruptsEnabledP................................ 96
6.4.2.4 Enable a Board's Interrupt Source(s) setIntMask ............................................................... 96
6.4.2.5 Check Which Interrupt Sources are Enabled getIntMask ................................................... 97
6.4.2.6 Read Interrupt Status Register getIntStat........................................................................... 97
6.4.2.7 Enable an Individual Interrupt Source TCenableInterruptChip............................................ 98
6.4.2.8 Disable an Individual Interrupt Source TCdisableInterruptChip .......................................... 99
6.4.3 Thread Priority Control ................................................................................................................ 99
6.4.3.1 Set Real Time Priority DIO_TC_getrealtimepriority ............................................................ 99