Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 11 of 11

Thread: Teensy 3.0, Adafruit's SSD1306 128x32 OLED, and Pin Designations

  1. #1

    Question Teensy 3.0, Adafruit's SSD1306 128x32 OLED, and Pin Designations

    I thought I would post for clarification before I blow anything up on my bread board.

    I have a teensy 3.0 and want to connect it to an Adafruit OLED 128x32 and I am stuck on pin designations. I looked at a diagram for the teensy 3.0, and another for an Arduino Uno, and picked a connection referred to on this page http://learn.adafruit.com/monochrome...i-oled-display, specifically the text
    "Finally, connect the pins to your Arduino - GND goes to ground, Vin goes to 5V, DATA to digital 9, CLK to digital 10, D/C to digital 11, RST to digital 13 and finally CS to digital 12."
    RST to digital 13 - On the teensy 3.0, that is CS2. On the Uno, it is SCK. SCK is digital pin 12 on the teensy 3.0.

    I have looked and looked, and looked some more and I cannot find a connection diagram for the teensy 3.0 and this neat little display. I also have failed to find a diagram showing what the teensy 3.0 pins refer to on an arduino. So if a hookup tutorial like the page mentioned above says "digital 10" I would know what that would refer to on a Teensy 3.0.

    I hope someone can help. I love these little teensy boards, and have a 3.1 on the way. I figure if you can write sketches that use arduino libraries and can run on the teensy, there would be a guide to show what pins refer to as it would on an Arduino Uno or whatever.

    Thank you so very much for your time!

  2. #2
    HopWorks,

    The Teensy 3 pinout is shown near the bottom of THIS page. The adafruit tutorial is using a software SPI approach so any digital pins can be used. The available pins are shown as grey on the Teensy 3.1 pinout diagram. So you can follow the diagram and connect as indicated in the tutorial. I am assuming that the library and example compile without errors with the latest Teensyduino 1.17 libraries.


  3. #3
    Ouch. Out of the box on github, the adafruit example includes a supposedly packaged library that is misnamed, and also references 'wire.h' that isn't included. I also cannot find that library in my arduino install.

    Looks like I have some work to do. I guess I could just start from scratch and use the hardware SPI (why use softSPI I wonder?). I have a datasheet although "CONFIDENTIAL" is annoyingly stamped in red across each page. Since I picked Teensy as my processor board of choice (I have a 3.1 on the way), and the PIC32MX250F128B as my favorite stand-alone prototyping MCU, Ilib want to adapt the libraries for all my favorite prototyping hardware.

    Thanks for the push in the right direction pkourany. I appreciate it!

  4. #4
    Senior Member
    Join Date
    Nov 2012
    Location
    Boston, MA, USA
    Posts
    1,107
    Quote Originally Posted by HopWorks View Post
    Ouch. Out of the box on github, the adafruit example includes a supposedly packaged library that is misnamed,
    Yes, you need to remove "-master" from the name of the library (all github libraries are like that)
    Quote Originally Posted by HopWorks View Post
    and also references 'wire.h' that isn't included. I also cannot find that library in my arduino install.
    Its in libraries/Wire/Wire.h

    Quote Originally Posted by HopWorks View Post
    Looks like I have some work to do. I guess I could just start from scratch and use the hardware SPI (why use softSPI I wonder?).
    Because "no-one needs fast screen updates" (really, that is what they gave as the reason, to multiple people).
    Have a read through this thread, there is an answer posted at the end, using Teensy 3.0 and Nick Gammon's hardware SPI for 1306 library (again, hosted on the Arduino forum because, as he reports, Adafruit won't merge in the changes).

    Quote Originally Posted by HopWorks View Post
    I have a datasheet although "CONFIDENTIAL" is annoyingly stamped in red across each page. Since I picked Teensy as my processor board of choice (I have a 3.1 on the way), and the PIC32MX250F128B as my favorite stand-alone prototyping MCU, Ilib want to adapt the libraries for all my favorite prototyping hardware.
    I have a 3.1 on the way as well (coming from Floris.cc, the Dutch distributor, and shipped yesterday). I found theK20 Sub-Family, 72Mhz, 64pin document and the K20 Reference manual for 72MHz 64pin devices. Also some errata.
    Last edited by Nantonos; 12-12-2013 at 11:17 AM.

  5. #5
    Senior Member
    Join Date
    Nov 2012
    Location
    Boston, MA, USA
    Posts
    1,107
    Quote Originally Posted by Nantonos View Post
    I have a 3.1 on the way as well (coming from Floris.cc, the Dutch distributor, and shipped yesterday). I found theK20 Sub-Family, 72Mhz, 64pin document and the K20 Reference manual for 72MHz 64pin devices. Also some errata.
    Actually I see the Teensy datasheets page is updated to add the 3.1 datasheets.

  6. #6
    HopWorks, you may want to consider the U8gLib graphics library which includes support for the SSD1306 and both software and hardware SPI. I have not tried the latest version with the Teensy 3 but others on this forum have.


  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,314
    Just a quick followup... Adafruit sent me one of these OLED displays today. I had the I2C one here, but not the SPI. When it arrives, I'll test and document it with Teensy 3.0 & 3.1.

    This thread appears to duplicated on Adafruit's forum. Here's the link:

    http://forums.adafruit.com/viewtopic...teensy#p236100

  8. #8
    Quote Originally Posted by Nantonos View Post
    Wow, thank you! I just reduced the quote to save space here, but I thank you for ALL of your reply!

  9. #9
    Quote Originally Posted by PaulStoffregen View Post
    Just a quick followup... Adafruit sent me one of these OLED displays today. I had the I2C one here, but not the SPI. When it arrives, I'll test and document it with Teensy 3.0 & 3.1.

    This thread appears to duplicated on Adafruit's forum. Here's the link:

    http://forums.adafruit.com/viewtopic...teensy#p236100
    Yes it is Paul. I went fishing there too, mostly because I was a little miffed that they didn't mention or support (with examples) the Teensy as a possible controller for this display. And they SELL Teensy's. When a chap there said he was forwarding what I posted to you, I clarified that I posted here as well. I didn't break any rules of etiquette did I?

  10. #10
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,314
    Not a problem, but it does help me if each forum has a link to the other one's thread. Usually I end up looking at this quite some time later (like when I actually have the hardware), so the links help avoid a situation where someone (much later) finds an old thread without any final resolution and mistakenly concludes the problem was never solved.

  11. #11
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,314
    I posted a detailed reply on Adafruit's forum, with photos showing the correct connection.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •