I've created a project using this Adafruit 128x32 I2C OLED SSD1306 display. Now I want to transfer the project from breadboard to its own PCB so I ordered a standalone 128x32 I2C OLED SSD1306 display. Note, the display is different to the Adafruit one as I needed the FPC to exit from the long side of the display.
The display includes an interfacing document. I built the left hand side of the circuit given for I2C communication (screenshot below), connected it to the Arduino and uploaded Adafruit's 128x32 I2C test sketch - nothing. I also tried an I2C scanner sketch in case my address was wrong - again nothing displays.
My thoughts on what might be wrong:
I don't know what SA0 on pin 15 is so I've left it disconnected
Right now I only have 0.1uF capacitors
I'd welcome any other thoughts or ideas of things I can try.
A few notes on my photo: the smaller breadboard is an LM317 variable voltage regulator and voltage divider to create 3.6V and 3V from the Uno's 5V pin for the display. The green PCB is an FPC breakout and contains no components. I've tried to lay out the connections neatly on the main breadboard from the FPC in numerical order from top to bottom.
OLEDs normally come in 128x64 with ribbon at the bottom or 128x32 with ribbon at the side.
e.g. typical Aliexpress items
If you buy the panel on pcb style all the supporting electronics is already mounted on the pcb.
Seriously. The ready made pcbs are a lot smaller than your current hookup.
I would prototype with ready made items.
If you intend to manufacture 1000s of products, copy / steal the layout from the modules for your custom pcb. Buy the bare panels in 128x32 or 32x128 ribbon format.
Regarding your current wiring.
Print the interfacing document on paper.
Run a checklist of each connection. Tick off each point on the paper diagram with a pencil.
You just have to be meticulous.
Remember that breadboards are not perfect.
Ready made Duponts are pretty reliable.
Hand-crimped Duponts are not so good.
Cheap Chinese non-Dupont male-male jumpers are VERY unreliable.
Hi David, thanks for your reply. I went through every connection meticulously and diligently to find the FFC connector only makes contact with one face of the FFC - I didn't realise that's how they functioned! So I flipped the FFC over so it's side with exposed traces now made contact with the connector, flipped the breadboard connections around and it works.
Sometimes the dumbest lessons take the longest to learn!
I've loaded the Adafruit SSD1306 128x32 I2C example, only changing the address to 0x3D (which the I2C scanner gave me), and I'm only seeing the lower half of whatever is displayed. I also tried the the SSD1306 128x64 I2C example which gives an improves but still not correct image.
I'm not sure where to start troubleshooting this and would appreciate any advice
So you should run the Adafruit SSD1306 128x32 I2C example i.e. quote the exact name
And copy-paste any changed statements e.g. constructor or display.begin() lines.
SA0 should be wired to GND. Then the Slave address = 0x3C
Never leave floating. It must be either 0V or 3.3V
Post your actual schematic. Or describe accurately the reference example from #0.
e.g. LHS identical. AVR pins on RHS.
I have now grounded SA0 to set address 0x3C and uploaded the Adafruit SSD1306 128x32 I2C example code with no modifications. The result is the same as the lower image in my previous post. The example continues to run after the Adafruit logo but I still only see the lower half of the following animations.
OLED panels come in two different styles 128x32 with ribbon at the bottom and 128x32 with ribbon at the right.
The 128x64 panels seem to always be 128x64 with ribbon at the bottom.
My 64x32 panel has ribbon at the bottom.
Your 128x32 with ribbon at the bottom is unusual. Ribbon at right is much more common. Hence Adafruit 128x32 examples.
From #2 you can see that the 128x64 example shows the bottom half on your panel.
The Adafruit_128x32 example shows the bottom 128x16 half of "interlaced" display of the 128x32 picture.
You can control the interlace/normal with register 0xDA
And you can control bottom/top half with register 0xD3
e.g. display.ssd1306_command(0xDA); display.ssd1306_command(0x02);
Since I don't have your 128x32 panel I can't try it myself.
Incidentally, I ran the BuyDisplay code with CodevisionAVR because it was relatively simple to adapt the 8051 C code.
The BuyDisplay example code is incredibly long-winded. Loads of repeated sequences. I chose to restructure to make it easier to read. However CV produced a similar size executable from both bloated and re-factored code. Which shows how effective the CV compression algorithm is.