Newhaven Display Forum

Newhaven Products => OLEDs => Topic started by: Khnum on February 25, 2015, 09:00:31 AM

Title: NHD-0420CW-AG3 Serial Mode
Post by: Khnum on February 25, 2015, 09:00:31 AM
Hello, I've been having difficulty getting the NHD-0420CW-AG3 that I purchased to operate in its serial mode. I have had it up and mostly functional via parallel but when using the serial mode I can't get any response from the display. I've tried a few different source codes (the one within the display's documentation and the one given for generic OLED displays) but can't get any to work. I am coding in C and am using the Olimex SAM3-P256 development board to try and communicate with the display.

If there is any source code or tip/tricks that anyone could give me for troubleshooting this display I would be most appreciative.
Title: Re: NHD-0420CW-AG3 Serial Mode
Post by: Retheesh_M on February 25, 2015, 10:13:22 AM
We don't have any source code for the SAM3-256 development board, but we do have some example code for this display using the Arduino Mega.  The example shows how to write to the display using parallel or serial interface.  Please refer to this:-

https://github.com/NewhavenDisplay/NHD_US2066-Arduino-Mega/blob/master/NHD_US2066.cpp
Title: Re: NHD-0420CW-AG3 Serial Mode
Post by: Khnum on February 25, 2015, 11:24:13 AM
For the serial delay constant I would just want that to be the speced clock time correct?
Title: Re: NHD-0420CW-AG3 Serial Mode
Post by: Retheesh_M on February 25, 2015, 12:59:39 PM
Yes that is correct, but it is usually good practice to use slightly longer delays to make sure the command has been executed before you send the next instruction.
Title: Re: NHD-0420CW-AG3 Serial Mode
Post by: Khnum on February 25, 2015, 08:57:18 PM
The sample code did help in my understanding of the serial operation and I've been able to convert the Arduino pseudo-C into a full C for ARM, but to the same result of no reaction from the display. Not sure quite how to troubleshoot the display.
Title: Re: NHD-0420CW-AG3 Serial Mode
Post by: Khnum on February 26, 2015, 09:56:29 AM
Good news, I have the display printing now. The data appears to be writing on top of itself and producing giberish but it is writing
Title: Re: NHD-0420CW-AG3 Serial Mode
Post by: Khnum on February 26, 2015, 10:19:03 AM
Got it working. The LCD was just configured to write one character to two slots so it was getting confused. Thanks for the help!
Title: Re: NHD-0420CW-AG3 Serial Mode
Post by: Retheesh_M on February 26, 2015, 10:25:01 AM
No problem.  Glad you got the display working  :)