Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: Amazon Re: [AVR-Chat] The keyboard

2005-02-18 by Stefan Trethan

On Fri, 18 Feb 2005 15:16:04 -0500, Dave VanHorn <dvanhorn@dvanhorn.org>  
wrote:

>
> The easy way to do a matrix keyboard, is to take rows (or columns) and  
> make
> them inputs pulled up, and take the other side (col or row) and make them
> the scanned outputs, active low.
> So, when you are seeing all highs, no keys are pressed.
> When you see a low on any row, then you check what col you have set low,
> and now you know what key(s) are pressed.
>


I am currently making something with a 3x4 keyboard.
I have connected the 3 columns to the 3 external iterrupts, and the 4 rows  
to I/O.
The plan is to set the column pins (interrupts) to pullup, and input, and  
the rows to output, low.
My hope is when someone presses a key the interrupt line goes low, causing  
a interrupt and in the ISR i switch the rows input and columns output to  
see which button it was.

Would be nice to know if this will actually work, i just guessed...

ST

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.