Author Topic: SPI padding for NHD-0420DZW display  (Read 2505 times)

mouser

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
SPI padding for NHD-0420DZW display
« on: September 15, 2014, 09:39:49 AM »
I'm trying to determine if the NHD-0420DZW is an appropriate display for a design I'm working on.  The MCU I'll be controlling the display with has an 8-bit hardware SPI engine, so writing out the 10-bit commands the display expects will either require me to prepend the RW and RS bits with six zeros and then write the command byte normally, or to write an initial byte that contains the RW and RS bits followed by the first six bits of the command, then a second byte with the last two bits of the command followed by six zeros.    The data sheet makes no comment on which of these methods will work.   Either way, when using a standard hardware SPI engine, the CS line is going to be low while padding bits are clocked into the display, either before or after the command word.  So my questions are:

1)  Does your display support padding like this?
2)  If so, should I pad bits before or after the command word?
3)  Will this have any affect on multi-word writes (e.g. when writing multiple characters into CGRAM or DDRAM, will the padding bits result in a strange character being appended to the display)?

Michael_L

  • Administrator
  • Hero Member
  • *****
  • Posts: 356
  • Karma: 33
    • View Profile
Re: SPI padding for NHD-0420DZW display
« Reply #1 on: September 17, 2014, 09:23:38 AM »
The display does not support serial padding.  The diagrams on page 13 of the display's datasheet show what the controller is expecting to receive serially.  If extra bits are added in between what is expected, undesirable results will occur.  To ultimately determine how the display will work with your design, I would recommend picking up a sample and testing it with your micro.

daryllwin

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: SPI padding for NHD-0420DZW display
« Reply #2 on: October 02, 2014, 05:15:37 AM »
Out of curiosity, is the Arduino limited to 8-bits? Or can it do 10-bit commands?

I ask because I'm having trouble trying to use the SPI interface between the Uno and the same display.

Michael_L

  • Administrator
  • Hero Member
  • *****
  • Posts: 356
  • Karma: 33
    • View Profile
Re: SPI padding for NHD-0420DZW display
« Reply #3 on: October 02, 2014, 09:51:06 AM »
I am not certain of this, but I do not believe the Arduino can support 10-bit commands.

 

Blank Display on NHD‐C0220BiZ‐FS(RGB)‐FBW‐3VM

Started by SteveCBoard Character LCDs

Replies: 3
Views: 4566
Last post May 13, 2014, 12:04:36 AM
by SteveC
NHD‐C12864A1Z‐FSW‐FBW‐HTT display clears after draw

Started by EdAverillBoard Graphic LCDs

Replies: 6
Views: 5700
Last post November 07, 2014, 08:25:20 AM
by Michael_L
NHD‐4.3‐480272EF‐ATXL#‐CTP | FAN5333 | BBB | Nothing on the Display

Started by Alias_AliasBoard TFTs

Replies: 2
Views: 3406
Last post November 20, 2017, 08:40:38 PM
by tolikkk
Arduino LCD library not working with newhaven display NHD‐0420H1Z‐FL‐GWB-3V3

Started by c2hollowBoard Character LCDs

Replies: 9
Views: 8818
Last post July 10, 2014, 08:46:06 AM
by Michael_L
NHD-C0220BiZ Sometimes Ignoring "Clear Display" Command

Started by dstoverBoard Character LCDs

Replies: 2
Views: 3749
Last post March 27, 2014, 05:41:27 PM
by Michael_L