Specifications

7.4. SOFTWARE DESIGN
configuration, including GSM SIM card PIN number, the address of the
SMTP server, GPRS configuration and details of attached peripherals. Refer
to Appendix C for a complete list of stored data, their types, sizes and
locations. These settings are restored upon initialisation and checked for
consistency before the configuration is accepted. See Section 7.5 on reliability
for further details.
7.4.2 Real Time Clock
The PIC 18F series has a second low power oscillator based around Timer1.
This is clocked at 32.768kHz and divided down by counting 32768 cycles
using Timer1 to produce a high priority interrupt every second. The ISR then
increments a “seconds” global variable, overflowing into minutes, hours, days,
months and years. Leap years are not presently catered-for. This interrupt
must be at the highest priority as the timer counter value must be reset to
32768 as soon as the counter overflows to create a one second delay. If the
timer were not preloaded as soon as the interrupt were generated, the system
would lose time. To account for tolerances in the RTC crystal, a timing
correction factor is implemented. This value may be set by the operator and
is added to, or subtracted from the preload value (32768) at every interrupt.
In this way, the clock can be manually sped-up or slowed-down should it be
necessary.
7.4.3 User interface
The display consists of a two line LCD display with 16 characters per line.
This display ordinarily displays the current time on line one and the system
temperature and battery status on line two. When another event occurs
(such as a peripheral poll or GSM uplink activation), the display changes
to reflect the progress of these activities. The GSM FSM has the highest
priority and will display its connection status irrespective of other FSMs’
states. Assuming the GSM connection is idle, the peripheral polling FSM has
the second highest priority and it will display the status of polled peripherals
on line two only (keeping the current data/time display on line one).
77