MC9S12 Hex Keypad onto LCD

Thread Starter

comepso

Joined Dec 9, 2009
1
I am working with the Motorola MC9S12 on freescale Codewarrior.

I have my LCD (Seiko spec) up and running ok, displaying whatever I want it to based on my code input, but I am now trying to get my hex keypad working to display it on the LCD. It has to run the line, then go to the next line down, and when that line is full, the LCD clears and resets back to the top line, rinse and repeat.

getKey( ) function
test keypad interface and getkey( ) function that does the following:

  • Displays the title on the LCD for three seconds:
    Line 1: “Hex Keypad”
    Line 2: “getKey( ) Test”
  • Repeat forever a loop that calls getKey( ) and displays the key pressed on the LCD. Display the first four characters on line 1 (with line 2 blank), then the next four on line 2. When both lines have four characters the next key entered should clear both lines and begin again on line 1. This pattern of four characters per line then starting all over should occur forever


I think an interrupt driven scanner would work best here? I will get the code and attach it as soon as I get home.

I have my lcd headers and source code in separate files to be called, I will be doing the same thing for the hexpad correct?

Is there a sample program I can grab that uses the hexpad to look at?


Any other help in the meantime is appreciated.
 
Top