Iam using the HCS12 micro controller. The following program that I have takes the input from an on board keypad and displays letters to an on board LCD depending on which key is pressed (I only attached the portion of the code dealing with the inputs / outputs, i can attach the rest if need be but its easier on the eyes this way).
What I would like to do is to get rid of the keypad interface being used as inputs, and use a sensor that I have which sends active low signals though 3 separate pins instead. That way in stead of having to push the keypad each time, whenever the sensor reads a low signal (either PortA1, 2 or 3) it will display the correct letter.
The init_keypad function sets PortA0-PortA3 as inputs. In the getkey function im not sure how to change the if statements to read PortA0-PortA3 individually and check for the active low inputs.