635 Keypad Values

cjs

New member
I'm in the process of debugging the keypad feedback from my crystalfontz 635 and just need some verification on the values i'm recieving. I'm running a pic micro over ttl serial displaying the keypad values on a secondary lcd screen, this is a sample of what i'm getting for the various keys displayed in 4 bytes of hex:
Code:
UP KEY:
80 40 A0 97
80 40 D0 EA
80 80 DO EA
80 80 40 09

RIGHT KEY:
80 40 10 57
80 80 41 BB
80 80 42 34
80 40 21 1A
80 40 20 57

DOWN KEY:
80 40 20 1E
80 40 21 DB
80 40 20 0F
80 80 42 B6
80 80 40 3D

ENTER KEY:
80 80 41 15
80 40 A1 52
80 40 A1 A9
80 40 50 8A
80 80 AD 6D

LEFT KEY:
80 80 A0 56
80 40 A1 93
80 40 A0 56
80 80 42 27

EXIT KEY:
80 80 41 CE
80 80 43 B2
80 40 90 CE
80 40 88 96
80 80 43 B2
80 40 94 8C
80 40 21 59
My confusion lies in the fact that i should only be getting 2 seperate values in the third byte, which should be the actual key command value, one for pressed and one for released.....any ideas????
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 
USB LCD Displays - Graphic and Character LCDs with a Keypad

CF Tech

Administrator
A key report will return as follows:



There should be the 0x80, the length of 0x01, then one of the 12 key codes, then the two bytes of CRC. Each key transition should result in two packets being returned, one with a "press" code, and one with a "release" code.

So I am not sure where the other bytes are coming from that are the 0x40 range.

Ideally, your code should parse the packets and verify the CRC, but checking for a 0x80, and the 0x01 followed by a byte between 1 and 12 should get you pretty close.

Could there be a problem in the routine that you are using to display the hex values?
 

Attachments

Top