I've worked out the hardware for my 28x 8x8 matrix, but I seem to have hit on some real issues in the software.
Below is a copy of my current code. To solve issues of too many keys when a key was pressed, I've added the PAUSES. For some reason, I'm getting alot of false readings when a key is held too long. (Hence the remarked keys)
Is there a better way I should approach this?
(Sorry about the length in advance..)
loop:
low 0
low 1
low 2
low 3
low 4
low 5
low 6
low 7
start:
pause 5
high 0
if pin0=1 then show1
if pin1=1 then show2
if pin2=1 then show3
if pin3=1 then show4
if pin4=1 then show5
if pin5=1 then show6
if pin6=1 then show7
if pin7=1 then show8
low 0
pause 5
high 1
if pin0=1 then show9
if pin1=1 then show10
if pin2=1 then show11
if pin3=1 then show12
if pin4=1 then show13
if pin5=1 then show14
if pin6=1 then show15
if pin7=1 then show16
low 1
pause 5
high 2
if pin0=1 then show17
if pin1=1 then show18
if pin2=1 then show19
if pin3=1 then show20
if pin4=1 then show21
if pin5=1 then show22
if pin6=1 then show23
if pin7=1 then show24
low 2
pause 5
high 3
if pin0=1 then show25
if pin1=1 then show26
if pin2=1 then show27
if pin3=1 then show28
if pin4=1 then show29
if pin5=1 then show30
if pin6=1 then show31
if pin7=1 then show32
low 3
pause 5
high 4
if pin0=1 then show33
if pin1=1 then show34
if pin2=1 then show35
if pin3=1 then show36
if pin4=1 then show37
if pin5=1 then show38
if pin6=1 then show39
if pin7=1 then show40
low 4
pause 5
high 5
if pin0=1 then show41
if pin1=1 then show42
if pin2=1 then show43
if pin3=1 then show44
if pin4=1 then show45
if pin5=1 then show46
if pin6=1 then show47
if pin7=1 then show48
low 5
pause 5
high 6
if pin0=1 then show49
if pin1=1 then show50
if pin2=1 then show51
if pin3=1 then show52
if pin4=1 then show53
if pin5=1 then show54
if pin6=1 then show55
if pin7=1 then show56
low 6
pause 5
high 7
if pin0=1 then show57
if pin1=1 then show58
if pin2=1 then show59
if pin3=1 then show60
if pin4=1 then show61
if pin5=1 then show62
if pin6=1 then show63
if pin7=1 then show64
low 7
goto start
show1:
pause 100
sertxd("2"
goto start
show2:
pause 100
sertxd("q"
goto start
show3:
'pause 100
'sertxd("C="
goto start
show4:
pause 100
sertxd(" "
goto start
show5:
pause 100
sertxd("1"
goto start
show6:
pause 100
sertxd(27)
goto start
show7:
'pause 100
'sertxd("CTRL"
goto start
show8:
'pause 100
'sertxd("Run/Stop"
goto start
show9:
pause 100
sertxd("4"
goto start
show10:
pause 100
sertxd("e"
goto start
show11:
pause 100
sertxd("s"
goto start
show12:
pause 100
sertxd("z"
goto start
show13:
pause 100
sertxd("3"
goto start
show14:
pause 100
sertxd("w"
goto start
show15:
pause 100
sertxd("a"
goto start
show16:
pause 100
sertxd("Lshift"
goto start
show17:
pause 100
sertxd("6"
goto start
show18:
pause 100
sertxd("t"
goto start
show19:
pause 100
sertxd("f"
goto start
show20:
pause 100
sertxd("c"
goto start
show21:
pause 100
sertxd("5"
goto start
show22:
pause 100
sertxd("r"
goto start
show23:
pause 100
sertxd("d"
goto start
show24:
pause 100
sertxd("x"
goto start
show25:
pause 100
sertxd("8"
goto start
show26:
pause 100
sertxd("u"
goto start
show27:
pause 100
sertxd("h"
goto start
show28:
pause 100
sertxd("b"
goto start
show29:
pause 100
sertxd("7"
goto start
show30:
pause 100
sertxd("y"
goto start
show31:
pause 100
sertxd("g"
goto start
show32:
pause 100
sertxd("v"
goto start
show33:
pause 100
sertxd("0"
goto start
show34:
pause 100
sertxd("o"
goto start
show35:
pause 100
sertxd("k"
goto start
show36:
pause 100
sertxd("m"
goto start
show37:
pause 100
sertxd("9"
goto start
show38:
pause 100
sertxd("i"
goto start
show39:
pause 100
sertxd("j"
goto start
show40:
pause 100
sertxd("n"
goto start
show41:
pause 100
sertxd("-"
goto start
show42:
pause 100
sertxd("@"
goto start
show43:
pause 100
sertxd(":"
goto start
show44:
pause 100
sertxd("."
goto start
show45:
pause 100
sertxd("+"
goto start
show46:
pause 100
sertxd("p"
goto start
show47:
pause 100
sertxd("l"
goto start
show48:
pause 100
sertxd(","
goto start
show49:
pause 100
sertxd("Clr"
goto start
show50:
pause 100
sertxd("^"
goto start
show51:
pause 100
sertxd("="
goto start
show52:
pause 100
sertxd("Rshift"
goto start
show53:
pause 100
sertxd("?"
goto start
show54:
pause 100
sertxd("*"
goto start
show55:
pause 100
sertxd(";"
goto start
show56:
pause 100
sertxd("/"
goto start
show57:
pause 100
sertxd("F7"
goto start
show58:
pause 100
sertxd("F5"
goto start
show59:
pause 100
sertxd("F3"
goto start
show60:
pause 100
sertxd("F1"
goto start
show61:
pause 100
sertxd(27)
goto start
show62:
pause 100
sertxd(13)
sertxd(10)
goto start
show63:
pause 100
sertxd("L/E"
goto start
show64:
pause 100
sertxd("U/D"
goto start
Below is a copy of my current code. To solve issues of too many keys when a key was pressed, I've added the PAUSES. For some reason, I'm getting alot of false readings when a key is held too long. (Hence the remarked keys)
Is there a better way I should approach this?
(Sorry about the length in advance..)
loop:
low 0
low 1
low 2
low 3
low 4
low 5
low 6
low 7
start:
pause 5
high 0
if pin0=1 then show1
if pin1=1 then show2
if pin2=1 then show3
if pin3=1 then show4
if pin4=1 then show5
if pin5=1 then show6
if pin6=1 then show7
if pin7=1 then show8
low 0
pause 5
high 1
if pin0=1 then show9
if pin1=1 then show10
if pin2=1 then show11
if pin3=1 then show12
if pin4=1 then show13
if pin5=1 then show14
if pin6=1 then show15
if pin7=1 then show16
low 1
pause 5
high 2
if pin0=1 then show17
if pin1=1 then show18
if pin2=1 then show19
if pin3=1 then show20
if pin4=1 then show21
if pin5=1 then show22
if pin6=1 then show23
if pin7=1 then show24
low 2
pause 5
high 3
if pin0=1 then show25
if pin1=1 then show26
if pin2=1 then show27
if pin3=1 then show28
if pin4=1 then show29
if pin5=1 then show30
if pin6=1 then show31
if pin7=1 then show32
low 3
pause 5
high 4
if pin0=1 then show33
if pin1=1 then show34
if pin2=1 then show35
if pin3=1 then show36
if pin4=1 then show37
if pin5=1 then show38
if pin6=1 then show39
if pin7=1 then show40
low 4
pause 5
high 5
if pin0=1 then show41
if pin1=1 then show42
if pin2=1 then show43
if pin3=1 then show44
if pin4=1 then show45
if pin5=1 then show46
if pin6=1 then show47
if pin7=1 then show48
low 5
pause 5
high 6
if pin0=1 then show49
if pin1=1 then show50
if pin2=1 then show51
if pin3=1 then show52
if pin4=1 then show53
if pin5=1 then show54
if pin6=1 then show55
if pin7=1 then show56
low 6
pause 5
high 7
if pin0=1 then show57
if pin1=1 then show58
if pin2=1 then show59
if pin3=1 then show60
if pin4=1 then show61
if pin5=1 then show62
if pin6=1 then show63
if pin7=1 then show64
low 7
goto start
show1:
pause 100
sertxd("2"
goto start
show2:
pause 100
sertxd("q"
goto start
show3:
'pause 100
'sertxd("C="
goto start
show4:
pause 100
sertxd(" "
goto start
show5:
pause 100
sertxd("1"
goto start
show6:
pause 100
sertxd(27)
goto start
show7:
'pause 100
'sertxd("CTRL"
goto start
show8:
'pause 100
'sertxd("Run/Stop"
goto start
show9:
pause 100
sertxd("4"
goto start
show10:
pause 100
sertxd("e"
goto start
show11:
pause 100
sertxd("s"
goto start
show12:
pause 100
sertxd("z"
goto start
show13:
pause 100
sertxd("3"
goto start
show14:
pause 100
sertxd("w"
goto start
show15:
pause 100
sertxd("a"
goto start
show16:
pause 100
sertxd("Lshift"
goto start
show17:
pause 100
sertxd("6"
goto start
show18:
pause 100
sertxd("t"
goto start
show19:
pause 100
sertxd("f"
goto start
show20:
pause 100
sertxd("c"
goto start
show21:
pause 100
sertxd("5"
goto start
show22:
pause 100
sertxd("r"
goto start
show23:
pause 100
sertxd("d"
goto start
show24:
pause 100
sertxd("x"
goto start
show25:
pause 100
sertxd("8"
goto start
show26:
pause 100
sertxd("u"
goto start
show27:
pause 100
sertxd("h"
goto start
show28:
pause 100
sertxd("b"
goto start
show29:
pause 100
sertxd("7"
goto start
show30:
pause 100
sertxd("y"
goto start
show31:
pause 100
sertxd("g"
goto start
show32:
pause 100
sertxd("v"
goto start
show33:
pause 100
sertxd("0"
goto start
show34:
pause 100
sertxd("o"
goto start
show35:
pause 100
sertxd("k"
goto start
show36:
pause 100
sertxd("m"
goto start
show37:
pause 100
sertxd("9"
goto start
show38:
pause 100
sertxd("i"
goto start
show39:
pause 100
sertxd("j"
goto start
show40:
pause 100
sertxd("n"
goto start
show41:
pause 100
sertxd("-"
goto start
show42:
pause 100
sertxd("@"
goto start
show43:
pause 100
sertxd(":"
goto start
show44:
pause 100
sertxd("."
goto start
show45:
pause 100
sertxd("+"
goto start
show46:
pause 100
sertxd("p"
goto start
show47:
pause 100
sertxd("l"
goto start
show48:
pause 100
sertxd(","
goto start
show49:
pause 100
sertxd("Clr"
goto start
show50:
pause 100
sertxd("^"
goto start
show51:
pause 100
sertxd("="
goto start
show52:
pause 100
sertxd("Rshift"
goto start
show53:
pause 100
sertxd("?"
goto start
show54:
pause 100
sertxd("*"
goto start
show55:
pause 100
sertxd(";"
goto start
show56:
pause 100
sertxd("/"
goto start
show57:
pause 100
sertxd("F7"
goto start
show58:
pause 100
sertxd("F5"
goto start
show59:
pause 100
sertxd("F3"
goto start
show60:
pause 100
sertxd("F1"
goto start
show61:
pause 100
sertxd(27)
goto start
show62:
pause 100
sertxd(13)
sertxd(10)
goto start
show63:
pause 100
sertxd("L/E"
goto start
show64:
pause 100
sertxd("U/D"
goto start