Keyboard matrix scan using Xmega IO ports

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

 

Could you please clarify the following point? Here is the example of a keyboard matrix scan for non-Xmega mcu: https://extremeelectronics.co.in...

 

One have to set all columns to high Z state, and then set one of the columns to OUTPUT LOW. However Xmega allows to set all columns to Wired-AND OUTPUT HIGH. And then one of the columns can be set to Wired-AND OUTPUT LOW to detect key presses on this column. Is it right? I don't understand what is the advantage of Xmega. Could this scheme be improved significantly?

 

Also I have a related question. A three-stated pins of non-Xmega mcu allows to use charlieplexing for leds and key switches. Does Xmega provides some advantages for multiplexing or matrix schemes?

Last Edited: Wed. Nov 25, 2020 - 04:16 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I split your question from a 7 YO thread.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ares_ekb wrote:
Here is the example of a keyboard matrix scan

Should you not ask the author of the blog this question(s)? 

 

Have you read the AVR app notes on keyboard scanning: AVR240 + AVR243 ?

 

Jim

 

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

Last Edited: Tue. Nov 24, 2020 - 08:00 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I did not read these particular notes (thanks for pointing). However I read tons of other materials on keyboard scanning based on 1) simple matrix, 2) several variants of charlieplexing, 3) shift registers, 4) latch, 5) DAC and voltage dividers in particular, 6) frequency modulation (based on inverter or even ne555), 7) some crazy stuff like tucoplexing. So I understand how to scan keyboards.

 

The original 7 year old post was on advantages of Xmega I/O ports. Non-Xmega has only 4 port configurations. And Xmega has much more port configurations. For example, it was explained in the original post that it simplifies I2C usage. So the question is: does Xmega IO ports has any significat advantages for keyboard scaning or signal multiplexing? Is it possible to implement a completely different multiplexing scheme? Why this IO ports are so cool?

 

(Actually the question is related to the original post on Xmega ports. That's why I asked it here and not to Avinash.)

Last Edited: Wed. Nov 25, 2020 - 04:15 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ares_ekb wrote:
So the question is: does Xmega IO ports has any significat advantages for keyboard scaning or signal multiplexing? Is it possible to implement a completely different multiplexing scheme? Why this IO ports are so cool?
Advantage compared to what exactly? 

 

The "coolest" thing about Xmega IO compared to traditional tiny/mega are the added bellls and whistles like SET/CLR/TGL etc that the old AVR did not offer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For example traditional AVR IO ports are three-stated. It allows to implement a keyboard matrix scan using high Z state, or implement a charlieplexing. I guess it would be impossible or much harder to implement it using a more primitive IO pins without high Z state or pull-up resistors. Or it would require external pull-up resistors.

 

But Xmega IO ports are even more advanced than traditional AVR IO ports. So I guess that it should allow one to implement some "magic", which is not possible or very complicated with traditional IO. If it's not true, then I don't understand why all this pin configuration options were added. Or maybe my examples (keyboard scan and multiplexing) are too primitive. And Xmega IO ports give advantages for a more complicated tasks.