Hi. I'm using teensy 3.1 with this 128x64 SPI/I2C OLED from http://www.elecrow.com/096-oled-128x64-blue-p-751.html
It works fine with the adafruit library, but it's slow. I tried the ssd1306_text library and is fast but it's limited.
Then I found this library for teensy and its complete and works very fast https://github.com/sumotoy/OLED_SSD1306 .
So i'm using the oled_ssd1306 library.
I'm using HW SPI, DC 9, CS 10, RST 8, CLK default, MOSI moved to pin 7. I'm using Teensy through USB but I cut the vusb pad and i'm using external power from a 5v 1A supply.
Power to the OLED is from 5v, not 3.3v.
The display works as expected, so the connections are good, so is the software.
Now to the problem:
No matter which code I use with the OLED_ssd1306 library, when I remove the power, and then power it again, a stuck pixel is shown, I think its coordinate is (127, 56). If I use clearDisplay, display, draw a black pixel in that dot, a big black square, or flash the screen white/black, the pixel CAN'T be removed. The only way to get the oled working fine without that pixel is to upload a sketch with the adafruit library, or the ssd1306_text library. THEN I upload again with the problematic? library and it works as expected, until i shut down everything... when I power it again, that stuck pixel is shown. Other thing that confuses me is, when I have screen working fine, if I disconnect the power, but connect it fast again, it works ok, without that stuck pixel. The stuck pixel will appear if I disconnect the power for more than 5 secs, and if the sketch is loaded with the problematic library.
All of this makes me think I there's something wrong in the init part of the oled_ssd1306 library, but I compare with the adafruit library and it looks almost the same(with my short knowledge).
Any hint appreciated.
This is the sketch with the oled_ssd1306 library, even if I don't draw anything or call oled.display(), the stuck pixel is there... Just with oled.begin() it appears.
EDIT: kept testing, now testing the scroll, with scrolling, the stuck pixel moves
It works fine with the adafruit library, but it's slow. I tried the ssd1306_text library and is fast but it's limited.
Then I found this library for teensy and its complete and works very fast https://github.com/sumotoy/OLED_SSD1306 .
So i'm using the oled_ssd1306 library.
I'm using HW SPI, DC 9, CS 10, RST 8, CLK default, MOSI moved to pin 7. I'm using Teensy through USB but I cut the vusb pad and i'm using external power from a 5v 1A supply.
Power to the OLED is from 5v, not 3.3v.
The display works as expected, so the connections are good, so is the software.
Now to the problem:
No matter which code I use with the OLED_ssd1306 library, when I remove the power, and then power it again, a stuck pixel is shown, I think its coordinate is (127, 56). If I use clearDisplay, display, draw a black pixel in that dot, a big black square, or flash the screen white/black, the pixel CAN'T be removed. The only way to get the oled working fine without that pixel is to upload a sketch with the adafruit library, or the ssd1306_text library. THEN I upload again with the problematic? library and it works as expected, until i shut down everything... when I power it again, that stuck pixel is shown. Other thing that confuses me is, when I have screen working fine, if I disconnect the power, but connect it fast again, it works ok, without that stuck pixel. The stuck pixel will appear if I disconnect the power for more than 5 secs, and if the sketch is loaded with the problematic library.
All of this makes me think I there's something wrong in the init part of the oled_ssd1306 library, but I compare with the adafruit library and it looks almost the same(with my short knowledge).
Any hint appreciated.
This is the sketch with the oled_ssd1306 library, even if I don't draw anything or call oled.display(), the stuck pixel is there... Just with oled.begin() it appears.
EDIT: kept testing, now testing the scroll, with scrolling, the stuck pixel moves
Code:
#include <SPI.h>
#include <OLED_SSD1306.h>
//Uncomment this block to use hardware SPI
#define OLED_DC 9
#define OLED_CS 10
#define OLED_RESET 8
OLED_SSD1306 oled(OLED_CS, OLED_DC, OLED_RESET);
void setup() {
Serial.begin(38400);
oled.begin();
oled.clearDisplay();
oled.display();
}
/*
testdrawline1: 25418 ms -> 23055 ms
testdrawline2: 25422 ms -> 23055 ms
testdrawline3: 25419 ms -> 23061 ms
testdrawline4: 25508 ms -> 23127 ms
testdrawrect: 7538 ms -> 6895 ms
testfillrect: 6887 ms -> 6626 ms
testdrawcircle: 20808 ms -> 17671 ms
fillCircle: 514 ms -> 479 ms
testdrawroundrect: 9216 ms -> 8147 ms
testfillroundrect: 10104 ms -> 9787 ms
testdrawtriangle: 3627 ms -> 3340 ms
testfilltriangle: 3960 ms -> 3426 ms
testdrawchar: 5333 ms -> 3383 ms
testText: 2176 ms -> 1481 ms
*/
void loop() {
}
Last edited: