Associate
- Joined
- 27 Aug 2006
- Posts
- 260
hi form my gcse project at school i have made an alarm with a simple circuit cnsisting of a 18x chip
it has 3 outputs
output 0 = led
output 1 = led
output 5 = diren running through a npn transistor
i has 5 inputs
input 0 = ptm (for alarm code)
input 1 = ptm (for tamper proff switch)
input 2 = proximity switch
input 6 = ptm (for aarm code)
input 7 = ptm (for alrm code)
i would like to do if input 1 or 2 are pressed then it would set the leds flashing and the siren sounding whille this is happening i would like to be able to push in a code using input (0,6,7) i have been trying for 4 days and haven't got very far so would u plz help i have a simple prog up to yet but doesnt work here it is
main:
if input1 = 1 then break
if input2 = 0 then break
goto main
break:
high 0
high 1
high 5
if input0 = 1 then first
goto break
first:
if input6 = 1 then second
goto first
second:
if input7 = 1 then third
goto second
third:
if input7 = 1 then forth
goto third
forth:
if input6 = 1 then fifth
goto forth
fifth:
if input0 = 1 then sixth
goto fifth
sixth:
low 0
low 1
low 5
goto main
ps sorry for the shocking spellings
it has 3 outputs
output 0 = led
output 1 = led
output 5 = diren running through a npn transistor
i has 5 inputs
input 0 = ptm (for alarm code)
input 1 = ptm (for tamper proff switch)
input 2 = proximity switch
input 6 = ptm (for aarm code)
input 7 = ptm (for alrm code)
i would like to do if input 1 or 2 are pressed then it would set the leds flashing and the siren sounding whille this is happening i would like to be able to push in a code using input (0,6,7) i have been trying for 4 days and haven't got very far so would u plz help i have a simple prog up to yet but doesnt work here it is
main:
if input1 = 1 then break
if input2 = 0 then break
goto main
break:
high 0
high 1
high 5
if input0 = 1 then first
goto break
first:
if input6 = 1 then second
goto first
second:
if input7 = 1 then third
goto second
third:
if input7 = 1 then forth
goto third
forth:
if input6 = 1 then fifth
goto forth
fifth:
if input0 = 1 then sixth
goto fifth
sixth:
low 0
low 1
low 5
goto main
ps sorry for the shocking spellings