|
Okay, I understand why I have to use port b as an output to drive a signal to the columns of the keypad, and why I'm using port c as an input to get the information from the rows. BUT, if I'm waiting for a particular key to be pressed, how can I poll those ports to see that it has been pressed? |
|
|
|
Hi lots, If you have defined THAT hardware, I should add an extra and gate ( inputs connected to each row and output connected to *IRQ line ). Each time you press a key, you get an interrupt request. Regards, Roberto Guillermo Berner Boolean General ICQ 119529928 54 11 4308 3500 54 11 4308 3700 15 5122 6095 ----- Original Message ----- From: "lotsofquestions02" <> To: <> Sent: Monday, September 23, 2002 9:21 AM Subject: [m68HC11] Keypad interfacing... still. > Okay, I understand why I have to use port b as an output to drive a > signal to the columns of the keypad, and why I'm using port c as an > input to get the information from the rows. BUT, if I'm waiting for a > particular key to be pressed, how can I poll those ports to see that > it has been pressed? > To unsubscribe from this group, send an email to: |
|
In a message dated 9/23/02 8:22:13 AM Eastern Daylight Time, writes: > BUT, if I'm waiting for a > particular key to be pressed, how can I poll those ports to see that > it has been pressed? I write an 'any key pressed' function that turns all the outputs on, then checks to see if any input is pulled lo... I cant tell which colum its in, but who cares? Just check to see if a key is pressed every so often.... I'd say every 50 ms is fast enough (who can key inputs 20 times a sec?) [Non-text portions of this message have been removed] |