Newhaven Display Forum

Newhaven Products => OLEDs => Topic started by: GeroF on December 14, 2016, 03:10:00 PM

Title: NHD-0216SZW-BG5 OLED artefacts and undefined patterns
Post by: GeroF on December 14, 2016, 03:10:00 PM
Hi all,

ordered the NHD-0216SZW-BG5 OLED display. Planned to run it on Python 3 and Raspberry Pi B Model.
BTW: Is there a Python lib for this OLED available? I didn't find one. So i tried out the AdafruitCharLCD
lib (5V/4 bit mode). The OLED is basicly working in this configuration with the pi.

Having wired up the display (i already double-checked the wiring), and running my code works fine for the first calls of the method sending data. But after some ten calls, the displayed lines start toggling. Signs of former line 1 jump to the second line, and vice versa. After that, all letters get corrupted, showing artefacts and undefined patterns.

What ist going wrong with it? I would greatly appreciate your consult in this topic.

Thanks,  Gero
Title: Re: NHD-0216SZW-BG5 OLED artefacts and undefined patterns
Post by: Saurabh_B on December 14, 2016, 05:02:35 PM
THis is most likely due to the timing.
This display uses a controller similar to our Character LCDs however it requires a longer wait between commands / data writes.

We have seen random shifting or characters appear when you write to the display too fast.

Unfortunately we do not have a library / driver for this display, however if you are able to modify the library you are currently using to add some delays. You should be able to use the display without any issues.
Title: SOLVED: NHD-0216SZW-BG5 OLED artefacts and undefined patterns
Post by: GeroF on January 28, 2017, 07:18:49 AM
Hello,
and thanks for replying.

Your post gave me the key to the problem's solution.
My python code created new objects every time when it was basicly supposed to print characters on the OLED.
This means a lot of clear routines were carried out on the OLED controller in a too short time what
is highly likely to have caused the corrupted letters before.

I fixed the code issue and now the characters are OK. The mentioned pyhton lib works well with the OLED.
You don't even have to change any timings.

With best regards,

Gero