Author Topic: NHD-0420CW-AG3 Serial Mode  (Read 3548 times)

Khnum

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
NHD-0420CW-AG3 Serial Mode
« 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.

Retheesh_M

  • Guest
Re: NHD-0420CW-AG3 Serial Mode
« Reply #1 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

Khnum

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
Re: NHD-0420CW-AG3 Serial Mode
« Reply #2 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?

Retheesh_M

  • Guest
Re: NHD-0420CW-AG3 Serial Mode
« Reply #3 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.

Khnum

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
Re: NHD-0420CW-AG3 Serial Mode
« Reply #4 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.

Khnum

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
Re: NHD-0420CW-AG3 Serial Mode
« Reply #5 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

Khnum

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
Re: NHD-0420CW-AG3 Serial Mode
« Reply #6 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!

Retheesh_M

  • Guest
Re: NHD-0420CW-AG3 Serial Mode
« Reply #7 on: February 26, 2015, 10:25:01 AM »
No problem.  Glad you got the display working  :)

 

NHD‐0420CW‐AB3 I2C Interface

Started by andersonpdBoard OLEDs

Replies: 1
Views: 2629
Last post January 23, 2015, 10:00:06 AM
by Michael_L
NHD‐0420CW‐AG3 Contrast question

Started by RichardRBoard OLEDs

Replies: 2
Views: 2145
Last post January 16, 2016, 09:52:02 AM
by RichardR
NHD‐0420CW‐AG3: blinking part of text?

Started by RichardRBoard OLEDs

Replies: 2
Views: 2298
Last post February 28, 2017, 03:27:02 PM
by BobG
NHD‐0420CW‐AG3 + I2C + PIC assembly code: trouble getting started

Started by RichardRBoard OLEDs

Replies: 4
Views: 3140
Last post December 17, 2015, 03:12:49 AM
by RichardR
MOVED: NHD-0420CW-AY3 display, text is mirror image

Started by Saurabh_BBoard Character LCDs

Replies: 0
Views: 2065
Last post March 11, 2016, 07:51:03 AM
by Saurabh_B