User Tools

Site Tools


ssd1315

SSD1306 and SSD1315 oLED Modules for the Pi1541

As mentioned in my previous article, while building the Pi1541, I had a lot of difficulty getting the oLED module to work.

I blamed it on the fact I had accidentally purchased an SSD1315 instead of an SSD1306.

I fiddled a lot with the options.txt file and ensured I had the correct configuration soldered. But still, I got no display on my tiny oLED and had to resort to using the external monitor to select games. Not a very portable option.

I was pleased when my new SSD1306 arrived yesterday and I was keen to try it out.

This is the one I ordered: https://www.aliexpress.com/item/32920071528.html

I plugged it in: no screen. OK.

Now here is something I didn't mention at the end of my last article: the fact that when I turn on the Pi1541, I do see the message:

I2C not found on Bus 1.

That was something I didn't really go back to. So I took a closer look at options.txt:

// If you are using a LCD screen then specify it here
//LCDName = ssd1306_128x64
//LCDName = ssd1306_128x32
//LCDName = sh1106_128x64
// If you are using a LCD screen and you would like PageUp and PageDown keys to work with it then specify this option
//KeyboardBrowseLCDScreen = 1

// If you are using I2C LCD you can optionally change what pins it is connected to.
// (defaults to 0 for non-split lines (Option A) or 1 for split lines (Option B))
//i2cBusMaster = 0 //SDA - pin 27 SCL - pin 28
//i2cBusMaster = 1 //SDA - pin 3 SCL - pin 5
//i2cLcdAddress = 60	// I2C display address in decimal and shifted. 60 == 0x78, 61 == 0x7A
//i2cLcdFlip = 1 // Rotate i2c LCD screen 180 degrees
//i2cLcdOnContrast = 127 // Allows you to adjust the contrast on your i2c LCD screen
//i2cScan = 1 // scan i2c bus and display addresses on screen
//i2cLcdUseCBMChar = 0 // set it to 1 to use CBM font on LCD. Small but fun !

The part that tripped me up was:

(defaults to 0 for non-split lines (Option A) or 1 for split lines (Option B))

That seemed to indicate that for an Option B Pi1541, the screen should be configured for Bus 1. I didn't know if this was the same “Bus 0” I configured earlier on the daughterboard or something local in the oLED module itself.

Of course, as it mentions defaults that means it's configurable either way.

Essentially, for an Option B machine, I should be able to leave everything to default and it should work. But as I'd fiddled around so much previously, I went with the following to ensure the settings were explicit:

LCDName = ssd1306_128x64

i2cBusMaster = 0 
i2cScan = 1 

Restarted the Pi1541. Guess what? It worked beautifully! The external screen no longer showed any output, and the oLED now took over and I could use it to select a D64 image.

And the amusing part of the tale? I swapped out the SSD1306 with the SSD1315, restarted, and it works too. So it was just me all the way along.

Conclusion

So there's a couple of good things to come out of this:

  1. If you built an Option B Pi1541 and chose the same Bus selection that I did (Bus 0), the above option.txt config items will work for you.
  2. You can use an SSD1315 as a 100% compatible replacement for the SSD1306 (but still call it ssd1306_128x64 in your config).

And I think I'll stick with the SSD1315. I prefer the blue/yellow colours rather than monochrome white.

ssd1315.txt · Last modified: 2021/02/02 01:24 (external edit)