Newhaven Products > Graphic LCDs

NHD-C24064WO-ATFH-3V3 will not work

(1/1)

tbagner:
Hallo

I have a NHD-C24064WO-ATFH-3V3 but it don't work. I have made a test PCB with the capacitor used in the data sheet. I like to control the display over SPI. I have already used a NHD-C12864A1Z-FS and this worked with my SPI communication.

Now the problem is, i can't see anything on the display but if i touch the connector (it is not a loose contact) on the right side (master side) my content appears and disappears a bit later. I have measured the LCD contrast voltage which is on the master side around 10 volt, but on the slave its only 2v. I have tested some things but it will not work. I have already tested with two displays and two PCBs this is why I don't think its a short circuit or a loos contact. What could be the problem?

Here is my code. I have testet many things this is why so many code is commented out

--- Code: ---void C12864_UpdateFull(){
//Display Master
for (U8 j = 0; j < (C12864_DISPLAY_HW_NOF_ROWS / 8); j++) { //Page manuell increase
spi_sendByteDisp0(0xB0 + j);
spi_sendByteDisp0(0x10); // High bits Column
spi_sendByteDisp0(0x00); //Low Bits --> Adress 0
spi_sendByteDisp0(0xE0); //Read/Modify/Write
PORT_set_data_instructio();//Send Data
for (U8 i = 0; i < C12864_DISPLAY_HW_NOF_COLUMNS; i++) {
spi_sendByteDisp0(C12864_DisplayBuf[j][i]); //Colum Auto increase
}
PORT_clear_data_instructio();//Send Controll bytes
spi_sendByteDisp0(0xEE); //END Write

}
//Display Slave
for (U8 j = 0; j < (C12864_DISPLAY_HW_NOF_ROWS / 8); j++) { //Page manuell increase
spi_sendByteDisp1(0xB0 + j);
spi_sendByteDisp1(0x10); // High bits Column
spi_sendByteDisp1(0x00); //Low Bits --> Adress 0
spi_sendByteDisp1(0xE0); //Read/Modify/Write
PORT_set_data_instructio();//Send Data
//for(nichts = 0;nichts<0x2fff;nichts++); //Wait
for (U8 i = 0; i < C12864_DISPLAY_HW_NOF_COLUMNS; i++) {
spi_sendByteDisp1(C12864_DisplayBuf[j][i]); //Colum Auto increase
}
PORT_clear_data_instructio();//Send Controll bytes
}

}
void C12864_init() {
init_spi_master();
volatile U16 nichts = 0;
for(nichts = 0;nichts<0xffff;nichts++); //Wait
PORT_clear_data_instructio();

//Display Master

//spi_sendByteDisp0(0xA0); //Datenblatt
//spi_sendByteDisp0(0xAE); //Display OFF
spi_sendByteDisp0(0xA2); //Bias 1/9
spi_sendByteDisp0(0xA0);
spi_sendByteDisp0(0xC8); //
spi_sendByteDisp0(0xA4); //
spi_sendByteDisp0(0x40); //
spi_sendByteDisp0(0x25); //
spi_sendByteDisp0(0x81); //
spi_sendByteDisp0(0x10); //
spi_sendByteDisp0(0x2F); //Datenblatt

//spi_sendByteDisp0(0x11); //Set the most significant 4 bits of the display Ram colum address

spi_sendByteDisp0(0xAF); //Datenblatt Disp on


//spi_sendByteDisp0(0xE3); //NOP (sicher nicht in Test?!?)
//spi_sendByteDisp0(0x40); //Display Start Adress 0

//spi_sendByteDisp0(0xA5); //All on

//Display Slave
//spi_sendByteDisp1(0xA0); //Datenblatt
//spi_sendByteDisp1(0xAE); //Display OFF
spi_sendByteDisp1(0xA2); //Bias 1/9
spi_sendByteDisp1(0xA0);
spi_sendByteDisp1(0xC8); //
spi_sendByteDisp1(0xA4); //
spi_sendByteDisp1(0x40); //
spi_sendByteDisp1(0x25); //
spi_sendByteDisp1(0x81); //
spi_sendByteDisp1(0x10); //
spi_sendByteDisp1(0x2F); //Datenblatt

//spi_sendByteDisp1(0x11); //Set the most significant 4 bits of the display Ram colum address

spi_sendByteDisp1(0xAF); //Datenblatt Disp on


//spi_sendByteDisp1(0xE3); //NOP (sicher nicht in Test?!?)
//spi_sendByteDisp1(0x40); //Display Start Adress 0

//spi_sendByteDisp1(0xA5); //All on

}

--- End code ---

and my SPI methods (Atmel AVR)


--- Code: ---void spi_sendByteDisp0(U8 send)
{
volatile U16 nichts = 0;
for(nichts = 0;nichts<0xffff;nichts++); //Wait
volatile U32 gaga = (SPI_CSR_DISP0_NR<<16) | send;
SPI_Port.tdr =  gaga;//SET CS and Data in tdr
while (!SPI_Port.SR.txempty);//wait until Data buffer is empty
for(nichts = 0;nichts<0xffff;nichts++); //Wait

}

void spi_sendByteDisp1(U8 send)
{
volatile U16 nichts = 0;
for(nichts = 0;nichts<0xffff;nichts++); //Wait
SPI_Port.tdr = (SPI_CSR_DISP1_NR<<16)  | send; //SET CS and Data in tdr
while (!SPI_Port.SR.txempty);//wait until Data buffer is empty
for(nichts = 0;nichts<0xffff;nichts++); //Wait
}

--- End code ---

tbagner:
I have found my problem on a other Forum http://www.microchip.com/forums/m440252.aspx.

I have try this solution, but I do not understand where do I have to insert a Potentiometer...

But I found out that my Display works when I pull VR to High. If I do this, the display show my content and then went black.

You can see on the fotos how the display looks.

What can I do?

tbagner:
Okey the problem is now Solved.

The Display have to be connected like on the schematic.

Navigation

[0] Message Index

Go to full version