Newhaven Display Forum

Newhaven Products => OLEDs => Topic started by: mouser on September 15, 2014, 09:39:49 AM

Title: SPI padding for NHD-0420DZW display
Post by: mouser 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)?
Title: Re: SPI padding for NHD-0420DZW display
Post by: Michael_L 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.
Title: Re: SPI padding for NHD-0420DZW display
Post by: daryllwin 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.
Title: Re: SPI padding for NHD-0420DZW display
Post by: Michael_L 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.