Help trying to use SSD1309 [Solved]

Halp. I’ve been trying to get my homebrew arduboy up with the ssd1309 screen, but I can’t figure out where my problem lies. Things load fine with the .96’ oled, but that screen is too small, with the 1309, I get some weird crashing. Both the screen and micro are brand new. Any help appreciated, thx. Attached a video. Ps. Using @Mr.Blinky python uploader.

1 Like

Are you saying that without changing the program on the micro, the small screen works in the big one doesn’t? In that case it is most likely a power issue that causes the micro to crash. The big display consumes a lot more power then the small screen.

Try a different USB port, shorter cable, add a large capacitor between the VCC/5V and GND/0V near the display or try using powering the micro with powerbank and short USB cable.

If you upload different programs for each display or if you upload with SSD1309 patch then maybe the patch could cause a problem as the original CastleBoy doesn’t use the Arduboy2 library.

I’ve made an adapted version that uses the Arduboy2 library so it can be uploaded from the Arduino IDE with the Homemade package installed.

1 Like

Yes, without changing the program, the small screen runs, but the big one takes a while, gets to the castelboy boot screen, and then jumbles pixels and restarts. When I patch with the python uploader, it at least gets that far. If I upload with the Arduino ide with the custom board manager and 1309 selected, it doesn’t even make it past the arduboy load image before crashing on big screen. Small screen works all the way.
Looking around, it looks like this brand of screen may have the spi pins mislabeled :upside_down_face: so you may be into something with power

It didn’t used to, but the current version on master does, as of last December.
(Thanks to a certain talking skeleton. :P)

1 Like

Ah good then I can compare my fork against it

1 Like

I had castleboy working with the patch on a different brand 1309 tho. And I tried a Pacman game, same story. Crashes at arduboy splash screen

It’s mostly the same,
the main differences are that you’re using:

  • display(CLEAR_BUFFER) instead of clear()
  • boot() instead of begin()
  • Arduboy2 instead of Arduboy2Base

And you explicitly included Sprites.h instead of relying on Arduboy.h to include it.

Apart from those minor differences, the changes are identical.

1 Like

Soo …disconnected the vcc wire to hook up an external supply…arduboy turned on accidentally without vcc hooked up…runs perfectly now.
SO if you get the not DIYmore brand ssd1309 like me, don’t hook up VCC.

I wouldn’t recommend to run it like that (With Vcc of the display not connected) The display gets powered inderectly through the io pins and those may get damaged after a while. I also expect the display to flicker when a lot of white is being displayed.

1 Like

Hm alright. Wonder why it works that way though, And not when it’s hooked up.

When hooked hooked up to Vcc it is able to drain a lot of power. When not connected power flows from the GPIO pins to Vcc but there is resistance limiting the current (there are usually some pullup resistors on the SPI clock and DATA lines for the easy of switching to I2C)

When you’re using an external 5V power supply you can connect it to the displays VCC/5V and also to the raw pin of your Pro Micro. That way you can safely connect it to USB while powered externally.


Ookayy, gotcha. Shouldn’t 5v be coming from VCC ?
So basically if I take power from my power switch into my OLED VCC it would be better than no VCC hooked up to Oled, correct?

Yes, Vcc needs to be connected to 5V