Serial Communication with a differnce!
Discussion in "Project Help" started by deepu027 Feb 3, 2008.
Sun Feb 03 2008, 12:21 am
Hey i'm working on a project that requires me to use a 4 X 4 matrix keypad (interfaced to uC) to communicate with computer via serial port. A server software is designed (and installed in OS) to detect my module(consisting of uC,keypad n LCD) when I send msg in a predefined format.That format contains alphabets also!
Now my question is :- HOW DO I SEND ALPHABETS VIA A 4 X 4 KEYPAD WHICH HAS NOTHING BUT HEX KEYS? (for ex: how to send "Rickey"?)
plz reply soon
Now my question is :- HOW DO I SEND ALPHABETS VIA A 4 X 4 KEYPAD WHICH HAS NOTHING BUT HEX KEYS? (for ex: how to send "Rickey"?)
plz reply soon
Sun Feb 03 2008, 12:54 am
you need to write code in such a way that your hex keypad becomes alphanumeric keypad.. take example of a mobile phone keypad.. it has 12 keys to work for a full alpha numeric keypad. you can also make a simple keypad like that.
Just stress your brain a little. think of the simples way you can do this
Just stress your brain a little. think of the simples way you can do this
deepu027 like this.
Mon Feb 04 2008, 09:11 pm
i think u can make use of hex codes or else convert the alpha-numeric codes to ASCII codes. I think it may suite it.
i wud like to know what exactly does the above statement mean???
@deepu027
ajay have u the perfect example of the implementation i can not think of any better one ...
out of the sixteen key u can have
1 2 3 4
5 6 7 8
9 0 < fun > < shift>
<enter> <del> . < caps>
fun1[] = {'1','2','3','4','5','6','7','8','9','0',}
fun2[] = {',','a','d','g','j','m','p','s','v','y',}
fun3[] = {'-','b','e','h','k','n','q','t','w','z',}
fun4[] = {'+','c','f','i','l','o','r','u','x','*',}
now writing "shyam"
key pressed result string
<8> 8
<fun> s
<shift> s_
<4> s4
<fun> sg
<fun> sh
<shift> sh_
<0> sh0
<fun> shy
<shift> shy_
<2> shy2
<fun> shya
<shift> shya_
<caps> shya_
<6> shya6
<fun> shyaM // oops error M shud be m
<del> shya_
<caps> shya
<6> shya6
<fun> shyam // hurray...
<enter>
"shyam" displayed
!dance
!dance !dance
[ Edited Mon Feb 04 2008, 10:12 pm ]
deepu027 like this.
Powered by e107 Forum System