Go Down

Topic: U8g2: Graphics Library for Monochrome OLEDs and LCDs (Read 21752 times) previous topic - next topic

INTP

I just got an SSD1306 128x64 I2C Oled display today, going to spend tomorrow figuring it out. I see SPI mentioned a lot, does this library do I2C?

olikraus

The latest version of U8g2 includes some modifications on HW SPI side, but i will also create an issue here and do some testing with the ST7920.

Oliver
Hm, strange...
Because Parallel connection with u8g2 doenst seems to work with my ST7920 128x64 display I thought I'll "just" switch to SPI.
Now I found out that SPI also doesnt work. I get strange artifacts in the display and can barely see the text that should be written on the display.
Then I tried software SPI and that works fine, but horrible slow.

Then, again, I switched back to U8Glib and everything work awesome.

I've tested this with my Mega, Nano and Uno. So I dont think that the controller is the guilty one.

Any ideas?
I would still prefer to use the parallel mode ;)
I have fixed an issue with ST7920 and U8g2.
The latest library zip is here:
https://github.com/olikraus/U8g2_Arduino/archive/master.zip
Use the library zip install menu for installation.

Oliver

olikraus

I just got an SSD1306 128x64 I2C Oled display today, going to spend tomorrow figuring it out. I see SPI mentioned a lot, does this library do I2C?
Yes, I2C is supported. In Arduino World this is usually called Wire-Lib or TWI.

Oliver

RndMnkIII

The parallel interface for the ST920 should be of type 6800 (RS, R/W, E) and not of 8080 type ? i've tested mi Digole 12864ZW screen with the ST920 controller and works ok with u8glib but not with u8g2 that uses a different constructor.

u8glib ->U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16, 19);

u8g2 -> U8G2_ST7920_128X64_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 16, /*dc=*/ 17, /*reset=*/ 19);

mdahlb

Hello,

I was hopeing to use this library with my 128x64 display (sh1106) and my nodemcu esp8266 board, but haven't managed yet. I have tried the display with my Arduino UNO and the u8glib-library and it works great with this setting --> U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NONE); // I2C / TWI

Since U8glib doesn't support esp8266-boards I was really happy to hear about the u8g2 library. So, I tried the GraphicsTest from the Full-buffer example without any success =(

I used the following constructor lines:
U8G2_SH1106_128X64_NONAME_2_SW_I2C u8g2(U8G2_R0, 12, 14, 8 );

And connected the display in the following way:
VCC -- > 3v3 (nodemcu)
GND --> GND
SDA --> D6 (nodemcu, GPIO12)
SCL --> D5 (nodemcu, GPIO14)


But, nothing on the display.. Any suggestions?

Regars Mattias


** PROBLEM SOLVED **
This constructor lines worked for me :
U8G2_SH1106_128X64_NONAME_1_SW_I2C u8g2(U8G2_R0, 14, 12, U8X8_PIN_NONE);

olikraus

Good to see that the SH1106 works.
Thanks for sharing.

Oliver

olikraus

#21
Oct 01, 2016, 07:33 am Last Edit: Oct 01, 2016, 07:48 am by olikraus
The parallel interface for the ST920 should be of type 6800 (RS, R/W, E) and not of 8080 type ? i've tested mi Digole 12864ZW screen with the ST920 controller and works ok with u8glib but not with u8g2 that uses a different constructor.

u8glib ->U8GLIB_ST7920_128X64_4X u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 17, 16, 19);

u8g2 -> U8G2_ST7920_128X64_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 16, /*dc=*/ 17, /*reset=*/ 19);
At least for me, the ST7920 was working correctly, but I will retest this.

Oliver

Edit: I have added the 6800 interface to u8g2 for the next release.

olikraus

Hi All

I have release 2.5.2 of u8g2. It includes support for SSD1322, SSD1325 and RA8835 controllers.
Some minor bugs are also fixed.
The  new version will be available in the Arduino IDE with the next view days.

Oliver

arduinoobz

Hi.

I was wondering if you would mind including Thai font to this library.

Thank you.

 :)

rochi2211

Hi everyone. I'm building a digital tachometer plus watch plus lean angle carbed motorcycle computer. I was using u8glib with some good results. The problem was that the mega couldn't stand with interrupts so it was basically slow to make calculation. Is this library any better? As my chipset is t6963 I also sent a pm to you @olikraus about schematics for a DC DC inverter. Thank you all for any suggestion

olikraus

Hi.

I was wondering if you would mind including Thai font to this library.

Thank you.

 :)
I have created this issue for this:
https://github.com/olikraus/u8g2/issues/73

olikraus

Hi everyone. I'm building a digital tachometer plus watch plus lean angle carbed motorcycle computer. I was using u8glib with some good results. The problem was that the mega couldn't stand with interrupts so it was basically slow to make calculation. Is this library any better? As my chipset is t6963 I also sent a pm to you @olikraus about schematics for a DC DC inverter. Thank you all for any suggestion
u8g2 has more features and supports full screen buffer handling (if enough RAM is available).
Performance is almost the same.

Oliver

rochi2211

What about the negative voltage converter you use on the t6963? Thanks!

slackinfux

Hi everyone. I'm building a digital tachometer plus watch plus lean angle carbed motorcycle computer. I was using u8glib with some good results. The problem was that the mega couldn't stand with interrupts so it was basically slow to make calculation. Is this library any better? As my chipset is t6963 I also sent a pm to you @olikraus about schematics for a DC DC inverter. Thank you all for any suggestion
FYI Rochi, I'm working on something similar with an SSD1322 display as a digital gauge cluster that reads 4 sensors (boost pressure, oil temp, oil pressure and air/fuel ratio) and displays the results on a bright green OLED that fits in my factory clock housing.

I started on the MEGA2560, but found its performance in both floating point math and writing to SPI to be lacking. I had to move over to a Due for decent performance, which works quite well. I really only picked the Due (instead of one of the newer SAMD21 based 32 bit boards like the Zero) at this point since it uses the MEGA size protoboards, since I had a few of them already. The downside was having to move analog to digital conversion to an ADS1115 breakout, since the Due doesn't accept 5V inputs directly. Which really wasn't a downside, once I figured out how to read the ADS.

Thanks to Oliver for putting this library together along with the SSD1322 support! I'm really enjoying the new font support and u8g2 has been working well for me on the Due over 4 wire SPI at 256x64 on both the Newhaven and EastRising OLED displays.

jptheripper

Oliver,
 Thanks again! Is m2tklib compatible with u8g2?

Go Up