Pages: [1]   Go Down
Author Topic: Solved! SSD1306 driver for ATtiny84 - documentation for commands?  (Read 1321 times)
0 Members and 1 Guest are viewing this topic.
Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 143
Posts: 5309
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm working on a mini-driver for this OLED with an ATtiny84:

http://www.ebay.com/itm/170842973484

I'm working using the driver for Arduino Uno and the datasheet I'm looking at is this:

https://www.adafruit.com/datasheets/SSD1306.pdf

The display is working fine, but I'm confused.

The driver I'm working with sends commands like "DISP_8X16STR (0x10)" to draw text. These work on my display but there's no mention of them anywhere in the SSD1306 datasheet (nor the SSD1307 or SSD1308)

Does anybody know where these commands are documented? Google draws a complete blank (the only place "DISP_8X16STR" appears on the web is in this forum!)


Edit: The reason I want to know is that the commands take time to execute, if I don't put a delay after them they don't work properly. I need to know how long the delay needs to be (or if there's a way to find out when the command has finished executing - even better!)
« Last Edit: November 27, 2012, 07:48:17 pm by fungus » Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 32
Posts: 4255
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Does anybody know where these commands are documented?
Your Ebay link includes a link to some example Arduino code.  The commands are used (but not really documented) within that code.

Don
« Last Edit: November 26, 2012, 10:04:45 am by floresta » Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 143
Posts: 5309
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Does anybody know where these commands are documented?
Your Ebay link includes a link to some example Arduino code.  The commands are used (but not really documented) within that code.

Don

Yep, that's the code I'm working with. The problem is that if I draw two text strings one after the other I get corruption unless I put in a delay. This is bad because:
a) It wastes time - I don't know how long the delay should be.
b) I tend to grab the timers for my own use and don't have a delay() function.

There must be some documentation out there somewhere...

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Germany
Offline Offline
Edison Member
*
Karma: 133
Posts: 1443
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

The SSD1306 is a controller for OLED displays. The SSD1306 is NOT able to draw any characters. The pdf document SSD1306.pdf describes the controller and NOT your display. I assume your display has an additional controller which accepts high level commands for drawing text (note: the SSD1306 has I2C ID 0x3c or 0x3d, while the example code uses 0x51)

Indeed there seems to be no information on the high level protocol of the additional controller. Maybe you can provide a close up picture of the back side of the PCB. I think the controller is placed there.

Of course the price is good (especially because of the additional high level controller), but probably useless unless you get additional information from the seller.

Adafruit code will not work, because adafruit just sells and supports the plain OLED with the SSD1306 controller. Also u8glib only supports OLEDs with plain SSD1306 (but u8glib will probably work on a ATTINY84/85).

Oliver

Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 143
Posts: 5309
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I assume your display has an additional controller which accepts high level commands for drawing text (note: the SSD1306 has I2C ID 0x3c or 0x3d, while the example code uses 0x51)

I was beginning to suspect that...because the SSD1306 needs configuration at power-on and I'm not doing any. It magically configures itself.

Also...the chip on the back of the board is the wrong package. I think the SSD1306 must be hidden under the screen.

Indeed there seems to be no information on the high level protocol of the additional controller.

It's basically the same. The scrolling commands, etc. match the SSD1306 datasheet. I think the controller intercepts some commands (like text drawing) and passes the rest along.

Adafruit code will not work, because adafruit just sells and supports the plain OLED with the SSD1306 controller. Also u8glib only supports OLEDs with plain SSD1306 (but u8glib will probably work on a ATTINY84/85).

I've got the display working perfectly, it's just that if fails if I don't put a delay() in between each command. I'd like to know more about the exact delay needed.
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 143
Posts: 5309
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I figured it out - one of the pins on the back of the display is a 'busy' signal! (Duh!)

All working perfectly now...


* OLED screen.png (536.14 KB, 768x958 - viewed 95 times.)
« Last Edit: November 28, 2012, 07:00:42 am by fungus » Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 143
Posts: 5309
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Check it out in the gallery: http://arduino.cc/forum/index.php/topic,134673.0.html
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Pages: [1]   Go Up
Jump to: