Programming MC9S12 to display 4x4 keypad

Thread Starter

CALcircuits

Joined May 5, 2009
3
I need to program my MC9S12C microcontroller in assembly language using a 4x4 matrix keypad with a with an 8 pin terminal output. I need the controller to first recognize which key is pushed on the keypad and then display on an led. I am only worried about getting numbers 0-9 to to be displayed. Right now I could use some help getting started with first part, getting the microcontroller to recognize which key is pushed.

Here is the keypad I am using:
http://www.parallax.com/Portals/0/Downloads/docs/prod/motors/matrixkeypad.pdf
 

Thread Starter

CALcircuits

Joined May 5, 2009
3
Well after I look at the schematic to the 4x4 keypad I have listed above, I have the one which is a 4x4 and an 8 pin output terminal. The columns are connected to pins 5-8, and rows 1-4. I guess the problem I am having is figuring out how to program my micro to know which button will be pushed, seems like, for example, if a "1" is pushed then the 1 and 5 switch will be closed and therefore the micro will then know what is being pushed. My assembly lang programming is not too experienced and I usually get going after a good starting point.
 
Top