Omega Vehicle Security OME-PIO-D56 manual Interrupt Operation

Page 13

2.4Interrupt Operation

All PC0, PC1, PC2 and PC3 can be used as an interrupt signal sources. Refer to Sec. 2.1 for PC0/PC1/PC2/PC3 location. The interrupt of OME-PIO-D56/OME-PIO-D24 is level-trigger & Active_High. The interrupt signal can be programmed to inverted or non-invertedstate. The programming procedure is given as follows:

1.Make sure the initial level is High or Low

2.If the initial state is High Æ select the inverted signal (Sec. 3.3.6)

3.If the initial state is Low Æ select the non-invertedsignal (Sec. 3.3.6)

4.Enable the INT function (Sec. 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 is more than one interrupt source, the interrupt service routine has to identify the active signals via the following steps: (Refer to DEMO5.C)

1.Reads the new status of the interrupt signal source

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

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

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

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

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

7.Saves the new status to old status

Note: If the interrupt signal is too short, the new status may be the 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. It can be as a short as micro-second or as a long as second. In general, 20ms is enough for most operating systems.

OME-PIO-D56/OME-PIO-D24 User Manual (Ver.2.1, Oct/2003)

---- 11

Image 13
Contents User’sGuide Mexico CanadaBenelux Czech RepublicOME-PIO-D56/D24 Table of Contents Introduction FeaturesOrder Description SpecificationsOptions PCI Data Acquisition Family Product ChecklistOME-PISO-series cost-effective generation, isolated cards Board Layout Hardware configurationEnabling I/O Operation I/O Port Location1 DI/DO Port Architecture CON3 Select Sec RESET\ Sec DI Port Architecture CON2 Do Port Architecture CON1 Interrupt Operation If INT signal is Low now Æ select the non-inverted inputMake sure the initial level is High or Low Interrupt output signal of OME-PIO-D56/OME-PIO-D24, INT\ is Interrupt Block Diagram of OME-PIO D56/D24INTCHAN0/1/2/3 COUNTL++ Initialhigh, activelow Interrupt sourceInitiallow, activehigh Interrupt source PC0 PC1 PC2 PC3 Muliti-Interrupt SourceRead all interrupt state OME-DB-37 Daughter BoardsOME-DN-37 OME-DB-8125OME-ADP-20/PCI OME-DB-24PD Isolated Input Board OME-DB-24RD Relay Board OME-DB-24PRD, OME-DB-24POR, OME DB-24C Daughter Board Comparison Table Pin Assignment All signals are TTL compatibleDI0 DI1 DI2 DI3 DI4 DI5 DI6 DI7 DI8 DI9 Resource-allocated information How to Find the I/O AddressPIO/PISO identification information PC’s physical slot informationPIODriverInit&wBoards, wSubVendor,wSubDevice,wSubAux PIODriverInitWSubVendor=0x80 wSubDevice=1 wSubAux=0x40 For D56/D24Printf\nThrer are %d Piopiso Cards in this PC,wBoards OME-PISO-P32C32 Enable all D/I/O operations of card0 PIOGetConfigAddressSpaceEnable all D/I/O operations of card1 ShowPIOPISOwSubVendor,wSubDevice,wSubAux ShowPIOPISOSlot5 0x0A Slot6 0x08 Slot7 0x09 Slot8 0x07 Assignment of I/O AddressAddress Read Write I/O Address MapAUX Control Register RESET\ Control RegisterAUX data Register Aux Status Register INT Mask Control Register7 I/O Selection Control Register Interrupt Polarity Control RegisterRead/Write 8-bit data Register Demo program How to install software & utility?Piopiso PIOPISO.EXE for Windows DEMO1 DEMO2 COUNT=0 DEMO3COUNT++ DEMO4 COUNT++ PC3 DEMO5CNTL1=CNTL2=CNTL3=CNTL4=0 Page WARRANTY/DISCLAIMER Temperature