Interesting Problem with 128x32 OLED Display: ssd1305 vs ssd

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
bigwetdognose
 
Posts: 4
Joined: Thu Apr 11, 2019 4:16 pm

Interesting Problem with 128x32 OLED Display: ssd1305 vs ssd

Post by bigwetdognose »

Howdy,

I'm working with the Monochrome 2.3" 128x32 OLED Graphic Display Module Kit (https://www.adafruit.com/product/2675) and the Teensy 4.1 https://www.pjrc.com/store/teensy41.html. Teensy 4.1 uses 3.3v logic FYI. I'm getting a BLACK SCREEN with the ssd1305 v2.2.1 library's example code and a DISTORTED IMAGE with the ssd1306 v2.5.3 library's example code (see image). Both libraries are the most recent releases.

So, following the Adafruit's tutorial here https://learn.adafruit.com/2-3-monochro ... lay-module, I used the ssd1305 library. I suspect the library has been updated since the tutorial was published, because you no longer need to set the dimensions in the .h file and can set them in the constructor in the example code. I'm using software SPI. I check all the connections. I confirm the 0 ohm resistors are set to SPI mode. Black screen. I try uploading at different Teensy clock speeds (24-600 MHz). Black screen.

I'm poking around the internet and find that the example code for the ssd1306 library links to a product page for the screen I'm using. This is weird. Should I be using ss1306 or ssd1305? I try the ssd1306 using the software SPI approach and it works... kind of. The image is cropped as if it was displaying to a larger screen and there are intermittent black lines. Anyway, this confirms that my wiring is good.

Still working with the ssd1306 library, I set the height to 64 and this gets rid of the black lines, but it's still offset. I suppose this could be doable, but there has to be a better way!

I haven't tried hardware SPI or I2C yet. I'm hoping to avoid this, because it would mean desoldering a bunch of junk.

I didn't post my code, because I haven't made any changes to the example code.

Thanks for any help you could offer. You're the best.
Attachments
Capture.PNG
Capture.PNG (176.79 KiB) Viewed 236 times

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Interesting Problem with 128x32 OLED Display: ssd1305 vs

Post by adafruit_support_carter »

Are the jumpers set for SPI mode on the display?
https://learn.adafruit.com/2-3-monochro ... assembly-1

Should use SSD1305. Can try the example sketch here:
https://github.com/adafruit/Adafruit_SS ... 05test.ino
and change these lines for software SPI and screen size:

Code: Select all

// software SPI
//Adafruit_SSD1305 display(128, 64, OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);
// hardware SPI - use 7Mhz (7000000UL) or lower because the screen is rated for 4MHz, or it will remain blank!
Adafruit_SSD1305 display(128, 64, &SPI, OLED_DC, OLED_RESET, OLED_CS, 7000000UL);
to:

Code: Select all

// software SPI
Adafruit_SSD1305 display(128, 32, OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);
// hardware SPI - use 7Mhz (7000000UL) or lower because the screen is rated for 4MHz, or it will remain blank!
//Adafruit_SSD1305 display(128, 64, &SPI, OLED_DC, OLED_RESET, OLED_CS, 7000000UL);
Also change pin defines as needed for your specific setup.

Code: Select all

// Used for software SPI
#define OLED_CLK 13
#define OLED_MOSI 11

// Used for software or hardware SPI
#define OLED_CS 10
#define OLED_DC 8

// Used for I2C or SPI
#define OLED_RESET 9

User avatar
bigwetdognose
 
Posts: 4
Joined: Thu Apr 11, 2019 4:16 pm

Re: Interesting Problem with 128x32 OLED Display: ssd1305 vs

Post by bigwetdognose »

Yes. I've done all these things. I tested once more. The screen is black* with ssd1305 and works with ssd1306. I can confirm all the pins are connected correctly.

*I should clarify. If there was an image on the screen from the ssd1306 example, that image remains after uploading the ssd1305 example code. so, it's not technically not black, but is not updating or clearing the screen at all.

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Interesting Problem with 128x32 OLED Display: ssd1305 vs

Post by adafruit_support_carter »

Be sure to open the Serial Monitor when running the example. There's a wait for serial loop here:
https://github.com/adafruit/Adafruit_SS ... st.ino#L72
So the rest of the sketch will not run until the Serial Monitor is opened.

Alternatively, comment out that line.

Just hooked up one to Metro M4 (don't have Teensy) and verified everything works with current library code and example.

User avatar
bigwetdognose
 
Posts: 4
Joined: Thu Apr 11, 2019 4:16 pm

Re: Interesting Problem with 128x32 OLED Display: ssd1305 vs

Post by bigwetdognose »

Thanks for your response. I'm still experiencing a problem.

No luck with disabling Serial. It does however clear the screen when the connection is initialized if there was an image on the display.

I wonder if it might be related to power, because the USB disconnect sound plays every few seconds after uploading the code. I've tried various attempts at running different chunks of the code.

I've created a video demonstrating the issue.
https://tinyurl.com/yhw69fbs

I should mention that all the other junk you see for my project has had the power disconnected to it while running these examples.

The one sliver of code I'm running in setup() is:

Code: Select all

  
  display.drawPixel(10, 10, WHITE);
  display.display();

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”