Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - wding

Pages: [1]
1
Character LCDs / NHD-C0216CZ-NSW-BBW-3V3 does not show anything
« on: July 27, 2015, 09:38:47 AM »
Hi,

I just installed a NHD-C0216CZ-NSW-BBW-3V3 on my circuit board. An ARM Cortex-M3 processor is being used to control this LCD. The processors' SSP0 port has been configured to SPI mode with CPOL = 0, CPHA = 0, Bit frequency = 104 KHz.

My program follow the LCD's datasheet example to initialize the LCD, then repeatedly send character 'A'. But the LCD keeps blank (the back light is ON).

The codes are below:

int main( )
{

   sys_config();

   sys_set_lcd_RST(!0);          // reset LCD, i.e. RST = 0
   delay(2);            // delay 2ms

   sys_set_lcd_RST(0);      // release RST. i.e. RST = 1
   delay(20);
   
   sys_sel_lcd_Reg(0);      // select Instruction Register, i.e. RS = 0
   
   sys_SSP0_send(0x30);   // wake up
   while (sys_SSP0_busy());
   delay(2);
   
   sys_SSP0_send(0x30);   // wake up
   while (sys_SSP0_busy());
   
   sys_SSP0_send(0x30);   // wake up
   while (sys_SSP0_busy());
   
   sys_SSP0_send(0x39);   // function set
   while (sys_SSP0_busy());
   
   sys_SSP0_send(0x14);   // osc frequency
   while (sys_SSP0_busy());
   
   sys_SSP0_send(0x56);   // power control
   while (sys_SSP0_busy());
   
   sys_SSP0_send(0x56);   // follower control
   while (sys_SSP0_busy());
   
   sys_SSP0_send(0x70);   // contrast
   while (sys_SSP0_busy());
   
   sys_SSP0_send(0x0C);   // display on
   while (sys_SSP0_busy());
   
   sys_SSP0_send(0x06);   // entry mode
   while (sys_SSP0_busy());
   
   sys_SSP0_send(0x01);   // clear
   while (sys_SSP0_busy());
   
   sys_sel_lcd_Reg(!0);      // select Data Register
   
   delay(10);
   
   
   while (1)
   {
      sys_SSP0_send('A');
      while (sys_SSP0_busy());
   };
}

I checked the wave forms on RST, RS, CSB, SCL, SI, all look good. Bu the display simply keeps blank.

Is there any other way I can make the display to show some thing?

Thanks!

Pages: [1]