NVMNHVNHVMVMGV.bas (4278Bytes)
Hi
A friend of mine is using a picaxe 20m2 to drive a milford instrument 20x4 LCD with a serial backpack. However, when he turns it on, it just comes on with a screen filled with triangles. The LCD is connected to pin 0 .The code he's running is below. What is the problem?
PS: This is my first post, so sorry if it's in the wrong place.
code:
pause 1000
pause 2000
serout 0,T1200_4,(124, 4) 'Sets 20 char (3) |
pause 200
serout 0,T1200_4,(124, 6) 'Sets 4 line (5) |
serout 0,T1200_4,(124, 4) 'Sets 20 char (3) |
pause 200
serout 0,T1200_4,(124, 6) 'Sets 4 line (5) |
serout 0,T1200_4,(124, 4) 'Sets 20 char (3) |
pause 200
serout 0,T1200_4,(124, 6) 'Sets 4 line (5) |
serout 0,T1200_4,(124, 4) 'Sets 20 char (3) |
pause 200
serout 0,T1200_4,(124, 6) 'Sets 4 line (5) |
serout 0,T1200_4,(124, 4) 'Sets 20 char (3) |
pause 200
serout 0,T1200_4,(124, 6) 'Sets 4 line (5) |
serout 0,T1200_4,(124, 4) 'Sets 20 char (3) |
pause 200
serout 0,T1200_4,(124, 6) 'Sets 4 line (5) |
serout 0,T1200_4,(124, 4) 'Sets 20 char (3) |
pause 200
serout 0,T1200_4,(124, 6) 'Sets 4 line (5) |
serout 0,T1200_4,(124, 4) 'Sets 20 char (3) |
pause 200
serout 0,T1200_4,(124, 6) 'Sets 4 line (5) |
serout 0,T1200_4,(124, 4) 'Sets 20 char (3) |
pause 200
serout 0,T1200_4,(124, 6) 'Sets 4 line (5) |
serout 0,T1200_4,(124, 4) 'Sets 20 char (3) |
pause 200
serout 0,T1200_4,(124, 6) 'Sets 4 line (5) |
serout 0,T1200_4,(124, 4) 'Sets 20 char (3) |
pause 200
serout 0,T1200_4,(124, 6) 'Sets 4 line (5) |
serout 0,T1200_4,(124, 4) 'Sets 20 char (3) |
pause 200
serout 0,T1200_4,(124, 6) 'Sets 4 line (5) |
pause 200
serout 0,T1200_4,(124, 6) 'Sets 4 line (5) |
serout 0,T1200_4,(124, 4) 'Sets 20 char (3) |
pause 200
serout 0,T1200_4,(124, 6) 'Sets 4 line (5) |
serout 0,T1200_4,(124, 4) 'Sets 20 char (3) |
pause 200
serout 0,T1200_4,(124, 6) 'Sets 4 line (5) |
serout 0,T1200_4,(124, 4) 'Sets 20 char (3) |
pause 200
serout 0,T1200_4,(124, 6) 'Sets 4 line (5) |
serout 0,T1200_4,(124, 4) 'Sets 20 char (3) |
pause 200
serout 0,T1200_4,(124, 6) 'Sets 4 line (5) |
serout 0,T1200_4,(124, 4) 'Sets 20 char (3) |
pause 200
serout 0,T1200_4,(124, 6) 'Sets 4 line (5) |
serout 0,T1200_4,(124, 4) 'Sets 20 char (3) |
pause 200
serout 0,T1200_4,(124, 6) 'Sets 4 line (5) |
serout 0,T1200_4,(124, 4) 'Sets 20 char (3) |
pause 200
serout 0,T1200_4,(124, 6) 'Sets 4 line (5) |
serout 0,T1200_4,(124, 4) 'Sets 20 char (3) |
pause 200
serout 0,T1200_4,(124, 6) 'Sets 4 line (5) |
serout 0,T1200_4,(124, 4) 'Sets 20 char (3) |
pause 200
serout 0,T1200_4,(124, 6) 'Sets 4 line (5) |
serout 0,T1200_4,(124, 4) 'Sets 20 char (3) |
pause 200
serout 0,T1200_4,(124, 6) 'Sets 4 line (5) |
pause 1000
serout 0,T1200_4,(0x7c, 128) 'Sets backlight full on (128-157 '128 is full on
pause 1000
serout 0,T1200_4,(254, $01) 'Clear Screen
main:
serout 0,T1200_4,(254, $01)
serout 0,T1200_4,("Welcome to your")
serout 0,T1200_4,(" for timing laps on a")
serout 0,T1200_4,("Lap Timer")
serout 0,T1200_4,(" Scalextric car game!")
wait 3
serout 0,T1200_4,(254, $01)
Lapreset:
serout 0,T1200_4,(254, $01)
serout 0,T1200_4,("Are you ready... ...to race?")
wait 3
serout 0,T1200_4,(254, $01)
serout 0,T1200_4,("3...")
wait 1
serout 0,T1200_4,("...2...")
wait 1
serout 0,T1200_4,("...1...")
wait 1
serout 0,T1200_4,(254, $01)
serout 0,T1200_4,("GO!")
wait 1
Timer:
serout 0,T1200_4,(254, $01)
Let b1=b1+1
serout 0,T1200_4,("0")
serout 0,T1200_4,(#b1)
wait 1
if pin1=1 then goto cat
if pin2=1 then goto car
goto timer
cat:
serout 0,T1200_4,(254, $01)
serout 0,T1200_4,("Well done lane 1!")
serout 0,T1200_4,(#b1)
wait 5
let b1=0
goto Lapreset
car:
serout 0,T1200_4,(254, $01)
serout 0,T1200_4,("Well done lane 2!")
serout 0,T1200_4,(#b1)
wait 5
let b1=0
goto Lapreset