Author Topic: Which pins can I use as input signals on the Teensy 3.2?  (Read 2647 times)

0 Members and 1 Guest are viewing this topic.

Offline TheWrench

  • Thread Starter
  • Posts: 6
  • Location: Switzerland
Which pins can I use as input signals on the Teensy 3.2?
« on: Thu, 03 August 2017, 15:45:48 »
Hello guys

I'm building my first keyboard. I could make the layout and the parts for the keyboard, but I don't get how to connect the switches with the wires.
I read already this articles:
http://blog.komar.be/how-to-make-a-keyboard-the-matrix/
https://deskthority.net/workshop-f7/brownfox-step-by-step-t6050.html
https://www.pjrc.com/teensy/card7a_rev1.png
https://github.com/kiibohd/controller/wiki/Custom-Keyboard-using-a-Teensy-3.0-3.1-3.2#choose-pins-on-the-teensy

I understand the wiring of the matrix but not the Teensy itself.

On the picture I uploaded, the pins are marked in different colours. This is what I assume these pins are for:
174928-0
Dark blue: main output to power the switches.
Light blue: normal input to register which key was pressed
Brown: output to power optional LEDs
Red: not needed for keyboards
Pin 13: Could be used for led for optional debugging

Am I right with these assumptions? I would be thankful for correcting me when I'm wrong with anything I've written so far.
Is it right that keyboards aren't grounded? If so, which pin do I have to use? And with what should I connect it.
Thank you in advance.
« Last Edit: Fri, 04 August 2017, 08:27:23 by TheWrench »
Only compare yourself to yourself, we all start at different positions

I have a big dream and this site proofs I'm working on it.

Offline Tactile

  • Posts: 1435
  • Location: Portland, OR
Re: Which pins can I use as input signals on the Teensy 3.2?
« Reply #1 on: Thu, 03 August 2017, 16:47:16 »
I'm building my first keyboard. I could make and buy everything so far, but I have trouble in figuring out which pins can be used to detect an input signal.

A signal from where - the keyboard or USB?

Any of the ports (which have eight pins each) can be configured as input or output, using the Data Direction Register (DDR) for that port. I'm not sure where you are going with your questions or what you're trying to accomplish but maybe this or this will help. Or you can look at how other people have used a Teensy with a keyboard.
REΛLFORCE

Offline Tactile

  • Posts: 1435
  • Location: Portland, OR
Re: Which pins can I use as input signals on the Teensy 3.2?
« Reply #2 on: Thu, 03 August 2017, 22:29:56 »
I just had another look at your post and I see that you seem to be talking about a Teensy 3.2. If you're set on using that, you can disregard everything I wrote in the reply above. All that information is for the Teensy 2.0 and it's all wrong for the Teensy 3.2.

Just about everyone who deals with a Teensy in a keyboard uses the Teensy 2.0. The source code available on the internet, web sites showing hand wired projects, everyone uses the Teensy 2.0 with the Atmel 32U4.

Info about using the Teensy 2.0 is available here on Geekhack and around the 'Net - there are lots of folks with experience using that. If you are going to use a Teensy 3.2 I have no idea where you could go for advice, help, coding examples, or anything else.
REΛLFORCE

Offline TheWrench

  • Thread Starter
  • Posts: 6
  • Location: Switzerland
Re: Which pins can I use as input signals on the Teensy 3.2?
« Reply #3 on: Fri, 04 August 2017, 08:48:07 »
I mean the signal from the keyboard (switch). I have the Teensy 3.2 and can't really change at this point from the project to another board. I already knew the first article that you sent me and read now the second one. My question is about the soldering part, not how to program it. I (think I) know how to do that, but I'm completely stumped about soldering the wires to the pins.
Sorry for the confusion.

Thank you for helping me @Tactile  ;D
Only compare yourself to yourself, we all start at different positions

I have a big dream and this site proofs I'm working on it.

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Which pins can I use as input signals on the Teensy 3.2?
« Reply #4 on: Fri, 04 August 2017, 09:43:56 »
You can use any of the grey ones in your original post's picture.
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline TheWrench

  • Thread Starter
  • Posts: 6
  • Location: Switzerland
Re: Which pins can I use as input signals on the Teensy 3.2?
« Reply #5 on: Fri, 04 August 2017, 13:05:39 »
Okay, thank you  @TalkingTree, but can I also use the four middle pins?
And what is with pin 14?
Are the brown marked switches really for LEDs?
Only compare yourself to yourself, we all start at different positions

I have a big dream and this site proofs I'm working on it.

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Which pins can I use as input signals on the Teensy 3.2?
« Reply #6 on: Fri, 04 August 2017, 14:33:29 »
but can I also use the four middle pins?
Not leftmost two in your picture for the first one is a VBUS and the other is AREF. The rightmost two are for you to use, as you can see here.

And what is with pin 14?
If you mean A14, that's the Digital Analogue Conversion pin. You can use it freely if you don't need such feature.

Are the brown marked switches really for LEDs?
Brown pads are analogue pads. Generally speaking, many designers use PWM pins for LEDs because they can change the light intensity through the firmware.
 
I frankly know little nothing about the Cortex-M4, but the product's datasheet surely would.
« Last Edit: Fri, 04 August 2017, 14:35:56 by TalkingTree »
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline TheWrench

  • Thread Starter
  • Posts: 6
  • Location: Switzerland
Re: Which pins can I use as input signals on the Teensy 3.2?
« Reply #7 on: Sat, 05 August 2017, 06:42:49 »
Thank you so much TalkingTree. This helps me, and I'm sure also others later so much.
I upload the picture again just to check that I fully understood it.
175089-0
Only compare yourself to yourself, we all start at different positions

I have a big dream and this site proofs I'm working on it.

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Which pins can I use as input signals on the Teensy 3.2?
« Reply #8 on: Sat, 05 August 2017, 06:53:25 »
You are correct. All the light blue in your picture are I/O pins. Theoretically you also have access to pads on the back of the Teensy 3.2 as you can see in the following image, but twentysix pads should be plenty already.

My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline TheWrench

  • Thread Starter
  • Posts: 6
  • Location: Switzerland
Re: Which pins can I use as input signals on the Teensy 3.2?
« Reply #9 on: Sat, 05 August 2017, 07:55:49 »
Ah okay, that's awesome, because it's a gamepad and with the pads, I can have full anti-ghosting (35 keys). The 3V and the GND pin can't be used again when I understood this right...
But the other pins were 27, not 26, right? Or have I counted false?
Only compare yourself to yourself, we all start at different positions

I have a big dream and this site proofs I'm working on it.

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Which pins can I use as input signals on the Teensy 3.2?
« Reply #10 on: Sat, 05 August 2017, 08:08:39 »
But the other pins were 27, not 26, right? Or have I counted false?
You're right, I didn't include the DAC in my counting.
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline TheWrench

  • Thread Starter
  • Posts: 6
  • Location: Switzerland
Re: Which pins can I use as input signals on the Teensy 3.2?
« Reply #11 on: Sat, 05 August 2017, 08:36:32 »
So at the end, we have 39 input pins on the Teensy 3.2. And again thank you :)
Only compare yourself to yourself, we all start at different positions

I have a big dream and this site proofs I'm working on it.

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Which pins can I use as input signals on the Teensy 3.2?
« Reply #12 on: Sat, 05 August 2017, 08:40:28 »
Don't mention. I'm looking forward to see your project.
Enjoy.
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff