'written by JA1XTQ copyright(c)2016 Nov
' 3pin <--- TXD
' 2pin <--- RXD
'
"'$regfile ""m164pdef.dat"""
"$regfile ""m88def.dat"""
$crystal = 8000000 'set FUSE bit 1
$baud = 9600
$hwstack = 32
$swstack = 10
$framesize = 40

"Config Input = Cr , Echo = Cr"
Config Sda = Portd.6
Config Scl = Portd.7
Config I2cdelay = 1
I2cinit
"Config Keyboard = Pinb.7 , Data = Pind.5 , Keydata = Keydata"
'
"' PS/2 +5,CLK,DATA,Gnd red,white,green,black"

'Config Lcdmode = Port
'Config Lcdbus = 4
"Config Lcdpin = Pin , Db4 = Portc.2 , Db5 = Portc.3 , Db6 = Portc.4 , Db7 = Portc.5 , E = Portc.1 , Rs = Portc.0"
Config Lcd = 16 * 2

'
Config Portb.0 = Output
Config Portb.1 = Output 'CW out strait
Config Portb.2 = Input 'break in
Config Portb.3 = Output 'WE
Config Portb.4 = Output 'CLK
Config Portb.5 = Input 'DATA
Config Portb.6 = Output 'CE

Dim I As Byte
Dim J As Byte
Dim K As Byte
Dim A As Byte
Dim B As Byte
Dim Fmenu As Byte 'MENU flag
Dim Fdcw As Byte 'direct CW switch
Dim Flog As Byte 'QSO LOG

$serialinput = Kbdinput 'important

Dim Sss As String * 64
Dim Ss As String * 64
Dim Sh As String * 64
'Dim Sc As String * 6
Dim Sc As String * 64
Dim C1 As String * 1
Dim C As String * 10
Dim S1 As Byte
Dim Cwout As String * 64

Dim Keyinc As Byte
Dim Dottime As Integer
Dim Dushtime As Integer
Dim Blanktime As Integer
Dim Speedfact As Integer
Dim Dottime_c As Long
Dim Dushtime_c As Long
Dim Blanktime_c As Long
Dottime_c = 800
Dushtime_c = 2800
Blanktime_c = 2000
Speedfact = 20

Dim C_1 As Word
Dim Romadress As Word
Dim Control As Byte
Dim Adresshi As Byte
Dim Adresslo As Byte
Dim Adress As Word
Dim Eepbyte As Integer
Dim Dat As Byte
Dim Serno As Integer
Dim Endnum As Integer
Dim Serchno As Integer
Dim Buff(34) As Byte

Dim Mmes1 As String * 20
Dim Mmes2 As String * 20
Dim Mmes3 As String * 20
Dim Mmes4 As String * 20
Dim Mtemp As String * 20
Dim Cw_speed As Byte
Dim Mycall As String * 20
Dim Myrst As String * 20
Dim Yourst As String * 20
Dim Band As String * 4
Dim Youcall As String * 20
Dim Memo As String * 20
Dim Menupoi As Byte
Dim Logpoi As Byte

Dim Nowtime As String * 8
Dim Qsotime As String * 5
Dim Sendrst As String * 10
Dim Recrst As String * 10
Dim Cqcq As String * 10
Dim Dede As String * 10
Dim Getcall As String * 16
Dim Getrst As String * 10
Dim Qsomemo As String * 10
Dim Errmsg As String * 10
Dim Menunm As String * 5
'*****************************
'RTC
'*****************************
Dim Hh10 As Integer
Dim Hh01 As Integer
Dim Mm10 As Integer
Dim Mm01 As Integer
Dim Ss10 As Integer
Dim Ss01 As Integer
Dim Youbi As Byte
Dim Dd10 As Byte
Dim Dd01 As Byte
Dim Mo10 As Byte
Dim Mo01 As Byte
Dim Yy10 As Byte
Dim Yy01 As Byte
Dim Hhmmss As Byte
Dim Dmbit As Integer

Dim Ymdhh As Integer
Dim Ymdmm As Integer
Dim Ymdss As Integer
Dim Ymdwk As Integer
Dim Ymdhh2 As Integer
Dim Ymdmm2 As Integer
Dim Ymdss2 As Integer

$eeprom
Mes1:
"Data ""cqcq_de_ja1xtq_k####"""
Data &H0D
Mes2:
"Data ""ur_599_k############"""
Data &H0D
Mes3:
"Data ""ja1xtq##############"""
Data &H0D
Mes4:
"Data ""599_k###############"""
Data &H0D
Mmycall:
"Data ""JA1XTQ##############"""
Data &H0D
Mmyrst:
"Data ""599#################"""
Data &H0D
Myourst:
"Data ""599#################"""
Data &H0D
Mband:
"Data ""7###"""
Data &H0D

Cwspeed:
Data &H00
Data &H14
Eep_serno:
Data &H00
Data &H00
Eep_endno:
Data &H00
Data &H00

$data

Cls
"Lcd ""PS/2 KB Logger"""
Wait 1
Reset Portb.3
Reset Portb.4
Reset Portb.5
Reset Portb.6
Cls
Gosub Rtcset
' Romadress = &H0020 '24LC64 start adress
S1 = 0
"Ss = """""
Menupoi = 1
"Getcall = """""
"Getrst = """""
"Fmenu = """""
"Fdcw = """""
"Flog = """""

"Readeeprom Mmes1 , Mes1"
"Readeeprom Mmes2 , Mes2"
"Readeeprom Mmes3 , Mes3"
"Readeeprom Mmes4 , Mes4"
"Readeeprom Mycall , Mmycall"
"Readeeprom Myrst , Mmyrst"
"Readeeprom Yourst , Myourst"
"Readeeprom Band , Mband"
"Readeeprom Serno , Eep_serno"
Serno = Serno + 1
"Readeeprom Endnum , Eep_endno"
"Readeeprom Cw_speed , Cwspeed"
Gosub Speedcont

Main:
Gosub Gamen
' Waitms 10
Main015:
S1 = Getatkbd()
If S1 = 0 Then Goto Main015
Main100:
If S1 = 200 Then 'F1
Gosub Cfmrtn 'CFM
"Ss = """""
Goto Main
End If

If S1 = 198 Then 'F5 mem1 play
Ss = Mmes1
Goto Main400
End If
If S1 = 206 Then 'F6 mem2 play
Ss = Getcall + Mmes2
Goto Main400
End If
If S1 = 190 Then 'F7 mem3 play
Ss = Mmes3
Goto Main400
End If
If S1 = Chr(205) Then 'F8 mem4 play
Ss = Mmes4
Goto Main400
End If

If S1 = 201 Then 'F2 down
"If Flog = """" Then"
Menupoi = Menupoi - 1
If Menupoi < 1 Then
Menupoi = 1
End If
"Lcd ""ME#:"";"
Lcd Str(menupoi) 'display menu#
Wait 1
Else
If Logpoi > 1 Then
Logpoi = Logpoi - 1
Else
Logpoi = 1
End If
Gosub Logread
End If
Goto Main
End If

If S1 = 207 Then 'F4 Now menu#
"Lcd ""ME#:"";"
Lcd Str(menupoi) 'display menu#
Wait 1
Goto Main
End If

If S1 = 199 Then 'F3 UP
"If Flog = """" Then"
Menupoi = Menupoi + 1
If Menupoi > 13 Then
Menupoi = 13
End If
"Lcd ""ME#:""; 'console"
Lcd Str(menupoi) 'display menu
Wait 1
Else
A = Serno
If Logpoi < A Then
Logpoi = Logpoi + 1
Else
Logpoi = A
End If
Gosub Logread
End If
Goto Main
End If

If S1 = 191 Then 'F9 menu exec
"If Flog = """" Then"
Gosub Menurtn
Else
"Flog = """""
"Lcd ""logread OFF"""
Wait 1
End If
Goto Main
End If

If S1 = 204 Then 'F10 getcall
Getcall = Ss
Gosub Dupserch
"Ss = """""
Goto Main
End If
If S1 = 192 Then 'F11 getrst
Getrst = Ss
"Ss = """""
Goto Main
End If
If S1 = 202 Then 'F12 memo
Qsomemo = Ss
"Ss = """""
Goto Main
End If
"If Fdcw <> """" Then 'direct CW out"
Ss = Chr(s1)
Goto Main400
End If

Main200: 'BS & CR
If S1 = &H08 Then 'Back Space
K = Len(ss)
If K > 1 Then
K = K - 1
"Ss = Left(ss , K)"
Else
"Ss = """""
End If
Else
If S1 <> &H0D Then 'CR
Ss = Ss + Chr(s1)
End If
End If
Gosub Gamen
' Waitms 10

Goto Main

Main400: 'menu CW out
For I = 1 To Len(ss)
Reset Portc.1
Keyinc = Pinc
Keyinc = Keyinc And &B00000100
If Keyinc = &B00000100 Then Goto Main999 'BREAK

Restore Cwcode 'Cwcode search
"C1 = """""
"While C1 <> ""#"""
Read C1
Read C
"If Mid(ss , I , 1) = C1 Then"
Gosub Cw
"C1 = ""#"""
Waitms Blanktime
End If
Wend
"If Mid(ss , I , 1) = ""#"" Then Goto Main999"
Next I
"Ss = """""

Main999:
Goto Main

Menurtn:
Cls
If Menupoi = 1 Then 'direct CW
"If Fdcw = """" Then"
"Fdcw = ""on"""
"Lcd ""D CW on"""
Else
"Fdcw = """""
"Lcd ""D CW off"""
End If
Wait 1
End If
If Menupoi = 2 Then 'mycall
"Lcd ""C:"";"
Lcd Mycall
Gosub Linein
"If Sh <> ""#"" Then"
"Writeeeprom Ss , Mmycall"
Mycall = Ss
End If
End If
If Menupoi = 3 Then 'band
"Lcd ""B:"";"
Lcd Band
Gosub Linein
"If Sh <> ""#"" Then"
"Writeeeprom Ss , Mband"
Band = Ss
End If
End If
If Menupoi = 4 Then 'myrst
"Lcd ""MR:"";"
Lcd Myrst
Gosub Linein
"If Sh <> ""#"" Then"
"Writeeeprom Ss , Mmyrst"
Myrst = Ss
End If
End If
If Menupoi = 5 Then 'yourrst
"Lcd ""YR:"";"
Lcd Yourst
Gosub Linein
"Writeeeprom Ss , Myourst"
Yourst = Ss
End If

If Menupoi = 6 Then 'mes1 input
"Lcd ""1:"";"
Lcd Mmes1
Gosub Linein
"If Sh <> ""#"" Then"
"Writeeeprom Ss , Mes1"
Mmes1 = Ss
End If
End If
If Menupoi = 7 Then 'mes2 input
"Lcd ""2:"";"
Lcd Mmes2
Gosub Linein
"If Sh <> ""#"" Then"
"Writeeeprom Ss , Mes2"
Mmes2 = Ss
End If
End If
If Menupoi = 8 Then 'mes3 input
"Lcd ""3:"";"
Lcd Mmes3
Gosub Linein
"If Sh <> ""#"" Then"
"Writeeeprom Ss , Mes3"
Mmes3 = Ss
End If
End If
If Menupoi = 9 Then 'mes4 input
"Lcd ""4:"";"
Lcd Mmes4
Gosub Linein
"If Sh <> ""#"" Then"
"Writeeeprom Ss , Mes4"
Mmes4 = Ss
End If
End If
If Menupoi = 10 Then Gosub Spchange 'cwspeed
If Menupoi = 11 Then 'time
Gosub Rtcset
Wait 3
End If
If Menupoi = 12 Then 'LOG
"If Flog = """" Then"
"Flog = ""on"""
"Lcd ""LOG"";"
Wait 1
Logpoi = Serno
Gosub Logread
Else
"Flog = """""
End If
End If

If Menupoi = 13 Then 'INIT
Gosub Eepromread
"Lcd ""sure?"""
Gosub Linein
"If Ss = ""y"" Then Gosub Eepromerase"
End If

Menu999:
"Ss = """""
"Sh = """""
Return

'CW speed
Spchange:
"Lcd ""CW;"";"
Lcd Cw_speed
Gosub Linein
Cw_speed = Val(ss)
Gosub Speedcont
"Ss = """""
"Writeeeprom Cw_speed , Cwspeed"
Spchange999:
Return


Linein:
"Ss = """""
"Locate 2 , 11"
Linein010:
S1 = Getatkbd()
If S1 = 0 Then Goto Linein010
If S1 = &H0D Then Goto Linein999
If Len(ss) > 5 Then
"Locate 2 , 1"
"Lcd "" """
"Locate 2 , 1"
Else
"Locate 2 , 11"
End If
If S1 = &H08 Then 'BS
J = Len(ss)
J = J - 1
"Ss = Left(ss , J)"
"Ss = Ss + "" """
Lcd Ss
Else
Ss = Ss + Chr(s1)
Lcd Ss
End If
Goto Linein010
Linein999:
"Sh = Ss + ""#"""
Return


Cw: 'CW code out
K = 0
J = Len(c)

While K < J
K = K + 1
"If Mid(c , K , 1) = ""0"" Then"
Portb = &B00000010
Waitms Dottime
Portb = &B00000000
Waitms Dottime
Waitms Dottime
End If
"If Mid(c , K , 1) = ""1"" Then"
Portb = &B00000010
Waitms Dushtime
Portb = &B00000000
Waitms Dottime
Waitms Dottime
End If
"If Mid(c , K , 1) = ""_"" Then"
Portb = &B00000000
Waitms Blanktime
End If
Portb = &B00000000
Wend
Waitms Blanktime

Cw999:
Return

Speedcont:

If Cw_speed < 10 Then
Cw_speed = 10
Else
If Cw_speed > 30 Then
Cw_speed = 30
Else
End If
End If

Speedfact = Cw_speed


Speedcont900:
Dottime = Dottime_c / Abs(speedfact)
Dushtime = Dushtime_c / Abs(speedfact)
Blanktime = Blanktime_c / Abs(speedfact)

Return

Cfmrtn: 'log save
"If Getcall = """" Then Goto Cfmrtn999"
' Gosub Dupserch
"Sc = Left(nowtime , 5)"
Sss = Sc
"Sss = Sss + "","""
Sss = Sss + Getcall
"Sss = Sss + "","""
Sss = Sss + Band
"Sss = Sss + "","""
Sss = Sss + Getrst
"Sss = Sss + "","""
Sss = Sss + Myrst
"Sss = Sss + "","""
Sss = Sss + Qsomemo
"Sss = Sss + ""#"""
Gosub Eepromwrite
'eeprom save
' Print Cwout 'debug
"Getcall = """""
"Getrst = """""
"Qsomemo = """""
"Writeeeprom Serno , Eep_serno"
Serno = Serno + 1
Cfmrtn999:
' Gosub Gamen
Return

Gamen:
Cls
"If Getcall = """" Then Goto Gamen10"
Sc = Getcall
Sc = Sc + Getrst
Sc = Sc + Qsomemo
Lcd Sc;
"Locate 2 , 1"
If Len(ss) > 5 Then Goto Gamen100
Gamen10:
Gosub Rtcread
"Locate 2 , 1"
Sc = Str(serno)
"Sc = Sc + "" """
"Sc = Sc + Left(nowtime , 5)"
Lcd Sc
"Locate 2 , 11"
Gamen100:
Lcd Ss
' Waitms 10 'debug
Return

Logread: 'Random READ
"Sss = """""
If Logpoi = 0 Then
Romadress = 32
Else
Romadress = Logpoi * 32
End If
Logread010:
Buff(1) = High(romadress)
Buff(2) = Low(romadress)
"I2creceive &B10100000 , Buff(1) , 2 , 32"
I = 0
Logread020:
I = I + 1
S1 = Buff(i)
If I > 32 Then Goto Logread030
If S1 = &H0D Then Goto Logread030
Sss = Sss + Chr(s1)
Goto Logread020
Logread030:
Cls
If Len(sss) > 16 Then
"Ss = Left(sss , 16)"
Lcd Ss
"Locate 2 , 1"
"C1 = """""
J = 17
Do
"C1 = Mid(sss , J , 1)"
"If C1 = ""#"" Then Exit Do"
Lcd C1;
J = J + 1
Loop
Wait 2
Else
Lcd Sss
Wait 2
End If


Wait 2
Logread999:
"Ss = """""
S1 = 0
Return


Eepromread: 'Random READ
"' Print ""Romread"""
Set Portb.0
Romadress = &H0020
Serchno = 0
"Sss = """""
If Endnum = 0 Then Goto Eepromread999
Eepromread010:
Serchno = Serchno + 1
"' Print ""romadress:"";"
' Print Romadress ;
"' Print "":"";"
Buff(1) = High(romadress)
Buff(2) = Low(romadress)
"I2creceive &B10100000 , Buff(1) , 2 , 32"
I = 0
Eepromread020:
I = I + 1
S1 = Buff(i)
If I > 32 Then Goto Eepromread030
If S1 = &H0D Then Goto Eepromread030
Sss = Sss + Chr(s1)
Goto Eepromread020
Eepromread030:
Print Sss
"' Print ""#"""
"Sss = """""
Romadress = Romadress + 32
If Serchno <= Endnum Then Goto Eepromread010
Eepromread999:
Reset Portb.0

Return

Dupserch:
Sc = Getcall
Dupserch000:
Romadress = &H0000
Serchno = 0
J = 0
"Sss = """""
If Endnum = 0 Then Goto Eepromread999
Dupserch010:
Serchno = Serchno + 1
Buff(1) = High(romadress)
Buff(2) = Low(romadress)
"I2creceive &B10100000 , Buff(1) , 2 , 32"
I = 6
Dupserch020:
I = I + 1
S1 = Buff(i)
If I > 32 Then Goto Dupserch030
"If S1 = &H2C Then Goto Dupserch030 '"","""
Sss = Sss + Chr(s1)
Goto Dupserch020
Dupserch030:
If Sss = Sc Then 'DUP?
"Locate 2 , 11"
"Lcd ""dup"":"
Wait 1
Gosub Bandrtn
' Goto Dupserch999 'if find end
End If
Dupserch050:
"Sss = """""
Romadress = Romadress + 32
If Serchno =< Serno Then Goto Dupserch010
Dupserch999:
Return

Bandrtn:
"Sss = """""
Bandrtn000:
I = I + 1
S1 = Buff(i)
If I > 32 Then Goto Bandrtn010
"If S1 = &H2C Then Goto Bandrtn010 '"","""
Sss = Sss + Chr(s1)
Goto Bandrtn000
Bandrtn010:
If Sss = Band Then
Set Portb.0
"Lcd ""BAND dup"""
Wait 1
Reset Portb.0
End If
Bandrtn999:
Return

Eepromwrite: 'Random WRITE
Serchno = Serno

If Serchno > 250 Then Goto Eepromread999
Cwout = Sss

A = Serchno * 32
Romadress = A + 32
Buff(1) = High(romadress)
Buff(2) = Low(romadress)
I = 0
Eepromwrite010:
I = I + 1
J = I + 2
"C1 = Mid(cwout , I , 1)"
If I > 32 Then Goto Eepromwrite020:
Buff(j) = C1
' Print C1; 'debug
If Buff(j) = &H0D Then Goto Eepromwrite020
Goto Eepromwrite010
Eepromwrite020:
"I2csend &B10100000 , Buff(1) , 34"

Endnum = Endnum + 1
"Writeeeprom Endnum , Eep_endno"
"Sss = """""

Eepromwrite999:

Return

Eepromerase:
Set Portb.0
Serno = 0
Endnum = 0
"Writeeeprom Serno , Eep_endno"
"Writeeeprom Endnum , Eep_endno"
Wait 1
Reset Portb.0

Return

'**************************
'RTC routin
'**************************
Rtcset:
' Wait 1

' Ymdhh = 0
' Ymdmm = 0
' Ymdss = 0
"Lcd ""Time? HHMMSS"";"
Gosub Linein

"C = Left(ss , 2)"
Ymdhh = Val(c)
"C = Mid(ss , 3 , 2)"
Ymdmm = Val(c)
"C = Right(ss , 2)"
Ymdss = Val(c)
"Ss = """""

' Reset Portb.3
' Reset Portb.4
' Reset Portb.5
' Reset Portb.6
Gosub Rtcwrite
' Wait 1
Rtcset900:
' Gosub Rtcread
' Return

Rtcread:
' RTC read
Set Portb.6 'enable
Reset Portb.3 'READ mode

Rtcread10:
Hhmmss = 0
I = 0
J = 4
Gosub Rtcloop
Ss01 = Hhmmss
I = 0
J = 3
Hhmmss = 0
Gosub Rtcloop
Ss10 = Hhmmss
J = 1
Gosub Rtcdmloop

I = 0
J = 4
Hhmmss = 0
Gosub Rtcloop
Mm01 = Hhmmss
I = 0
J = 3
Hhmmss = 0
Gosub Rtcloop
Mm10 = Hhmmss
J = 1
Gosub Rtcdmloop

I = 0
J = 4
Hhmmss = 0
Gosub Rtcloop
Hh01 = Hhmmss
I = 0
J = 2
Hhmmss = 0
Gosub Rtcloop
Hh10 = Hhmmss

Rtcread900:
J = 30 '52bit
Gosub Rtcdmloop

Reset Portb.6
Waitms 1

Ymdwk = Ss10 * 10
Hhmmss = Ss01
Hhmmss = Hhmmss + Ymdwk
Ymdss2 = Hhmmss + Ymdss

Hhmmss = Mm01
Ymdwk = Mm10 * 10
Hhmmss = Hhmmss + Ymdwk
Ymdmm2 = Hhmmss + Ymdmm

Hhmmss = Hh01
Ymdwk = Hh10 * 10
Hhmmss = Hhmmss + Ymdwk
Ymdhh2 = Hhmmss + Ymdhh

If Ymdss2 > 59 Then
Ymdss2 = Ymdss2 - 60
Ymdmm2 = Ymdmm2 + 1
End If

If Ymdmm2 > 59 Then
Ymdmm2 = Ymdmm2 - 60
Ymdhh2 = Ymdhh2 + 1
End If

If Ymdhh2 > 23 Then
Ymdhh2 = Ymdhh2 - 24
End If

"Nowtime = """""
"If Ymdhh2 < 10 Then Nowtime = ""0"""
Nowtime = Nowtime + Str(ymdhh2)

"Nowtime = Nowtime + "":"""
"C = """""
"If Ymdmm2 < 10 Then C = ""0"""
C = C + Str(ymdmm2)
Nowtime = Nowtime + C

"Nowtime = Nowtime + "":"""
"C = """""
"If Ymdss2 < 10 Then C = ""0"""
C = C + Str(ymdss2)
Nowtime = Nowtime + C
Rtcread910:
Return

Rtcloop:
Reset Portb.4
Rtcloop10:
Set Portb.4 'CLK
Hhmmss.i = Pinb.5 'read DATA
Waitms 1
Reset Portb.4
Waitms 1
I = I + 1
If I < J Then Goto Rtcloop10
Return

Rtcdmloop:
Reset Portb.4
Rtcdmloop10:
Set Portb.4 'CLK
Dmbit = Pinb.5 'read DATA
Waitms 1
Reset Portb.4
Waitms 1
J = J - 1
If J > 0 Then Goto Rtcdmloop10
Return


Rtcwrite:
' RTC write
Portb = &B00000000
Waitus 5
Portb = &B01000000 'WRITE mode
Waitms 1
Portb = &B01001000 'enable
Waitms 5

Rtcwrite10:
J = 52
Gosub Timedmloop

Rtcwrite900:
Portb = &B01001000
Waitus 5
Portb = &B00000000
Wait 2

Return

Timedmloop:
Portb = &B01001000
Waitus 5
Timedmloop10:
Waitms 1
Portb = &B01011000 'CLK
Waitus 40
Portb = &B01001000
Waitus 5

J = J - 1
If J > 0 Then Goto Timedmloop10
Return


Kbdinput:
'we come here when input is required from the COM port
'So we pass the key into R24 with the GetATkbd function
' We need some ASM code to save the registers used by the function
$asm
push r16 ; save used register
push r25
push r26
push r27
Kbdinput1:
rCall _getatkbd ; call the function
tst r24 ; check for zero
breq Kbdinput1 ' yes so try again
pop r27 ; we got a valid key so restore registers
pop r26
pop r25
pop r16
$end Asm
'just return
Return

Keydata:
'normal keys lower case
' 9so 5ni 3nu 1ne 2no 12ha 10fu 8he 6ho 4ma
"Data 0 , 191 , 0 , 198 , 199 , 200 , 201 , 202 , 0 , 204 , 205 , 206 , 207 , 0 , &H5E , 0"
"Data 0 , 0 , 0 , 0 , 0 , 113 , 49 , 0 , 0 , 0 , 122 , 115 , 97 , 119 , 50 , 0"
"Data 0 , 99 , 120 , 100 , 101 , 52 , 51 , 0 , 0 , 32 , 118 , 102 , 116 , 114 , 53 , 0"
"Data 0 , 110 , 98 , 104 , 103 , 121 , 54 , 7 , 8 , 44 , 109 , 106 , 117 , 55 , 56 , 0"
"Data 0 , 44 , 107 , 105 , 111 , 48 , 57 , 0 , 0 , 46 , 45 , 108 , 48 , 112 , 43 , 0"
"Data 0 , 0 , 0 , 0 , 0 , 92 , 0 , 0 , 0 , 0 , 13 , 0 , 0 , 92 , 0 , 0"
"Data 0 , 60 , 0 , 0 , 0 , 0 , 8 , 0 , 0 , 49 , 0 , 52 , 55 , 0 , 0 , 0"
' 11
"Data 48 , 44 , 50 , 53 , 54 , 56 , 0 , 0 , 192 , 43 , 51 , 45 , 42 , 57 , 0 , 0"
'shifted keys UPPER case
' 7se
"Data 0 , 0 , 0 , 190 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0"
"Data 0 , 0 , 0 , 0 , 0 , 81 , 33 , 0 , 0 , 0 , 90 , 83 , 65 , 87 , 34 , 0"
"Data 0 , 67 , 88 , 68 , 69 , 0 , 35 , 0 , 0 , 32 , 86 , 70 , 84 , 82 , 37 , 0"
"Data 0 , 78 , 66 , 72 , 71 , 89 , 38 , 0 , 0 , 76 , 77 , 74 , 85 , 47 , 40 , 0"
"Data 0 , 59 , 75 , 73 , 79 , 61 , 41 , 0 , 0 , 58 , 95 , 76 , 48 , 80 , 63 , 0"
"Data 0 , 0 , 0 , 0 , 0 , 96 , 0 , 0 , 0 , 0 , 13 , 94 , 0 , 42 , 0 , 0"
"Data 0 , 62 , 0 , 0 , 0 , 8 , 0 , 0 , 49 , 0 , 52 , 55 , 0 , 0 , 0 , 0"
"Data 48 , 44 , 50 , 53 , 54 , 56 , 0 , 0 , 0 , 43 , 51 , 45 , 42 , 57 , 0 , 0"

'$eeprom
Cwcode:
"Data ""a"" , ""01"""
"Data ""b"" , ""1000"""
"Data ""c"" , ""1010"""
"Data ""d"" , ""100"""
"Data ""e"" , ""0"""
"Data ""f"" , ""0010"""
"Data ""g"" , ""110"""
"Data ""h"" , ""0000"""
"Data ""i"" , ""00"""
"Data ""j"" , ""0111"""
"Data ""k"" , ""101"""
"Data ""l"" , ""0100"""
"Data ""m"" , ""11"""
"Data ""n"" , ""10"""
"Data ""o"" , ""111"""
"Data ""p"" , ""0110"""
"Data ""q"" , ""1101"""
"Data ""r"" , ""010"""
"Data ""s"" , ""000"""
"Data ""t"" , ""1"""
"Data ""u"" , ""001"""
"Data ""v"" , ""0001"""
"Data ""w"" , ""011"""
"Data ""x"" , ""1001"""
"Data ""y"" , ""1011"""
"Data ""z"" , ""1100"""
"'Data ""A"" , ""01"""
"'Data ""B"" , ""1000"""
"'Data ""C"" , ""1010"""
"'Data ""D"" , ""100"""
"'Data ""E"" , ""0"""
"'Data ""F"" , ""0010"""
"'Data ""G"" , ""110"""
"'Data ""H"" , ""0000"""
"'Data ""I"" , ""00"""
"'Data ""J"" , ""0111"""
"'Data ""K"" , ""101"""
"'Data ""L"" , ""0100"""
"'Data ""M"" , ""11"""
"'Data ""N"" , ""10"""
"'Data ""O"" , ""111"""
"'Data ""P"" , ""0110"""
"'Data ""Q"" , ""1101"""
"'Data ""R"" , ""010"""
"'Data ""S"" , ""000"""
"'Data ""T"" , ""1"""
"'Data ""U"" , ""001"""
"'Data ""V"" , ""0001"""
"'Data ""W"" , ""011"""
"'Data ""X"" , ""1001"""
"'Data ""Y"" , ""1011"""
"'Data ""Z"" , ""1100"""
"Data ""1"" , ""01111"""
"Data ""2"" , ""00111"""
"Data ""3"" , ""00011"""
"Data ""4"" , ""00001"""
"Data ""5"" , ""00000"""
"Data ""6"" , ""10000"""
"Data ""7"" , ""11000"""
"Data ""8"" , ""11100"""
"Data ""9"" , ""11110"""
"Data ""0"" , ""11111"""
"Data ""?"" , ""001100"""
"Data ""/"" , ""10010"""
"Data ""_"" , ""_"""
"Data "" "" , ""_"""
"Data "","" , ""110011"""

"Data ""#"" , ""#"""