Keypad To Screen interface
Palastine
Posts: 12
Hello every one
I have a code that·take a keypad input and display it in to an LCD screen.·But when I push on the backspace button on the keypad,·it does not erase instead it display a weird character, how can I get it to erase, please help. if you have a better code, that will be great also.
thanks in advance.
·
here is the code that i have
CON
······· _clkmode······· = xtal1 + pll16x
······· _xinfreq······· = 5_000_000
var
· byte c
OBJ
·· text : "vga_text"
······· term··· : "tv_terminal"
······· kb····· : "keyboard"
PUB start | i
·
· term.start(12)
· term.str(string("Keyboard...",13))·· '
· text.start(16)
· kb.start(26, 27)
· repeat
··· c := kb.getkey
··· text.out(c)
I have a code that·take a keypad input and display it in to an LCD screen.·But when I push on the backspace button on the keypad,·it does not erase instead it display a weird character, how can I get it to erase, please help. if you have a better code, that will be great also.
thanks in advance.
·
here is the code that i have
CON
······· _clkmode······· = xtal1 + pll16x
······· _xinfreq······· = 5_000_000
var
· byte c
OBJ
·· text : "vga_text"
······· term··· : "tv_terminal"
······· kb····· : "keyboard"
PUB start | i
·
· term.start(12)
· term.str(string("Keyboard...",13))·· '
· text.start(16)
· kb.start(26, 27)
· repeat
··· c := kb.getkey
··· text.out(c)
Comments
Steven
The "TERM"-familiy conciders 7 or 8 special codes for OUT:
$00 - clear screen
$01 - home
$08 - backspave
$09 - tab
$0A - set vertical position
$0B - set horizontal position
$0C - change of colour
$0D - newline
Make sure the code you "display" is an 8
thanks, this information is helpfull
1) The tv_terminal does not handle the Backspace, also if it is sent correct (see 2)
I recommend to use tv_text.spin , not only because of the Backspaces.
2) The problem is that "keyboard.spin" sends Backspace as $C8 and not as $08, so the tv_text driver does not recognize it.
You can change the Entry in the table of keyboard.spin or, better the case value for Backspace in the tv_text.spin:
In the out methode change this:
Andy
I changed VGA_Text.spin and the backspace now works, but it only erase the current line and does not go to previous lines.
another thing if, I type a sentence, when a word reach the end of the page it continues to the next line, is there an easy fix or do I need to write a code and set parameters.