andyquirot
Member
Help Help please 28x1 and lcd MY FAULT SORRY
Hi all i am writing a small program for a project to monitor Disabled toilits alarms
The first test program works in the simulator and on my board. The second program works on the simulator BUT NOT on my board.
Pin 0 = high
prog 1 on the sim works ok, displays world news
prog 1 on my board works ok, displays world news
prog 2 on the sim works ok, displays world news
prog 2 on my board works ok, displays world news
Now the strange bit?????
Pin1 = high
prog 1 on the sim works ok, displays Bagage reclame
prog 1 on my board works ok, displays Bagage reclame
prog 2 on the sim works ok, displays Bagage reclame
prog 2 on my board NOT WORKING , displays .....................
no its not my board
no its not the display
no is not the psu
As you can see i have been removing symboles and trying to free up memory i will keep trying different things but would welcome any HELP
Thank you Andy Quirot (Jersey Channel Islands)
-----------------------------------------------prog1:----------------------------------
Main:
b9=b9+1 ' Display dot counter
if b9=<16 then
serout 7,T2400,(".")
else
b9=0
serout 7,T2400, (254,1)
pause 30
endif
if pin0 = 1 then gosub alarm1
if pin1 = 1 then gosub alarm2
if pin2 = 1 then gosub alarm3
if pin3 = 1 then gosub alarm4
if pin4 = 1 then gosub alarm5
pause 100
'low sounder
'low led
goto main
Alarm1:
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," WORLD NEWS ")
pause 1000
return
Alarm2:
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," BAGGAGE RECLAIM ")
pause 1000
return
Alarm3:
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," STARBUCKS ")
pause 1000
return
Alarm4:
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," ATM AIRSIDE ")
pause 1000
return
Alarm5:
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," DUTY FREE CP6 ")
pause 1000
return
------------------------------------------------prog2---------------------------
' alarm In 0 pin 11 World News
' alarm In 1 pin 12 Bagage Reclame
' alarm In 2 pin 13 Starbucks
' alarm In 3 pin 14 ATM Airside
' alarm In 4 pin 15 Duty Free CP6
' alarm In 5 pin 16 Gate 12
' alarm In 6 pin 17 Gate 6
' alarm In 7 pin 18 JLF 1St Floor
' Mute button on pin 02
' Pizeo Output 6 Pin 27
' led output 5 Pin 28
let dirsc = %00000000
'symbol World news alarm = pin0
'symbol Baggage Alarm= pin1
'symbol Starbucks = pin2
'symbol Atm Airside = pin3
'Symbol pin4 = pin4
'Symbol pin5 = pin5
'symbol pin6 = pin6
'symbol pin7 = pin7
'symbol 1 = 1
symbol ok = 0
symbol led = 5
Symbol Sounder = 6
Symbol worldnews = b0
Symbol Baggage = b1
Symbol Starbucks = b2
Symbol ATM = b3
Symbol Dutyfree = b4
Symbol Gate12 = b5
Symbol Gate6 = b6
Symbol JLF = b7
symbol Mutebutton = b8
#picaxe 28x1
Main:'*********************** MAIN PROGRAM *******************
b9=b9+1 ' Display dot counter
if b9=<16 then
serout 7,T2400,(".")
else
b9=0
serout 7,T2400, (254,1)
pause 30
endif
if pin0 = 1 then goto alarm
if pin1 = 1 then goto alarm
if pin2 = 1 then goto alarm
if pin3 = 1 then goto alarm
if pin4 = 1 then goto alarm
if pin5 = 1 then goto alarm
if pin6 = 1 then goto alarm
if pin7 = 1 then goto alarm
pause 100
low sounder
low led
goto main
alarm:' **************************** ALARM **************************
'high Sounder
pause 100
'readadc 0,mutebutton
if pin0 = 1 then gosub Alarmstate1
if pin0 = ok and Worldnews = 1 then goto asa1
if Mutebutton => 5 then mute
if pin1 = 1 then gosub Alarmstate2
if pin1 = ok and Baggage = 1 then goto asa2
if Mutebutton => 5 then mute
if pin2 = 1 then gosub Alarmstate3
if pin2 = ok and Starbucks = 1 then goto asa3
if Mutebutton => 5 then mute
if pin3 = 1 then gosub Alarmstate4
if pin3 = ok and ATM = 1 then goto asa4
if Mutebutton => 5 then mute
if pin4 = 1 then gosub Alarmstate5
if pin4 = ok and Dutyfree = 1 then goto asa5
if Mutebutton => 5 then mute
if pin5 = 1 then gosub Alarmstate6
if pin5 = ok and Gate12 = 1 then goto asa6
if Mutebutton => 5 then mute
if pin6 = 1 then gosub Alarmstate7
if pin6 = ok and Gate6 = 1 then goto asa7
if Mutebutton => 5 then mute
if pin7 = 1 then gosub Alarmstate8
if pin7 = ok and Jlf = 1 then goto asa8
readadc 0,mutebutton
if Mutebutton => 5 then mute
low Sounder
'untitled
'tune 6, 8,($40,$44,$50,$55,$57)
pause 500
goto alarm
goto main
Alarmstate1:
Worldnews = 1
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," WORLD NEWS ")
pause 1000
return
Alarmstate2:
Baggage = 1
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," BAGGAGE RECLAIM ")
pause 1000
return
Alarmstate3:
Starbucks = 1
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," STARBUCKS ")
pause 1000
return
Alarmstate4:
ATM = 1
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," ATM AIRSIDE ")
pause 1000
return
Alarmstate5:
Dutyfree = 1
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," DUTY FREE CP6 ")
pause 1000
return
Alarmstate6:
Gate12 = 1
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," GATE 12 ")
pause 1000
return
Alarmstate7:
Gate6 = 1
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," GATE 6 ")
pause 1000
return
Alarmstate8:
Jlf = 1
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," JLF 1ST FLOOR ")
pause 1000
return
reset1:
low sounder
low led
goto main
mute:' ******************** MUTE *********************************
low Sounder ' turn buzz off
high Led ' turn led on
if pin0 = 1 and Worldnews = ok then reset1
if pin1 = 1 and Baggage = ok then reset1
if pin2 = 1 and Starbucks = ok then reset1
if pin3 = 1 and Atm = ok then reset1
if pin4 = 1 and Dutyfree = ok then reset1
if pin5 = 1 and Gate12 = ok then reset1
if pin6 = 1 and Gate6 = ok then reset1
if pin7 = 1 and Jlf = ok then reset1
if pin0 = ok and Worldnews = 1 then goto as01
if pin1 = ok and Baggage = 1 then goto as02
if pin2 = ok and Starbucks = 1 then goto as03
if pin3 = ok and Atm = 1 then goto as04
if pin4 = ok and Dutyfree = 1 then goto as05
if pin5 = ok and Gate12 = 1 then goto as06
if pin6 = ok and Gate6 = 1 then goto as07
if Jlf = ok and Jlf = 1 then goto as08
if pin0 = 0 and pin1 = 0 and pin2 = 0 and pin3 = 0 and pin4 = 0 and pin5 = 0 and pin6 = 0 and pin7 = 0 then goto Allok
if pin0 = 1 then
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," WORLD NEWS ")
pause 1000
endif
if pin1 = 1 then
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," BAGGAGE RECLAIM ")
pause 1000
end if
if pin2 = 1 then
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," STARBUCKS ")
pause 1000
end if
if pin3 = 1 then
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," ATM AIRSIDE ")
pause 1000
end if
if pin4 = 1 then
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," DUTY FREE CP6 ")
pause 1000
end if
if pin5= 1 then
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," GATE 12 ")
pause 1000
end if
if pin6 = 1 then
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," GATE 6 ")
pause 1000
end if
if pin7 = 1 then
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," JLF 1ST FLOOR ")
pause 1000
end if
pause 100
low Led
pause 100
goto mute
as01:
Worldnews = ok
goto mute
as02:
Baggage = ok
goto mute
as03:
Starbucks = ok
goto mute
as04:
ATM = ok
goto mute
as05:
Dutyfree = ok
goto mute
as06:
Gate12 = ok
goto mute
as07:
Gate6 = ok
goto mute
as08:
Jlf = ok
goto mute
asa1:
Worldnews = ok
goto reset1
asa2:
Baggage = ok
goto reset1
asa3:
Starbucks = ok
goto reset1
asa4:
ATM = ok
goto reset1
asa5:
Dutyfree = ok
goto reset1
asa6:
Gate12 = ok
goto reset1
asa7:
Gate6 = ok
goto reset1
asa8:
Jlf = ok
goto reset1
Allok:
if pin0 = ok and pin1 = ok and pin2 = ok and pin3 = ok and pin4 = ok and pin5 = ok and pin6 = ok and pin7 = ok then goto reset1
goto alarm
Hi all i am writing a small program for a project to monitor Disabled toilits alarms
The first test program works in the simulator and on my board. The second program works on the simulator BUT NOT on my board.
Pin 0 = high
prog 1 on the sim works ok, displays world news
prog 1 on my board works ok, displays world news
prog 2 on the sim works ok, displays world news
prog 2 on my board works ok, displays world news
Now the strange bit?????
Pin1 = high
prog 1 on the sim works ok, displays Bagage reclame
prog 1 on my board works ok, displays Bagage reclame
prog 2 on the sim works ok, displays Bagage reclame
prog 2 on my board NOT WORKING , displays .....................
no its not my board
no its not the display
no is not the psu
As you can see i have been removing symboles and trying to free up memory i will keep trying different things but would welcome any HELP
Thank you Andy Quirot (Jersey Channel Islands)
-----------------------------------------------prog1:----------------------------------
Main:
b9=b9+1 ' Display dot counter
if b9=<16 then
serout 7,T2400,(".")
else
b9=0
serout 7,T2400, (254,1)
pause 30
endif
if pin0 = 1 then gosub alarm1
if pin1 = 1 then gosub alarm2
if pin2 = 1 then gosub alarm3
if pin3 = 1 then gosub alarm4
if pin4 = 1 then gosub alarm5
pause 100
'low sounder
'low led
goto main
Alarm1:
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," WORLD NEWS ")
pause 1000
return
Alarm2:
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," BAGGAGE RECLAIM ")
pause 1000
return
Alarm3:
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," STARBUCKS ")
pause 1000
return
Alarm4:
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," ATM AIRSIDE ")
pause 1000
return
Alarm5:
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," DUTY FREE CP6 ")
pause 1000
return
------------------------------------------------prog2---------------------------
' alarm In 0 pin 11 World News
' alarm In 1 pin 12 Bagage Reclame
' alarm In 2 pin 13 Starbucks
' alarm In 3 pin 14 ATM Airside
' alarm In 4 pin 15 Duty Free CP6
' alarm In 5 pin 16 Gate 12
' alarm In 6 pin 17 Gate 6
' alarm In 7 pin 18 JLF 1St Floor
' Mute button on pin 02
' Pizeo Output 6 Pin 27
' led output 5 Pin 28
let dirsc = %00000000
'symbol World news alarm = pin0
'symbol Baggage Alarm= pin1
'symbol Starbucks = pin2
'symbol Atm Airside = pin3
'Symbol pin4 = pin4
'Symbol pin5 = pin5
'symbol pin6 = pin6
'symbol pin7 = pin7
'symbol 1 = 1
symbol ok = 0
symbol led = 5
Symbol Sounder = 6
Symbol worldnews = b0
Symbol Baggage = b1
Symbol Starbucks = b2
Symbol ATM = b3
Symbol Dutyfree = b4
Symbol Gate12 = b5
Symbol Gate6 = b6
Symbol JLF = b7
symbol Mutebutton = b8
#picaxe 28x1
Main:'*********************** MAIN PROGRAM *******************
b9=b9+1 ' Display dot counter
if b9=<16 then
serout 7,T2400,(".")
else
b9=0
serout 7,T2400, (254,1)
pause 30
endif
if pin0 = 1 then goto alarm
if pin1 = 1 then goto alarm
if pin2 = 1 then goto alarm
if pin3 = 1 then goto alarm
if pin4 = 1 then goto alarm
if pin5 = 1 then goto alarm
if pin6 = 1 then goto alarm
if pin7 = 1 then goto alarm
pause 100
low sounder
low led
goto main
alarm:' **************************** ALARM **************************
'high Sounder
pause 100
'readadc 0,mutebutton
if pin0 = 1 then gosub Alarmstate1
if pin0 = ok and Worldnews = 1 then goto asa1
if Mutebutton => 5 then mute
if pin1 = 1 then gosub Alarmstate2
if pin1 = ok and Baggage = 1 then goto asa2
if Mutebutton => 5 then mute
if pin2 = 1 then gosub Alarmstate3
if pin2 = ok and Starbucks = 1 then goto asa3
if Mutebutton => 5 then mute
if pin3 = 1 then gosub Alarmstate4
if pin3 = ok and ATM = 1 then goto asa4
if Mutebutton => 5 then mute
if pin4 = 1 then gosub Alarmstate5
if pin4 = ok and Dutyfree = 1 then goto asa5
if Mutebutton => 5 then mute
if pin5 = 1 then gosub Alarmstate6
if pin5 = ok and Gate12 = 1 then goto asa6
if Mutebutton => 5 then mute
if pin6 = 1 then gosub Alarmstate7
if pin6 = ok and Gate6 = 1 then goto asa7
if Mutebutton => 5 then mute
if pin7 = 1 then gosub Alarmstate8
if pin7 = ok and Jlf = 1 then goto asa8
readadc 0,mutebutton
if Mutebutton => 5 then mute
low Sounder
'untitled
'tune 6, 8,($40,$44,$50,$55,$57)
pause 500
goto alarm
goto main
Alarmstate1:
Worldnews = 1
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," WORLD NEWS ")
pause 1000
return
Alarmstate2:
Baggage = 1
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," BAGGAGE RECLAIM ")
pause 1000
return
Alarmstate3:
Starbucks = 1
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," STARBUCKS ")
pause 1000
return
Alarmstate4:
ATM = 1
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," ATM AIRSIDE ")
pause 1000
return
Alarmstate5:
Dutyfree = 1
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," DUTY FREE CP6 ")
pause 1000
return
Alarmstate6:
Gate12 = 1
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," GATE 12 ")
pause 1000
return
Alarmstate7:
Gate6 = 1
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," GATE 6 ")
pause 1000
return
Alarmstate8:
Jlf = 1
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," JLF 1ST FLOOR ")
pause 1000
return
reset1:
low sounder
low led
goto main
mute:' ******************** MUTE *********************************
low Sounder ' turn buzz off
high Led ' turn led on
if pin0 = 1 and Worldnews = ok then reset1
if pin1 = 1 and Baggage = ok then reset1
if pin2 = 1 and Starbucks = ok then reset1
if pin3 = 1 and Atm = ok then reset1
if pin4 = 1 and Dutyfree = ok then reset1
if pin5 = 1 and Gate12 = ok then reset1
if pin6 = 1 and Gate6 = ok then reset1
if pin7 = 1 and Jlf = ok then reset1
if pin0 = ok and Worldnews = 1 then goto as01
if pin1 = ok and Baggage = 1 then goto as02
if pin2 = ok and Starbucks = 1 then goto as03
if pin3 = ok and Atm = 1 then goto as04
if pin4 = ok and Dutyfree = 1 then goto as05
if pin5 = ok and Gate12 = 1 then goto as06
if pin6 = ok and Gate6 = 1 then goto as07
if Jlf = ok and Jlf = 1 then goto as08
if pin0 = 0 and pin1 = 0 and pin2 = 0 and pin3 = 0 and pin4 = 0 and pin5 = 0 and pin6 = 0 and pin7 = 0 then goto Allok
if pin0 = 1 then
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," WORLD NEWS ")
pause 1000
endif
if pin1 = 1 then
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," BAGGAGE RECLAIM ")
pause 1000
end if
if pin2 = 1 then
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," STARBUCKS ")
pause 1000
end if
if pin3 = 1 then
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," ATM AIRSIDE ")
pause 1000
end if
if pin4 = 1 then
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," DUTY FREE CP6 ")
pause 1000
end if
if pin5= 1 then
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," GATE 12 ")
pause 1000
end if
if pin6 = 1 then
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," GATE 6 ")
pause 1000
end if
if pin7 = 1 then
serout 7,T2400, (254,1)
serout 7,T2400,(254,1," JLF 1ST FLOOR ")
pause 1000
end if
pause 100
low Led
pause 100
goto mute
as01:
Worldnews = ok
goto mute
as02:
Baggage = ok
goto mute
as03:
Starbucks = ok
goto mute
as04:
ATM = ok
goto mute
as05:
Dutyfree = ok
goto mute
as06:
Gate12 = ok
goto mute
as07:
Gate6 = ok
goto mute
as08:
Jlf = ok
goto mute
asa1:
Worldnews = ok
goto reset1
asa2:
Baggage = ok
goto reset1
asa3:
Starbucks = ok
goto reset1
asa4:
ATM = ok
goto reset1
asa5:
Dutyfree = ok
goto reset1
asa6:
Gate12 = ok
goto reset1
asa7:
Gate6 = ok
goto reset1
asa8:
Jlf = ok
goto reset1
Allok:
if pin0 = ok and pin1 = ok and pin2 = ok and pin3 = ok and pin4 = ok and pin5 = ok and pin6 = ok and pin7 = ok then goto reset1
goto alarm
Last edited: