Newhaven Products > OLEDs

NHD-042ODZW-AY5 Jumpers for Serial Interface

(1/2) > >>

PCook:
I recently purchased a 4x20 character display (NHD-042ODZW-AY5). I would like to run this OLED from a Netduino Plus 2 using the SPI interface. However, I am not clear of the OLED unit's jumpers to get a "Serial MPU" interface configuration. I am following the OLED's spec document. My specific questions are:

1. When the spec sheet calls for an "OPEN" jumper, do I need to unsolder the factory installed surface mount resister and remove it from the board entirely?

2. When the spec sheet calls for an "L" jumper, do I need to unsolder the factory installed surface mount resister and resolder it in a new position?

3. Or, should I not have to unsolder anything and ignore the spec sheet implying that the pull-up / pull-down resisters need to be altered on the board and just solder a bridge between jumper pads for JCS1 and JCS2?

Any help would be appreciated because I can't get the OLED display to do anything at the moment. I'll take even little clues as to how to change the jumpers for a"Serial MPU" interface.

Thanks
Pat

Paul_B:
Hello,

Question:

1. When the spec sheet calls for an "OPEN" jumper, do I need to unsolder the factory installed surface mount resister and remove it from the board entirely?

Answer: Yes, you will need to unsolder the surface mount resister and remove it from the board entirely.



Question:

2. When the spec sheet calls for an "L" jumper, do I need to unsolder the factory installed surface mount resister and resolder it in a new position?

Answer: Yes, you will need to unsolder the surface mount resistor and shift it over. You will see 3 pads labeled H_PS_L.
H = High
L = Low

In your case position the resistor across PS and L.

Hope this helps!


P.S. Don't forget to check out the image I attached.

PCook:
Thank you Paul_B! I appreciate your thorough reply. It was very helpful.
I would like encourage the folks at Newhaven Display to edit their spec document to provide better written guidance about jumper alterations.
Pat

SkipSky:
Dear Paul_B and all,

I too was very confused by the data-sheet specifications about jumpers and what was supposed to be done by the user. Your post solved that confusion at lest for me. It seems to me that your post or some slight rewriting of it should be included in Newhaven's data-sheet for the 0420DZW-AY5, and probably other display data-sheets as well. It would certainly help to avoid a lot of head scratching.

I would suppose that some, if not many, brand new displays have been ruined by customers misunderstanding what is supposed to be done. I am also certain that many customers don't have the capability to desolder and resolder surface mount resistors in a clean acceptable manner. It's certainly not for the novice. Fortunately I have that capability.

Well, on to writing some code and seeing if I can get the other parts working. Is there some simple test just to see if the display is in operable condition? Mine is brand new just out of the box from Mouser. Thanks in advance.

Sincerely,
Skip Dykema

Saurabh_B:
Hello,

Unfortunately for OLEDs there is no simple way to test the display unless you start writing characters onto the display.

I do have example serial code available here:

--- Code: ---sbit SCL = P3^4;
sbit SDOUT = P1^0;
sbit SDIN = P1^1;
sbit C_S = P3^3;

void delay(unsigned int n) //Delay subroutine
{
unsigned int i,j;
for (i=0;i<n;i++)
  for (j=0;j<250;j++)
  {;}
}
 

void WriteCommand(unsigned char ins)
{
unsigned char i;
C_S=0;
SCL = 0;
SDOUT = 0; //RS = 0 (Command)
SCL = 1; //RS registered
SCL = 0;
SDOUT = 0; //RW = 0
SCL = 1; //RW registered
SCL = 0;

for (i=0x80;i;i>>=1)
{
if((ins&0x80)==0x80)
SDOUT = 1;
else
SDOUT = 0;
ins=(ins<<1);
SCL = 0;
SCL = 1;
SCL = 0;
}

    C_S=1;
}

void WriteDataInit()
{

C_S=0;
SCL = 0;
SDOUT = 1; //RS = 1 (Data)
SCL = 0; //RS registered
SCL = 1;
SCL = 0;
SDOUT = 0; //RW = 0
SCL = 1; //RS registered
SCL = 0;

}
void WriteData(unsigned char dat)
{
unsigned char i;
for (i=0x80;i;i>>=1)
{
if((dat&0x80)==0x80)
SDOUT = 1;
else
SDOUT = 0;
dat=(dat<<1);
SCL = 0;
SCL = 1;
SCL = 0;
}

}

void init()
{
WriteCommand(0x38);//function set
delay(30);
WriteCommand(0x06);//entry mode set
delay(30);
WriteCommand(0x02);//return home
delay(30);
WriteCommand(0x01);//clear display
delay(30);
WriteCommand(0x0c);//display on
delay(30);
WriteCommand(0x80);//line 1 character 1
delay(30);
}

void main()
{
char i=0x21, j;



init();

while(1)
{
C_S = 1;
WriteCommand(0x80); //Line 1

WriteDataInit();
//WriteDataInit() must only be executed once before starting to write data
//if WriteDataInit() is executed between writes, the display will recognize the two bits as data bits and not RS/RW bits. 
for(j=0; j<20; j++)
{
WriteData(i++);
delay(10);
}

C_S = 1;
//Pulling C_S High means write data is completed
//if next instruction to the display is data, must use WriteDataInit() first
//if write command is executed without pulling C_S high, it will recognize the following instruction on the bus as data regardless
WriteCommand(0xC0); //Line 2

WriteDataInit();
for(j=0; j<20; j++)
{
WriteData(i++);
delay(10);
}

C_S = 1;
WriteCommand(0x94); //Line 3

WriteDataInit();
for(j=0; j<20; j++)
{
WriteData(i++);
delay(10);
}


C_S = 1;
WriteCommand(0xD4); //Line 4

WriteDataInit();
for(j=0; j<20; j++)
{
WriteData(i++);
delay(10);
}

}
}

--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version