Michael Choquette

Using a keypad on the Dragon 12

Discussion created by Michael Choquette on Mar 12, 2008
Latest reply on Mar 13, 2008 by Jim Donelson
Hi all, I hope someone can help me! I'm using the Dragon 12 project board which has the HCS12 on it.  A program that I'm writing has a menu structure.  Press the 'A' key to go to this menu, press 'B' to go to this menu and press 'F' to exit out of the menu etc...  The keypad I'm using comes with the kit, it is a 16 character keypad (0-9, A-F) that connects to the board.  I can get the program to go to the first menu, and enter data, but the problem is you can only go to the 'A' menu and it goes to that menu when you press any key!  So, my question is, does anyone know how to make the program go to the selected menu, when the corresponding key is pressed.  I'm writing in C, i think it is simple, I'm just over looking the obvious.  I've tried case structures, if statements.  My understanding of how the keypad works may be my downfall here.  Any help will be appreciated!

Outcomes