Hello everybody,
I am a newbie and trying to make an ER-OLEDM032-1 work with Arduino Nano I run into the problem:
It works in 4-Wire SW-SPI mode (jumper settings on OLED R19, R21 short; R18, R20 open), but the screen updating is too sluggish for my application (feels like 0.2-0.3 sec, you see the picture fill up to down;
using buffer size 2 rather than 1 does not feel to bring much;
unfortunately the Nano will be busy as SPI slave in my application, so attaching display to HW SPI would be a major effort for me).
I wanted to try parallel mode (jumpers resoldered to R18, R21 short; R19, R20 open), but the screen just remains black.
What I tried: Not having level shifter by hand, I fed Arduino Nano and the display from 3.3 Volts altogether (external power supply connected to +5V pin). Also in this setup SPI works, parallel - not.
The U8G2 16 bit mode is set.
My wiring:
oled | oled | Nano |
---|---|---|
signal | pin | pin |
d0 | 4 | D4 |
d1 | 5 | D5 |
d2 | 6 | D6 |
d3 | 7 | D7 |
d4 | 8 | D10 |
d5 | 9 | D11 |
d6 | 10 | D12 |
d7 | 11 | D2 |
/RD (E) | 12 | D8 |
/WR | 13 | GND |
DC | 14 | D9 |
/Reset | 15 | A4 |
/CS | 16 | D3 |
Code that works (R19, R21 short; R18, R20 open):
(I know, I should tie unused display pins 7-13 to GND in SPI mode, but it works also with floating pins - finally this is not the issue here).
#include <Arduino.h>
#include <U8g2lib.h>
//U8G2_SSD1322_NHD_256X64_1_8080 u8g2(U8G2_R0, 4, 5, 6, 7, 10, 11, 12, 2, /*enable*/ 8, /*cs*/ 3, /*dc*/ 9,/*rst*/ A4);
//U8G2_SSD1322_NHD_256X64_1_8080(rotation, d0, d1, d2, d3, d4, d5, d6, d7, enable, cs, dc [, reset])
U8G2_SSD1322_NHD_256X64_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 4, /* data=*/ 5, /* cs=*/ 3, /* dc=*/ 9, /* reset=*/ A4);
//U8G2_SSD1322_NHD_256X64_1_4W_SW_SPI u8g2(U8G2_R0, clock , data= 11, cs= , dc= , reset= );
void setup(void) {
u8g2.begin();
}
void loop(void) {
u8g2.firstPage();
do {
u8g2.setFont(u8g2_font_fub42_tr);
u8g2.drawStr(0,50,"HELLO!");
} while ( u8g2.nextPage() );
//delay(1000);
}
Code that does not work (R18, R21 short; R19, R20 open):
#include <Arduino.h>
#include <U8g2lib.h>
U8G2_SSD1322_NHD_256X64_1_8080 u8g2(U8G2_R0, 4, 5, 6, 7, 10, 11, 12, 2, /*enable*/ 8, /*cs*/ 3, /*dc*/ 9,/*rst*/ A4);
//U8G2_SSD1322_NHD_256X64_2_8080(rotation, d0, d1, d2, d3, d4, d5, d6, d7, enable, cs, dc [, reset])
// U8G2_SSD1322_NHD_256X64_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 4, /* data=*/ 5, /* cs=*/ 3, /* dc=*/ 9, /* reset=*/ A4);
//U8G2_SSD1322_NHD_256X64_1_4W_SW_SPI u8g2(U8G2_R0, clock , data= 11, cs= , dc= , reset= );
void setup(void) {
u8g2.begin();
}
void loop(void) {
u8g2.firstPage();
do {
u8g2.setFont(u8g2_font_fub42_tr);
u8g2.drawStr(0,50,"HELLO!");
} while ( u8g2.nextPage() );
//delay(1000);
}
I don't understand it, and I've got a couple of questions...
- *if * parallel mode (8080) worked, would it improve the display refresh speed significantly?
- is there anything I am doing evidently wrong, or is it rather an OLED hardware issue? (2 Nanos tried)
- will the display refresh speed improve significantly if I use a Nano Every in SW-SPI mode (full frame buffer+ higher controller freqency)?
- if Every is not likely to be much quicker - what should I take then?
- is there a mode for SSD1322 to accommodate the entire display picture in display's RAM (if any) and then to bring it to screen "at once", and if yes - is it supported by u8g2?
Thank you very much in advance, I really appreciate any advice!