I try to write some sample codes with u8glib, there are two sample codes and I have a strange issue.
The example 2 is a regular code from u8glib, it has a good work.
The example 1 is that I try to use a char array as my string storage and drawStr() read it. As the example 1 video you can see, the screen is flash and it should display again when I power off/on(unplug/plug the white line) the OLED again and again.
BTW, there is an external power supply for OLED.
How is the white line connected in the video? Is it just the backlight LED?
What constructor is used in the examples? What is the exact type of the Display?
What is the error? From the video it seems that the display turns off after some time. Is this the unintended behaviour?
olikraus:
How is the white line connected in the video? Is it just the backlight LED?
What constructor is used in the examples? What is the exact type of the Display?
What is the error? From the video it seems that the display turns off after some time. Is this the unintended behaviour?
Oliver
White line is Vss pin, it connected to SSD1325 pin 1.
The constructor is U8GLIB_NHD27OLED_BW u8g(13, 11, 10, 9, 2), I use arduino mini pro.
The type of OLED is SSD1325(datasheet:http://www.dfrobot.com.cn/download/TW28642270B.pdf)
Yes, the unintended behavior is in video 1, I power on the OLED, the screen only display about ~1 second and then disappear, it is not normal behavior in my code. Compare with video 2, I did not plug/unplug white line, it always work fine.
By the way... Maybe the OLED is not compatible with the u8glib.
If I want to buy a new OLED, I searched this http://tw.mouser.com/Search/Refine.aspx?Keyword=NHD-2.7
Does it compatible with the u8glib? or others OLED what you proposed and where to buy?
liming:
By the way... Maybe the OLED is not compatible with the u8glib.
If I want to buy a new OLED, I searched this http://tw.mouser.com/Search/Refine.aspx?Keyword=NHD-2.7
Does it compatible with the u8glib? or others OLED what you proposed and where to buy?
thanks!
Indeed i tested u8glib with the NHD OLED.
What looks strange to me is, that the screen goes black but goes to normal state after you connect the display to power again. In fact the software and the uC do work like nothing has happend. From that perspective, i have some doubts that this is an software issue.
Maybe you can do another test: Please add u8g.setContrast() to your program. The font should be come dark. Try repeating your example with different values of u8g.setContrast(). Idea is this: The display requires a lot of current. Maybe everything works with lesser current (lower values for u8g.setContrast()).
liming:
By the way... Maybe the OLED is not compatible with the u8glib.
If I want to buy a new OLED, I searched this NHD-2.7 OLED顯示器和配件 的搜尋結果 - 貿澤 臺灣
Does it compatible with the u8glib? or others OLED what you proposed and where to buy?
thanks!
Indeed i tested u8glib with the NHD OLED.
What looks strange to me is, that the screen goes black but goes to normal state after you connect the display to power again. In fact the software and the uC do work like nothing has happend. From that perspective, i have some doubts that this is an software issue.
Maybe you can do another test: Please add u8g.setContrast() to your program. The font should be come dark. Try repeating your example with different values of u8g.setContrast(). Idea is this: The display requires a lot of current. Maybe everything works with lesser current (lower values for u8g.setContrast()).
Oliver
I have tried u8g.setContrast(50) and u8g.setContrast(5), the font is dark. But the issue is the same, the fonts appear and then disappear.
If the current could be affect the display, the example 2 should be has the same issue but it does not. You can see the example 2 video, there is the same animation and the screen is working great. The difference between example 1 and 2 is that one drawStr() is fixed string, another is a global variable.
I also use setPrintPos and print, it didn't better... =(