Connections

Status
Not open for further replies.

grease_lighting

Well-known member
One of my biggest problems in creating a project is determining what Teensy 3.2 pins to use for a given shield and are any other pins that MAY be needed as well. My background is in electronics and the coding part is trial by fire. I've been doing this for about 3 years now.

An example of this is the WIZ820 ethernet shield. Like others I find thru search of this forum/web or trial and error that I need Teensy pin #9 to be used for the WIZ820 RESET. Also in my searching I find that pin #8 is assigned for the power down function. I understand that for each functional shield used there is software (drivers) and each uses a pre-determined pin set to 'talk' to the module.

So my question is where in the software do I look, (file names, extensions) to find the pins used for a given shield so I may select and connect them without interfering with another shield or home brew electronics used in my project?
 
You could switch away from the too simplistic Arduino IDE and use for example the Eclipse based "Sloeber" for software developing. It allows you to open (and to edit) included libraries, and even the Teensyduino core files at the same time as your sketch in different tabs.

If it's only about the pin numbers, these should normally be documented with the corresponding shield or library, like in this example: https://www.pjrc.com/teensy/td_libs_Ethernet.html

Or you look up for details in the library code. If you don't want to switch to another IDE, you find everything on GitHub for lookup purposes:
https://github.com/PaulStoffregen/Ethernet/blob/master/w5100.h
 
Last edited:
So my question is where in the software do I look, (file names, extensions) to find the pins used for a given shield so I may select and connect them without interfering with another shield or home brew electronics used in my project?

There isn't a single easy answer on the software side. Usually the pins which are configurable are mentioned in the examples. For pins that can't be reassigned by software (for whatever reason), usually there's little mention found in the code. Often the details are buried deep within very complex code. For those fixed pins, you'd usually find the pins mentioned on the hardware description.
 
I make a spreadsheet with all pin numbers and their Teensy functions (GPIO, UART, SPI, I2C), and then I try to make a matrix with all the peripherals I'm gonna connect. I start with filling in the spots that will need (FIFO) UART, SPI and I2C, because these pins are pretty much fixed. The rest is used for GPIO to the peripheral who need them.

It is not that hard because only some GPIO pins are hardcoded (actually, only the Ethernet library and to some extent SD).
 
Status
Not open for further replies.
Back
Top