2
PICAXE-08 ALARM PROJECT
revolution
© copyright 2002 - AXE102 Alarm Student Project Notes Version 1.1
Revolution Education Ltd. Email: [email protected] Web: www.rev-ed.co.uk
2
Supported by:
B
LOCK
D
IAGRAMS
The electronic system that makes up the alarm system be drawn as a ‘block diagram’.
The smoke sensor and keypad provide information to the microcontroller, and so these
are known as ‘inputs’. The microcontroller then ‘decides’ how to behave and may then
operate the outputs e.g. make the siren and strobe switch on or display a message on the
Liquid Crystal Display (LCD).
W
HAT
IS
THE
PICAXE S
YSTEM
?
The microcontrollers used in devices such as the alarm can be difficult to program, as
they generally use a complicated programming language called ‘assembler code’, which
can be quite difficult to learn.
The PICAXE system makes the microcontrollers much easier to program. The control
sequence can be drawn (and simulated) on the computer as a flowchart, or written in a
simpler programming language called BASIC. This makes it much easier to use the
microcontroller as the complicated ‘assembler code’ does not need to be learnt.
A sample BASIC program and flowchart are shown here. In this case both programs do
the same thing - flash a light (connected to output 0) on and off every second.
main:
high 0
wait 1
low 0
wait 1
goto main
start
high 0
low 0
wait 1
wait 1
LCD
strobe
microcontroller
INPUT
PROCESS
OUTPUT
smoke
siren
keypad
1
2
3
4
5
6
7
8
9
0
#