Pages: [1]   Go Down
Author Topic: 128x64 monochrome OLED  (Read 2431 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 247
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone.

I have managed to get hold of one of these from Seeedstudio: http://www.seeedstudio.com/depot/images/product/oledv1.jpg

The code has got simple functionality of drawing bitmaps or writing text.

I want to extend the library to be able to let's say draw a pixel at a particular x,y coordinate. Then draw lines and circles.

Has anyone done that before? I have been trying and struggling for a week now, to no avail!

Also, here is the datasheet: http://www.electrokit.se/download/SSD1308-2.pdf

Any help is much appreciated.

Thanks,
M.
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 72
Posts: 7171
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Forbidden

You don't have permission to access /depot/images/product/oledv1.jpg on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
‹���������������

maybe post a product link?
Logged


0
Offline Offline
Full Member
***
Karma: 0
Posts: 247
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is the page where I got the datasheet from: http://www.electrokit.se/

And the product page: http://www.seeedstudio.com/depot/oled-frame-128x64-p-797.html?cPath=163_167

The links I sent work me though!

Thanks.
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 72
Posts: 7171
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

This is the first time I personally see this particular display is mentioned on the forum. Hope someone else has made a library for what you want. Maybe the KS0108 GLCD library can be ported to this display. That library has all the bells and whistles of graphical displays.

From what glanced at here:

http://seeedstudio.com/wiki/index.php?title=OLED_Frame

The display is not pin-compatible with KS0108 displays so don't use GLCD library.
Logged


Seattle, WA
Offline Offline
Full Member
***
Karma: 1
Posts: 174
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Adafruit has a nice little library for similar displays: https://www.adafruit.com/products/326
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 247
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yep, found it just before you posted it.

Trying to use it, but whatever you try and do the Adafruit logo appears on the screen!

Any ideas?

M.
Logged

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

Quote
Trying to use it, but whatever you try and do the Adafruit logo appears on the screen!

A nice display. I did a look at the Adafruit library. To me it seems that you have to call "clear()" before you call "display()"

Oliver
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 247
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank guys.

All sorted and working beautifully!

Regards,
M.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 247
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Pixel drawing seems to be very slow!

Does anyone know why?

Thanks.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 247
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Anyone??

Any ideas?

Thank you.
Logged

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 62
Posts: 2635
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To clear out that logo simply zero out the predefined buffer array.

Just change the declaration of buffer to

Code:
static uint8_t buffer[1024];

And delete all the array data.
That will leave you with a blank screen.

As far as being slow, I'm assuming that you are referring to the adafruit code.
The code uses a frame buffer and when you call the display() function,
It re-draws the entire display by flushing out the entire frame buffer.
So if you set one pixel then call the display function, you just
wrote 8192 pixels to the display by sending 1024 bytes of data.
With that type of interface, you don't want to call the display function
until you have done many updates. i.e. don't call it for every pixel update,
wait to call it until you are fully done updating the screen.

It also uses the software SPI routines rather than use the SPI hardware.
While the software SPI allows using any pins, it will be much slower
than the hardware SPI especially since it uses digitalWrite() to control
all the pins.
The Arduino core library digital i/o routines including digitalWrite() have
lots of overhead to set the pin state vs direct port i/o. (like 40+ times slower)
And the hardware SPI is much faster at doing SPI than a direct port i/o
routine could ever be.

If you want better speed,  look into using the SPI hardware but that
will require digging into their code to make the modifications since you
must then use the specific SPI pins vs any pins you want and use the SPI library.
--- bill

Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 247
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks again for your reply.

The OLED display I use is an I2C version, I have just changed the SPI code from Adafruit to be able to use their code on my display.

Is I2C much slower than SPI and if so, then the speed I have is the fastest it goes I believe?

Thanks,
M.
Logged

Pages: [1]   Go Up
Jump to: