Technical Manual

36
Wireless Sensor Interface A720 (addIT™)
4.1.2. 1/2 Second Interrupt
The interrupt handler will only increment the RTC, when needed (every other inter-
rupt); no other tasks are performed on this interrupt level. The interrupt is generated
by TIMER1 of the microcontroller.
4.1.3. Pulse Counters Interrupt
Interrupts are generated by two pins on the PORTB, having the Interrupt on Change
feature. The interrupt handler must store the previous state of the port, to act only on
a certain level (user programmable, by default is zero). Additionally, a debouncing
mechanism is implemented, allowing for different types of pulses to be counted. By
default, the filter is set at 1 ms (user configurable).
Figure 23. Flow chart of the Pulse Counters Interrupt handlers.
Note: The commands to configure the level and filter values must be documented; they are not yet
implemented in the current version.
4.2. Mode Check
The system has the ability to check two input ports to switch itself in one of four op-
erating modes:
Storage mode: in this mode, the unit is in a stand-by state, possibly stored in a
warehouse. The power supply is reduced to a minimum, by switching off al-
most all the functions of the device: the radio interface, the A/D sampling and
storage (only the battery will be monitored), and the pulse counter interrupts
will be disabled. To further reduce the power consumption, the 0.5 second in-
terrupt is switched to 2 second. However, the software accounts for this
change and the internal RTC will be correctly maintained.
Counter Interrupt
Return
Read
Port Input
Right
Level?
Yes
Arm
Debounce Timer
No
Debounce Timer
Interrupt
Read
Port Input
Return
Right
Level?
Yes
Increment
Counter
No