Teensy Pinout Help Needed

User avatar
Sandpaper600

28 Jul 2022, 00:52

OK. Maybe I was too vague on my previous post about exactly what I needed help with.

I am building a 49 key gaming pad. I have a Teensy 2.0 that I want to use to control it. The pad thus far:

Image

At this point I don't know which pins I should be using for rows, which I should use for columns and which I need to avoid altogether.

I know I face serious issues with the actual programming (for me), but one step at a time, right? ;)

As many keyboards that seem to have been built by this community, I'm sure a portion of you have hand wired at least one.

I just need pointed in the right direction.

User avatar
jsheradin

28 Jul 2022, 09:59

You can use any pin you want for any row/column as long as it's not VCC, GND, AREF, etc.

Check out page 29 here for a quick way to get QMK set up.

User avatar
Muirium
µ

28 Jul 2022, 11:47

^ He's quite right. ;)

A Teensy is a general purpose development board. It's down to you to program it to run a keyboard, it won't do it automatically out of the wrapper. Fortunately, there's a handful of firmwares available for you to try. But when driving your own matrix: you're always the one to choose which pins are rows and columns, because every matrix is different.

Here's the Teensy 2 pinout:

Image

The inner labels—PB0 PF0 etc.—are the relevant ones. All the pins starting with P are programmable. Connect each of your rows and columns to *one* of those and then you can define them in the code, and you should be up and running.

I see your diodes. Good move: you've got NKRO that way. Those do mean there's a "right" way and a "wrong" way to drive your matrix. If you have no luck on the first try: swap your columns and rows over in code and it should work. Diodes only let electricity flow through one way, so driving them backwards doesn't work.

(Technically, you drive a matrix by "strobes" and read out the state via "senses". Those are the things to swap if your diodes block you. Soarer's controller defines this explicitly, I've not tried other controllers.)

User avatar
Sandpaper600

28 Jul 2022, 23:16

@jsheradin...Thanks for the Info and link!

@Mu...Always a fount of knowledge!

If I am reading between the lines correctly, I can run my columns off PB0 - PC7 and rows off PF0 - PF6.

It seems to me I may have seen somewhere that it doesn't matter where the connection is made on the rows/columns?
I can make shorter connections if I don't need to connect at the ends of the rows/columns.

Is this true?

User avatar
Sandpaper600

28 Jul 2022, 23:18

Also, what are all the letters referencing on the outer columns of the pic (SS, SCLK, etc)?

User avatar
Muirium
µ

28 Jul 2022, 23:31

Advanced stuff I don’t understand. But I certainly have used every one of those Pxx pins to drive a large matrix before, without issue. Oh: except annoying pin D6 for the onboard LED. Best avoid that one. :roll:
Sandpaper600 wrote:
28 Jul 2022, 23:16
I can make shorter connections if I don't need to connect at the ends of the rows/columns.

Is this true?
Generally yes. Be careful around your diodes though. Connect to the rail side, not the switch side of those.

User avatar
Sandpaper600

28 Jul 2022, 23:54

Thanks. I'll let you guys know how I make out.

Post Reply

Return to “Workshop”