??? 06/01/05 14:31 Read: times |
#94189 - LPC932 KBI |
Hi, I need to use the lpc932 KBI for two different int. One is with pin P0.1 and the other P0.5. The int. should be triggered when any of these two pins is pulled high. My problem is that these two pins should "never" be high at the same time. If the int. triggers I should check which pin caused it.
This is what I have, but it is not working. I need to be able to cause an int. only when any (not both) of the these pins is pulled high. Can that be done? Thanks void keypad_init(void) { KBPATN = 0x22; // pins 1 and 5 KBCON = 0x00; // Port 0 must Not match KBPATN to generate interrupt KBMASK = 0x22; EKBI = 1; P2 = 0x55; D_reset = 1; // P0^1 Tamper = 1; // P0^5 } void keypad_isr(void) interrupt 7 using 1 { EKBI = 0; D_reset = 0; P2 = 0x00; if (Tamper) { EA = 0; P2 = 0x05; } KBCON &= 0xFE; // clear KBIF interrupt flag by writing 0 to it } |
Topic | Author | Date |
LPC932 KBI | 01/01/70 00:00 | |
yes and no | 01/01/70 00:00 | |
Confirm | 01/01/70 00:00 | |
pls explain | 01/01/70 00:00 | |
... | 01/01/70 00:00 | |
you are | 01/01/70 00:00 | |
I'll Check![]() | 01/01/70 00:00 |