Technical Manual

34
Wireless Sensor Interface A720 (addIT™)
4. Software
The software is written entirely in C. It consists of a collection of standard C library
functions, a minimalistic operating system (AMOS – Adcon Minimal Operating Sys-
tem) offering basic configuration and administration functions (including a com-
mand line terminal on a serial port), and the application software itself which assures
the desired functionality of the device.
Figure 21. General structure of the A720 software.
4.1. AMOS
Most of its time, the system is in sleep mode. Each 0.5 seconds, an interrupt is gener-
ated by the local 32.76 Khz crystal based real time clock (RTC). AMOS will check
what tasks need attention (i.e. must be executed) and pass them the control accord-
ingly. After all the tasks have finished their jobs, AMOS brings the system back to
sleep. The 0.5 seconds interrupt routine is used to increment the RTC.
In parallel to the normal, regular operation of the AMOS, the system responds to the
pulse counter interrupts (they are generated by two inputs on the microcontroller
and are used for event counting, e.g. rain gauges). These interrupts are handled by a
separate routine.
One of the main concerns of the software design is the power consumption of the de-
vice. The software must assure that all the peripherals are left in the correct state in
AMOS
Hardware
Device
Drivers
Device
Drivers
Standard
C Library
Task 1
Task 2
Task 3
Task 4