This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Advice on button pressing!

Hi,

I am using the the philips LPC764, you can set up all the pins on port 0 as keyboard interrupts - which i have done ok. I have one button on each pin.

I have tested it ok with one button but when using 2 buttons how do i tell in the keyboard interrupt routine which button/pin was activated?? Trying to catch the port status does not work as I assume the port has gone back to high by the time the interrupt is fired and released....

I have the use of KBF = which is the keyboard flag (bit) and i have set the interrupts using EKB=on, EA=on and KBI bits =on.

Thanks

Barry