Omega OME-PIO-D144 manual Interrupt Operation, Make sure the initial level is High or Low

Page 10

2.5Interrupt Operation

The PC0, PC1, PC2, PC3 of CN1_PC can be used as interrupt signal source. Refer to Sec. 2.1 for PC0/1/2/3 location. The interrupt of OME-PIO-D144 is level-trigger

&Active_High. The interrupt signal can be programmed to inverted or non- inverted state. The programming procedure is as follows:

1.make sure the initial level is High or Low

2.if the initial state is High Æ select the inverted signal (Section. 3.3.6)

3.if the initial state is Low Æ select the non-invertedsignal (Section. 3.3.6)

4.enable the INT function (Section. 3.3.4)

5.If the interrupt signal is active Æ program will transfer into the interrupt service routine Æ if INT signal is High now Æ select the inverted input

Æif INT signal is Low now Æ select the non-inverted input

Refer to DEMO3.C & DEMO4.C for single interrupt source. Refer to DEMO5.C for four interrupt sources.

If only one interrupt signal source is used, the interrupt service routine does not have to identify the interrupt source. (Refer to DEMO3.C & DEMO4.C)

If there are more than one interrupt source, the interrupt service routine has to identify the active signals as following: (refer to DEMO5.C)

1.Read the new status of the interrupt signal source

2.Compare the new status with the old status to identify the active signals

3.If PC0 is active, service CN1_PC0 & non-inverter/inverted the CN1_PC0 signal

4.If PC1 is active, service CN1_PC1 & non-inverted/inverted the CN1_PC1 signal

5.If PC2 is active, service CN1_PC2 & non-inverted/inverted the CN1_PC2 signal

6.If PC3 is active, service CN1_PC3 & non-inverted/inverted the CN1_PC3 signal

7.Save the new status to old status

Note: If the interrupt signal is too short, the new status may be as same as old status. So the interrupt signal must be held active until the interrupt service routine is executed. This hold time is different for different operating systems. The hold time can be as short as micro-second or as long as second. In general, 20ms is enough for most operating systems.

OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001)

---- 8

Image 10
Contents User’sGuide Benelux CanadaMexico Czech RepublicOME-PIO-D144 Table of Contents Demo Program All signals are TTL compatible SpecificationsProduct Check List Hardware configuration Board LayoutI/O Port Location Enable I/O OperationRefer to DEMO1.C for demo program O Architecture Interrupt Operation If INT signal is Low now Æ select the non-inverted inputMake sure the initial level is High or Low Refer to DEMO3.C for source code Refer to DEMO4.C for source code CN1PC0 CN1PC1 CN1PC2 CN1PC3 If PC1 is active OME-DN-37 & OME-DN-50 Daughter BoardsOME-DB-37 OME-DB-8125OME-ADP-37/PCI & OME-ADP-50/PCI OME-PIO-D144 OME-DB-24P/24PD Isolated Input BoardOME-DB-24P OME-DB-24PD OME-DB-24R/24RD Relay Board OME-DB-24PR OME-DB-24PR/24POR/24CCOM OME-DB-24PR Daughter Board Comparison Table VCC Pin AssignmentGND OME-PIO-D144 User’s Manual Ver.2.1, Sep/2001 PIO/PISO identification information How to Find the I/O AddressResource-allocated information PC’s physical slot informationOME-PISO-P32A32 OME-PIO-821OME-PISO-P32C32 OME-PISO-P8R8PIODriverInit PIODriverInit&wBoards, wSubVendor,wSubDevice,wSubAuxPIOGetConfigAddressSpace ShowPIOPISO Assignment of I/O Address Slot5 0x0A Slot6 0x08 Slot7 0x09 Slot8 0x07OME-PIO-D144 User’s Manual Ver.2.1, Sep/2001 I/O Address Map RESET\ Control RegisterRESET\ Address Read WriteINT Mask Control Register AUX Control RegisterAUX data Register CN1PC3 CN1PC2 CN1PC1 CN1PC0Aux Status Register Interrupt Polarity Control RegisterRead/Write 8-bit data Register Active I/O Port Control RegisterCN4PC CN4PB CN4PA CN3PC CN3PB CN3PA 9 I/O Selection Control RegisterCN2PC CN2PB CN2PA CN1PC CN1PB CN1PA CN6PC CN6PB CN6PA CN5PC CN5PB CN5PA\TC\LARGE\DEMO?\ \TC\LARGE\\TC\LARGE\LIB\ \TC\LARGE\LIB\PIO.HOME-PIO-D144.H Demo1 Use D/O of CN1 CN3 CN4 Demo2 Use D/O of CN1~CN6 PA/PB/PC Demo3 Interrupt demo1 COUNT=0Refer to Sec .5.1 for more information Demo4 Interrupt demo2 Refer to Sec .5.2 for more information Demo5 Interrupt demo3 CN1PC1 OME-PIO-D144 User’s Manual Ver.2.1, Sep/2001 Demo 6 Outport of CN1-CN6 OME-PIO-D144 User’s Manual Ver.2.1, Sep/2001 Demo10 Find Card Number OME-PIO-D144 User’s Manual Ver.2.1, Sep/2001 WARRANTY/DISCLAIMER Temperature