Main Page | Projects Index Gallery IndexSite log

 

Coded Alarm for use with the GPC(A)board

Overview

 

As mentioned previously the first application for the GPC would be a coded intruder alarm.

The alarm system will need to retain its settings in PIC flash and be capable of responding to
a number of Set/Unset user codes. Ideally the entry, exit and alarm times will need to be
configurable and also retained in flash.

The alarm will employ two Zones, the first being the entry/exit zone (if triggered there will be
a delay before the alarm is sounded in order to give the user time to enter a valid code) and the
second would be a zone that will immediately trigger an alarm.

 

How it works

A practical alarm system requires several steady states (e.g. Set/Unset) and some
transitional states ( e.g. Setting/Un-setting) in order to achieve the overall function.

As part of these alarm sequences it was soon realised that one of the most difficult to achieve,
would be when the alarm system is Set and is counting down to alarm, after the user has entered
via the entry/exit zone.

This requires that the processor simultaneously handles the count down to alarm while
decoding key entries. At first consideration this did not seem to be a problem,
however it was soon realised that if the user pauses the countdown in order to enter
an entry code this would effectively stop the alarm from sounding.

Attempts to integrate accurate timing loops into the keyboard scanning routines proved to
be messy and unreliable. This effectively led to the use of timer derived interrupts
in order to meet the program requirements.

These timer derived interrupts would be employed in order to keep track of system
timing, while the running program would handle the keyboard scanning and decoding.

The flow diagram below illiterates the overall operation of the software .

Some of these screens are shown below:

The Boot and Main Manu Screens.

   

The Presets and Timers sub menus.

    

The Setting and Set screens.

   

The Alarm and Alarm Countdown screens.

   


 

 
 

Links:

The Assembly and Compiled Hexidecimal code for this project is given below: 

- Assembly Code  - Coded Alarm Program V0.14

 - Hexadecimal Code - Coded Alarm Program V0.14 

 

 

 

 Last Edit: 20160121 - 21:48