XRAD'S Translucent OLED SSD1309 128 x 64 Not displaying anything...teensy 3.2

XRAD

Well-known member
Hello All, I have tried different pin configs in software and hardware for the OLED. I have tried several SSD1309 libs as well as the DFRobot lib...nothing works...

hardware:
DFRobot 1.5" translucent OLED
Teensy 3.2

https://wiki.dfrobot.com/SKU_DFR093...rent_Display_with_Converter_Breakout#target_0

The ribbon cable is attached as per DFRobot diagram. 5v to OLED board.

Tried all the DFRobot examples (that came with their lib..)...and a few others...here are sample codes

Any help appreciated very much, THX!

Code:
#include <Arduino.h>
#include <U8g2lib.h>
#include <SPI.h>
#include <Wire.h>

U8G2_SSD1309_128X64_NONAME0_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);

void setup(void) {
  u8g2.begin();
}

void loop(void) {
  u8g2.clearBuffer();          // clear the internal memory
  u8g2.setFont(u8g2_font_ncenB08_tr); // choose a suitable font
  u8g2.drawStr(0,10,"Hello World!");  // write something to the internal memory
  u8g2.sendBuffer();          // transfer internal memory to the display
  delay(1000);  
}


Code:
/*!
 * @file HelloWorld.ino
 * @brief 简单又经典的Hello World!显示
 * @n U8G2支持多种大小的字体,此demo只是选取1种字体大小进行显示"Hello World!"
 * @n U8G2字体GitHub连接:https://github.com/olikraus/u8g2/wiki/fntlistall
 * 
 * @copyright  Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
 * @licence     The MIT License (MIT)
 * @author [Ivey](Ivey.lu@dfrobot.com)
 * @maintainer [Fary](feng.yang@dfrobot.com)
 * @version  V1.0
 * @date  2019-10-15
 * @url https://github.com/DFRobot/U8g2_Arduino
*/
//#include <Arduino.h>
#include <U8g2lib.h>

//#include <SPI.h>

/*
 * Display hardware IIC interface constructor
 *@param rotation:U8G2_R0 Not rotate, horizontally, draw direction from left to right
           U8G2_R1 Rotate clockwise 90 degrees, drawing direction from top to bottom
           U8G2_R2 Rotate 180 degrees clockwise, drawing in right-to-left directions
           U8G2_R3 Rotate clockwise 270 degrees, drawing direction from bottom to top
           U8G2_MIRROR Normal display of mirror content (v2.6.x version used above)
           Note: U8G2_MIRROR need to be used with setFlipMode().
 *@param reset:U8x8_PIN_NONE Indicates that the pin is empty and no reset pin is used
 * Display hardware SPI interface constructor
 *@param  Just connect the CS pin (pins are optional)
 *@param  Just connect the DC pin (pins are optional)
 *
*/
 /*
#define OLED_DC  9
#define OLED_CS  10
#define OLED_RST 8
#define OLED_MISO 12
#define OLED_MOSI 11
#define OLED_SCK 13
*/
 
//U8G2_SSD1309_128X64_NONAME2_1_4W_HW_SPI u8g2(/* rotation=*/U8G2_R0, /* cs=*/ OLED_CS, /* dc=*/ OLED_DC,/* reset=*/OLED_RST);

U8G2_SSD1309_128X64_NONAME2_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);



void setup(void) {
  u8g2.begin();
  u8g2.setFontPosTop();
}

void loop(void) {
  u8g2.firstPage();   
  do
  {
    u8g2.clearBuffer();          // clear the internal memory
    u8g2.setFont(u8g2_font_t0_17b_tr  );  // choose a suitable font
    u8g2.drawStr(0,5,"Hello World!");  // write something to the internal memory
    u8g2.sendBuffer();          // transfer internal memory to the display
  } while( u8g2.nextPage() );
  delay(2000);
}
 
Image: Basic wiring.....
TEENSY 3.2 Translucent1.JPG
 
Is that power on 5V or 3.3V pin? DFRobot says 3.3 should work - so try that?

Also - repower the whole Teensy/display to make sure it isn't in an odd state
 
Looks like you are having the same issue I am with a TeensyLC in that for some reason I cant get the SPI to connect to the display through the u8g2 library.. Im using a different display but no display when using the pins wanted and the Teensy Data Sheet..

Im sort of replying to this just in case someone can share a solution here that may work for me as well.. I have tried and searched quite a bit but I have not found anything to work.. (other than using a standard Uno or Pro Micro arduino). I have read that there are people who have this library working with the Teensy but most of the time they have gotten it working but haven't really explained the Hardware hookup or any changes that they may have done.. they just say got it working...
 
So I feel really dumb but I have it working now.. with the LC: These are the pins being used and where they go on the display I have which is NOT the Display you are using but connections appear to be similar..

Code:
Display K and A Backlight LED is connected and On 

Teensy GND --> 19264-05 v3.2 GND
Teensy 3V --> 19264-05 v3.2 VDD
Teensy Pin 13 --> 19264-05 v3.2 SCK
Teensy Pin 11 --> 19264-05 v3.2 SDA
Teensy Pin 10 --> 19264-05 v3.2 CS (chosen pin standard position)
Teensy Pin 9 --> 19264-05 v3.2 CD (chosen pin standard position)
Teensy Pin 8 --> 19264-05 v3.2 RST (chosen pin standard position)

ANYWAY what happened to me and the reason I feel dumb is I decided to pull the teensy from the breadboard and found that the pin for Pin 13 migrated into the Pin 12 location (along with pin 12) so Pin 13 wasn't actually accessible from where I was trying to access it and in addition 12 and 13 were shorted.. So fixing that everything works now...

I believe the Pin map for the LC patches that of the 3.2 with regard to SPI.

NOTE: I am also using Hardware SPI initialization in u8g2 "HW_SPI"
 
Back
Top