Function groups 17
Manual ADQ-22/23-Serie Rev. 1.1
Function groups
Digital input port
Bitmask
Bitmask
IRQ
b0
b
x
Fig. 7: Bit change
Example for bit change:
• By passing the value FFHex in the parameter
uiPortBitChangeRisingEdge
of the
structure
SADQIRQEnable
in function
adqEnableIRQ()
for example, all bits of a
port are monitored for rising edge. If only individual bits are to be monitored (e.g. moni-
toring bit b2 for a rising edge), the corresponding bit of the mask must be set to „1“ (e.g.
uiPortBitChange RisingEdge
= 04Hex).
• An interrupt is triggered as soon as a rising edge arrives at bit b2.
• The interrupt event is evaluated with the parameters
uiPortBitChangeRisingEdge
or
uiPortBitChangeFallingEdge
of the structure
SADQIRQ Status
in function
adqWaitIRQ()
. You receive the information which bit has triggered the interrupt with
which edge (rising/falling)..
3.2.3.3.2 Bit pattern comparison
In the operating mode „bit pattern comparison“, a previously defined reference bit pattern is
compared with the bit pattern present at the corresponding input port. If the bit patterns are
identical, an interrupt is triggered (see Fig. 7).
==
Digital input port
Reference bit pattern
IRQ
b0
b
x
Fig. 8: Bit pattern comparison