I-O Warrior 40 switch matrix question

This is the English forum for all topics related to IO-Warrior. Please post in English only

Moderator: Guido Körber

Post Reply
Veramacor
Posts: 3
Joined: Sat Nov 24, 2007 6:25 pm

I-O Warrior 40 switch matrix question

Post by Veramacor »

Hi there,

I see in your examples that you are using shift registers to allow driving of an 8x8 LED/Switch matrix.

I would like to keep the chip count down in my design and am looking to have the IO-Warrior as my only IC chip.

My question: Can the IO-Warrior have an 8x8 switch matrix driven at the software side?

I'm not looking at high speed in particular, and I'm driving only switches not leds so power is not a concern.

For example:

If I use 16 I/O pins (8 per row, 8 per column) and use a software loop to drive one row high at a time and read 8 columns, go to the next row, etc, is this possible?

I know that I wont achieve 8msec, but why wouldn't I be able to continuously loop thru the 8x8 matrix and checking the switch states?

I want to do this because I have a need for at least 6 more switches outside the 8x8 matrix for other functions

IO-Warrior40 software hypothetical loop....

main:
for i = 1 to 8
for j = 1 to 8
'Read pin state for (i,j) matrix
next j
next i

read pin 17
read pin 18
read pin 19
read pin 20
read pin 21
read pin 22

goto main:




Thanks,

Jeff
Guido Körber
Site Admin
Posts: 2856
Joined: Tue Nov 25, 2003 10:25 pm
Location: Germany/Berlin
Contact:

Post by Guido Körber »

You don't need to do this. The IOW40 and IOW56 have a 8x8 switch matrix function integrated that needs no additional chips. It is only the LED matrix function that needs additional chips.

The scanning of the matrix is done automatically by the IOW, though we drive a row low to check for any pressed keys.

If you want to be able to allow any combinations of keys pressed you will have to add diodes at the keys though.
Veramacor
Posts: 3
Joined: Sat Nov 24, 2007 6:25 pm

Post by Veramacor »

Thanks,

I'm aware of the 8x8 matrix function, and I'd like to use that if I can...


But, I have 68 keys to take care of ie

64 keys that will all have diodes on them PLUS:

4 pushbuttons that are not part of the matrix.

Can I run the 8x8 function at the same time as I am looking at other I/O pins?

(16 I/O pins dedicated to the 8x8 matrix + 4 I/O pins separate from the matrix for a total of 20 I/O pins)

That would be very cool :)
Guido Körber
Site Admin
Posts: 2856
Joined: Tue Nov 25, 2003 10:25 pm
Location: Germany/Berlin
Contact:

Post by Guido Körber »

Yes, the pins not used by the switch matrix continue to function normally, so you will get a report every time anythign changes on them.
Veramacor
Posts: 3
Joined: Sat Nov 24, 2007 6:25 pm

Post by Veramacor »

That is exactly what I had hoped for!

One last question on the switch matrix and extra buttons

I'm not positive, but if I had 68 buttons and no LEDS, No Relays, just 68 buttons, can I drive the whole thing off of USB power?

Thanks again

Jeff
Guido Körber
Site Admin
Posts: 2856
Joined: Tue Nov 25, 2003 10:25 pm
Location: Germany/Berlin
Contact:

Post by Guido Körber »

Yes, the switches don't require any significant power.
Post Reply