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

Thread: [?] New Haven 128128ASC3 wiring and SPI library

  1. #1
    Junior Member
    Join Date
    Oct 2018
    Posts
    18

    [?] New Haven 128128ASC3 wiring and SPI library

    Hi,

    I am trying to use a NewHaven 128128ASC3 OLED display with my Teensy 3.6.
    I've followed different guides and posts on this forum, but at the moment I am not getting anything but a dark screen.

    My first question is which wiring I should follow?
    At the moment I am using the one suggested by the library that I am using, that is:

    • MOSI to Pin 11
    • SCLK to Pin 13
    • DC to Pin 15
    • CS to Pin 10
    • RESET to Pin 14


    Click image for larger version. 

Name:	wiring.jpg 
Views:	165 
Size:	160.1 KB 
ID:	15043

    And I've tried to clock the Teensy CPU to almost all speeds from 24MHz to 96MHz and using the #define SLOW_SPI (as suggested) before including other headers. with all the examples provided by the library, but with no luck

    Do you have any experience with this display? Could you give me some hints?

    Thank you.

  2. #2
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,594
    This display has two CS connections, one for the OLED and one for the SD card. Make sure you are using the correct one to drive the display. Out of that, you should really follow meticulously the complete wiring diagram published in NewHaven’s data sheet:
    Click image for larger version. 

Name:	778126F1-122B-4AAB-908F-39901C9BF3C9.jpg 
Views:	100 
Size:	49.6 KB 
ID:	15044

  3. #3
    Junior Member
    Join Date
    Mar 2017
    Location
    Germany
    Posts
    19
    Wiring looks okay so far.
    Did you cut the trace between VUSB and VIN on the Teensy? In this case your display has no supply voltage with your current wiring.
    The soldering on the pin header of the display looks a bit dirty. Have you checked if every pin has proper contact?
    This library seems to be untested with Teensy 3.6. I did not look to far into it, but even if it compiles it could be worth a try to test a different library just to be sure?

  4. #4
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    4,458
    Quote Originally Posted by MichaelB View Post
    Wiring looks okay so far.
    Did you cut the trace between VUSB and VIN on the Teensy? In this case your display has no supply voltage with your current wiring.
    The soldering on the pin header of the display looks a bit dirty. Have you checked if every pin has proper contact?
    This library seems to be untested with Teensy 3.6. I did not look to far into it, but even if it compiles it could be worth a try to test a different library just to be sure?
    The version Adafruit_SSD1351.h library included with the Teensy releases will work with this OLED display. On the Teensy 3.5 and 3.6, I have discovered that you need to limit the NewHaven display SPI bus speed to at most 18Mhz (the Teensy library sets it to 8Mhz), but other programs like Adafruit's uncanny eyes program might set it higher. If you use the version from Adafruit, it doesn't have SPI_TRANSACTION support, so you might or might not need to lower the 3.5/3.6 clock speed fairly low to get it to work (the SPI transaction support includes an explicit SPI bus speed).

  5. #5
    Junior Member
    Join Date
    Oct 2018
    Posts
    18
    Quote Originally Posted by MichaelB View Post
    The soldering on the pin header of the display looks a bit dirty. Have you checked if every pin has proper contact?
    Uhm, I checked contacts with tester and I've noticed that two pins (CD, 3Vo) result in someway touching the GND pin (even if they are next to each other) So, I guess this is not a good thing!
    I'll try to unsolder them, but I am afraid that I've already killed the board.

  6. #6
    Junior Member
    Join Date
    Oct 2018
    Posts
    18
    Quote Originally Posted by MichaelMeissner View Post
    The version Adafruit_SSD1351.h library included with the Teensy releases will work with this OLED display. On the Teensy 3.5 and 3.6, I have discovered that you need to limit the NewHaven display SPI bus speed to at most 18Mhz (the Teensy library sets it to 8Mhz), but other programs like Adafruit's uncanny eyes program might set it higher. If you use the version from Adafruit, it doesn't have SPI_TRANSACTION support, so you might or might not need to lower the 3.5/3.6 clock speed fairly low to get it to work (the SPI transaction support includes an explicit SPI bus speed).
    I was thinking that defining SLOW_SPI (as documented by library author) SPI was limited to 18MHz despite the Teensy CPU speed.
    Maybe I'm trying to use a OLED that it is not fitting well with Teensy.
    Since maybe my display has dead (because wrong soldering), I am looking for a decent display OLED or TFT (at least 128x128) with 16bit colors (or more) that could run with a good FPS refresh (>30FPS) and will not limit the Teensy speed. I was thinking that OLEDs with SSD1351 were well supported with Teensy, but maybe I got it wrong.

  7. #7

  8. #8
    Junior Member
    Join Date
    Oct 2018
    Posts
    18
    Wow! C64 Commando!!!
    Anyway it seems pretty fluid, nice color and well supported (and also cheap, I just found it at 15€ on Amazon, considering that I spent 20€ for the NewHaven on Mouser).
    I am going to buy it!

  9. #9
    Senior Member
    Join Date
    Apr 2014
    Location
    -
    Posts
    9,735
    Buy the SPI variant. Others are not supported by the libraries.
    For the speed in the videos you need a Teensy 3.6, only the Teensy 3.6 can reach enough SPI-Speed. The ILI9341 is overclocked here. Use very short cables / connections (Edit: way shorter than shown post #1!), best is a PCB.
    The Teensy64 Emu is open source.

  10. #10
    Junior Member
    Join Date
    Mar 2017
    Location
    Germany
    Posts
    19
    Although I really like the ILI9341 (and do in fact use ist too) there is no voodoo behind SSD1351 and it would be interesting to find out what is wrong with your setup. Might be worth it to further investigate. At the time I have just the bare SSD1351 OLED lying around, but I recently ordered the Adafruit version with breakout board and will do a test run with a T3.6. At the moment I can't see why the Newhaven version should not work.

  11. #11
    Junior Member
    Join Date
    Oct 2018
    Posts
    18
    Quote Originally Posted by MichaelB View Post
    At the moment I can't see why the Newhaven version should not work.
    You're right, but I am afraid that there are some soldering issues, I have to check better this evening, but it seems that some pins are in short, I mean I have made a quick check with continuity checker and it is beeping when I touch pin CD and 3Vo and GND, maybe it is not a real problem, I have to check schematics (even if I am not such an electronics expert).
    Anyway since the other display was quite cheap I prefer to have an alternative and don't waste to much time riding a dead horse.

  12. #12
    Junior Member
    Join Date
    Oct 2018
    Posts
    18
    Some updates.

    I was able to get it running, but with some nasty workarounds:

    • It works only with CPU speed at 24MHz or lower.
    • I have to disconnect pin 10 (CS0) at startup.
    • I have to connect pin 10 (CS0) after few seconds to SDCS instead of OLEDCS.


    P.S.:
    If I am not wrong builtin led is blinking according to pin 13, in that case it seems that the SPI clock (SCK0 on pin 13) is not following the settings provided (15MHz), but the CPU speed. This is because I see builtin led blinking following CPU frequency instead of SCK0 frequency.
    If it is true, this could be the reason why I have to downclock my Teensy at 24MHz.
    Last edited by killkrt; 11-01-2018 at 03:01 PM.

  13. #13
    Junior Member
    Join Date
    Oct 2018
    Posts
    18
    I have almost solved, but with a strange wiring solution.

    I had to put two pull-down resistors (instead of pull-up as suggested by NewHaven forum) and switch OLEDCS with SDCS.
    With this strange trick it works perfectly even with CPU at 240MHz.

    I've already checked soldering issue and there are no shortage between OLEDCS and SDCS.

    Click image for larger version. 

Name:	wiring.jpg 
Views:	123 
Size:	65.0 KB 
ID:	15076

Posting Permissions

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