Over the last couple of years I’ve picked up a few little 128×64 OLED displays, mostly through EBay auction sniping. These displays are similar to those offered by Adafruit, likely using the same chip-on-glass (COG) OLED display with a SSD1306 controller. The Adafruit version gives you direct access to the controller, so the SSD1306 datasheet is all you need to write a driver. In fact, Adafruit has released a perfectly adequate driver for their offering; it’s available from the link shown above. For some reason, however, the designer of the displays that I purchased decided to put their own microcontroller between the exposed I2C bus and the SSD1306. The only feature that I’m aware of which utilizes this intermediate microcontroller is an 8×16 font; devices using these displays would require a bit less memory, as the font is stored on the display itself. Other than this rather dubious advantage, the controller is more hindrance than help. Adding insult to injury, the command set for the display is completely undocumented; the only information I was able to find was a rather spartan Arduino sample application. Contacting the EBay sellers failed to bear fruit. They are completely clueless regarding how to drive the display.
I’ve got three different variants of this display, all labeled as “Kozig”; a couple of them refer to kozig.com, a site which resolves to a single login page. Not much help there. The three variants of this display that I have on hand are:
Kozig 128×64 I2C OLED Displays (EBay Special)
|ZT.SCOI2CM2 (monochrome, white)
|ZT.SCOI2CM1 (bi-color: yellow, blue)
|ZT.SC-I2CMx (monochrome, white)
The displays with part numbers ZT.SCOI2CM2 and ZT.SCOI2CMx are mounted on a PCB with black solder mask and have a nice metal frame surrounding the display; this is what attracted my attention in the first place, as they should be slightly more rugged than the exposed glass displays (at least in theory.) I’ve contacted several EBay sellers about their offerings, and they seem to all be selling the Kozig ZT.SC-I2CMx displays now; I was unable to find anyone offering the ZT.SCOI2CM1.
Note that the sample code that I was able to track down DOES NOT WORK with this newer display; in fact, as of today I’ve been unable to find a working block of code for this device. Edit: 03/26/2013: Received an email message from Alexander Steingass, who was kind enough to send along technical details for the ZT.SC-I2CMx displays along with a driver from Kozig. Here’s the driver file for the sake of posterity: ZT.SC-I2CMx
If you’re in the market for a nice, bright little 128×64 OLED display, I’d recommend purchasing directly from Adafruit; they actually support what they sell, and the price is only a couple of dollars more than the EBay offerings. If, however, you’ve purchased one of these displays and are looking to use it with an Arduino project, read on.
I’ve written a little Arduino driver for these displays which should ease the pain of incorporating them into your designs. This driver utilizes my AnyDisplay core and provides some nice features – optimized buffered drawing, different pen and fill modes (none, normal, clear, XOR), filled shapes, user-defined fonts and bitmaps as well as polar lines and points which don’t require floating point support. Since the driver uses an in-memory buffer it does require a chunk of your Arduino’s precious RAM (128×64 bits, or 1024 bytes). Optimized drawing requires another 128 bytes if you choose to enable it; it’s a case of display speed vs memory, and you’ll need to make that determination yourself. The ATMega328 only has 2K of RAM, so display buffering takes about half of it. I’m also working on a version which uses an external SRAM or FRAM as the display buffer that I can make available if there’s any interest.
The driver will be available on my GitHub page soon. Comments are encouraged! Do you have one of these displays? Let me know by posting a comment!