DA70131-1/3E
IV-9
2-4. Check and clear any existing input-change interrupts
When the port status set in the previous section changes, an input-change interrupt will occur. This section
describes how to check and clear this interrupt.
1) When the whole address map is used
Note 1: In the address creation step above, the program shifts the LOOP variable one bit left (2x). This is
because the address number to read increases by 2 each time the loop is executed.
Note 2: The number of loop executions will always be less than 16. This is because one read loop can obtain
the data for 4 local devices. (64 / 4 = 16)
Start
Outpw (Add, Data)
Write back the data you just read in order to clear the
change-interrupt flag.
End
Assume that the routine is started by an interrupt being
issued;
_____
INT
= LOW.
Sts = Inpw (0x0000h)
Read the status data in the center device.
IOPC = 1 ?
NO
YES
Loop = 0
WORK = LOOP << 1
Add = 0 WORK
Data = Inpw (Add)
- Shift the loop variable 1 bit left to create the read
address.
- Read the contents of the address that was created.
A
Input change?
NO
YES
Process specified by the user
In this step, process all the flags that have become HIGH
(the other flags do not need to be processed.)
A
Although this example checks the interrupt flags on all the
addresses by using loop processing, you can check just
the areas required.
The bit positions which are HIGH correspond to device
and port numbers whose input has changed.
Note 2
Note 1
Loop = Loop + 1
IOPC = 16 ?
YES
NO
Содержание Motionnet G9001A
Страница 1: ...DA70131 1 3E G9001A G9002A User s Manual Center device I O device Remote I O Remote Motion...
Страница 7: ...DA70131 1 3E I 1 I Center device G9001A User s Manual...
Страница 8: ...DA70131 1 3E I 2...
Страница 50: ...DA70131 1 3E I 44...
Страница 51: ...DA70131 1 3E II 1 II I O device G9002A User s Manual...
Страница 52: ...DA70131 1 3E II 2...
Страница 66: ...DA70131 1 3E II 16...
Страница 67: ...DA70131 1 3E III 1 III Connection Examples and Recommended Environments G9000 Series...
Страница 68: ...DA70131 1 3E III 2...
Страница 87: ...DA70131 1 3E IV 1 IV Software Examples flow chart G9001A...
Страница 88: ...DA70131 1 3E IV 2...