[Teensy 3.1] Pinout Diagram - with example code for sensors / devices

Status
Not open for further replies.

rootScript

Active member
Hello guys,
I have been working on a Teensy 3.1 pinout diagram. I have tried to make a little interactive example, in order to get some feedback. Here is a link to version 0.1: external link to Teensy 3.1 Pinout Diagram (Just press the big [Grey] buttons on the example page).

Any suggestions to improve it, and any requests / additions you would like added, would be appreciated.
I am hoping to add a list of common components / sensors / devices, along with some example code for IC2 / SPI devices etc..., and maybe a youtube video showing the hardware working with the code example.

I would be willing to document whatever you guys want, if you were able to contribute some code examples; Is this something that you guys would be open to?
:)
Carlos
teensyExplained_v0.1_ALL.jpg

**UPDATE** If you follow the external link to Teensy 3.1 Pinout Diagram
(Just press the big grey button [I2C Ports] - You should see a long blue button in the middle of the diagram, press it, and an example of some code & a youtube video should pop up).
This is just my first test for a suitable interface to show the pinouts, some code, and a video.
It is a little messy, but should be good enough to explain the concept.
 
Last edited:
Very nice concept! I can't wait to see how this develops!

Ideas to consider:

The lines connecting the pin function to the pins are hard to see against the green background. I'd suggest more contrast. For example, change the background to white or a green that's very near white and make the lines slightly wider in dark intense colors.

Switch the diagram to vertical instead of horizontal so there's more room for the pin labels.

Make the links across the top additive so that the user can check off all the functions they want to use; and make the script search for non-conflicting ways of assigning all the pins.

Provide text fields so that the user can document the pinout of their project and button for generating a pinout diagram with the user's documentation. You might use SVG to do this. One way would be to draw a template in Inkscape and use Javascript to substitute in the labels.

Use a very washed out nearly white photograph of a Teensy 3.1 for the background so there's no ambiguity about which side is up. Add a button to switch between Teensy 3.1 and Teensy 3.0. Show the back view as well.
 
Note, pins 0/1 (i.e. Serial1's rx1/tx1) are also connected to a hardware serial port.

Quoting from Paul in a previous posting:
Teensy 3.0 has an 8 byte FIFO on the primary UART, 4 word FIFO on the SPI bus, and a 4 word FIFO on i2s. Teensy 3.1 has 8 byte FIFOs on Serial1 and Serial2, a 4 word FIFO on SPI, an 8 word FIFO on I2S, and a 6 message FIFO on CAN.

You will need to cover the bottom pins and top pins (A10, A11, Aref, Vusb) at some point in the future. I'm not sure if it is worth it to cover the alternate pins (at least until there are ways to use those pins instead of the standard pins).

You should have links for the touch pins (and not just have a T in the pin label).

For those of us still using Teensy 3.0, you probably should have some notation of Teensy 3.1 features (A14/DAC instead of being reset, 2nd I2C, etc.).

You probably need to note that some of the analog pins (A10, A11, A12, A13, and A14) cannot be used as digital pins, and those pins are not 5V tolerant.

I like the idea of having example programs, but that can get to be a lot of work.

Now that Paul is starting to offer 'carriers' (his version of shields, capes, etc.), a useful overlay would be which pins each carrier uses.

For my own use, I have created a spreadsheet, that lists the pin-outs of various microprocessors, some that I own, some I don't own (at least yet). It also includes things that other people have found, but I haven't seen documented, such as pin 33 being held low at startup puts the Teensy 3.0 into EZ port mode (I don't know if the Teensy 3.1 has the same feature): https://docs.google.com/spreadsheet/ccc?key=0AqMAmYxHItUAdDdlcURnY1NRRlFfLWdIbkdWamxfckE#gid=0

I'm sure your visualization will get better over time, but for now, I find the diagram somewhat hard to see, compared to the picture of the pins that comes with the Teensy. Perhaps it is just I'm so used to the current diagram.
 
Thank you guys for your feedback :) I really wanted to contribute something that would be useful to amateurs who are just starting out with Teensy (like me).

@pictographer - Everything looked great on my 27" screen, but after I published to the website, I think I would have to agree with your feed back. I will thicken the lines, change the BG colour, and switch to vertical for a closer view. I think I will add the washed out photograph of Teensy for the background too.

@MichaelMeissner - I will add the RX1/TX1 hardware serial port info, and add a button for the touch pins too. I didn't know anything about the Teensy 'carriers', I would love to know more; I recently spent half a day googling "Teensy 3.1 shields", and have been thinking about making a I2C Port Expander shield for Teensy 3.1.

I will do the best that my free time allows to do a better job on version 0.2, hopefully it will become clearer and more useful. I will try to get the next version ready for middle of next week.
Thanks again for your advice.
Best Regards,
:D
 
I have an extremely basic question: Why do you mark the pins for Serial3 differently than for Serial1 or Serial2? Are the three UART modules not fully equivalent?
 
If you are talking about the greyed out text, I put them in thats way as they were on the original document. As to why they are that way, I'm glad you asked, it was something I was unsure about.

The most I could guess, is that these have alternate pin functions, maybe the greys are the default pin registers, or that the greys are alternate functions that need to be registered over the default GPIO pin. It is a question for someone bigger than little me. pinModes that are changed can be returned to normal I/O mode by using pinMode(). Thats about as far as I got (and again I could be reading it all wrong)(my logic is dependent on how hot my cup of tea is, and whatever the last thing my wife said to me :)).
 
Last edited:
Also as MichaelMeissner mentioned pins 0,1 & 7,8 are hardware uart serial pins, so pins 5,21 be selectable in code. Maybe someone can confirm.
 
Last edited:
If you are talking about the greyed out text,
I was thinking of the lines going to pins 7 and 8 but not the other four.

I like the whole idea you're working on, that presentation would have saved me some time already. Probably still will at some point in the future. ;-)
 
@MichaelMeissner - I will add the RX1/TX1 hardware serial port info, and add a button for the touch pins too. I didn't know anything about the Teensy 'carriers', I would love to know more; I recently spent half a day googling "Teensy 3.1 shields", and have been thinking about making a I2C Port Expander shield for Teensy 3.1.
:D
Sorry, I didn't notice the reply before.

The 'carriers' (or 'adapters' as they are called in the PJRC store) are similar to the concept of shields in the Arduino land. To find out about them, you need to read the announcements group (or just look at the items for sale -- note some of the adapters are for Teensy 2.0/2.0++, so you need to look at it in detail). Lets see, for Teensy 3.x the following are there:

 
Last edited:
I have started to add some components here (input devices):
http://dev.rootscript.com/hid/
For the moment just a description, product video, data sheet, .ino code, and a schematic.
If any one wants to contribute wiring diagrams, updated info, caveats, or Teensy specific code, they would be most welcome.
:)
Carlos
 
Status
Not open for further replies.
Back
Top