Author Topic: Getting started with NHD-2.4-240320SF-CTXI#-FT1  (Read 11891 times)

sean

  • Jr. Member
  • **
  • Posts: 16
  • Karma: 0
    • View Profile
Getting started with NHD-2.4-240320SF-CTXI#-FT1
« on: July 01, 2014, 04:02:50 PM »
I have not been able to get any response from the display to indicate that I am actually communicating with it.

I then write memory.
   LCD_CMD(0x29);// Turn on Display
   LCD_CMD(0x2C);// Memory Write
   for (mem=0; mem<38400; mem++)
   {
         //LCD_ARG(0x00);
         LCD_ARG(0x00);// Write in black
   }

I do not see any changes in the display.  I am using 8 bit communication.  I am not sure if I should be writing an upper byte in commands and/or data/parameters.

Here is the driver h files:

/*
 * Title: nwhvn24.h
 * Author: Sean O'Leary
 * Description: 2.4" Newhaven display with the
 *   ILI9341display driver.
 */

#ifndef __nwhvn24_h__
#define __nwhvn24_h__

// Size
#define LCD_HEIGHT 320
#define LCD_WIDTH 240

// Control bits.
#define LCD_BACKLIGHT_ON GPIO[(GPIO_PORTB + GPIO_OVRS) >> 2] = BL1
#define LCD_BACKLIGHT_OFF GPIO[(GPIO_PORTB + GPIO_OVRC) >> 2] = BL1

#define LCD_RD0 GPIO[(GPIO_PORTA + GPIO_OVRC) >> 2] = NH_RD
#define LCD_RD1 GPIO[(GPIO_PORTA + GPIO_OVRS) >> 2] = NH_RD

#define LCD_WR0 GPIO[(GPIO_PORTA + GPIO_OVRC) >> 2] = NH_WR
#define LCD_WR1 GPIO[(GPIO_PORTA + GPIO_OVRS) >> 2] = NH_WR

#define LCD_DC0 GPIO[(GPIO_PORTA + GPIO_OVRC) >> 2] = NH_DC
#define LCD_DC1 GPIO[(GPIO_PORTA + GPIO_OVRS) >> 2] = NH_DC

#define LCD_RESET0 GPIO[(GPIO_PORTB + GPIO_OVRC) >> 2] = NH_RST
#define LCD_RESET1 GPIO[(GPIO_PORTB + GPIO_OVRS) >> 2] = NH_RST

// This matches the DBx with the output pins
// clear bits first, then OR in the new data
#define LCD_DATA_SET(x) GPIO[(GPIO_PORTA + GPIO_OVR) >> 2] = \
    ((GPIO[(GPIO_PORTA + GPIO_PVR) >> 2] & 0xFFF807FF) | (x << 11))

void waitsome (void );
void init_lcd(void);
void LCD_CMD ( unsigned char cmd );
void LCD_ARG( unsigned char arg );
#endif


Here is the driver file:
/*
 * Title: nwhvn24.c
 * Author: Sean O'Leary
 * Description: Interface to the Newhaven 2.4" display.
 * Revision History: (Created Wed Mar  3 21:16:10 MST 2010)
 *   
 */

#include "config.h"
#include "nwhvn24.h"

// The color table value.
unsigned char RED, GREEN, BLUE;

void waitsome (void )
{
   extern unsigned char P;
   P=0;
   while (P<50);
 
}

void LCD_CMD ( unsigned char cmd )
{
  LCD_DC0;         // Command
  LCD_RD1;         // Command
  //LCD_WR0;
  //LCD_DATA_SET(0);   // High byte command index
  //LCD_WR1;         // Data latched on rising edge
  LCD_WR0;
  LCD_DATA_SET(cmd);      // Low byte command index
  LCD_WR1;         // Data latched on rising edge
     // (8080 parallel interface). Minimum data setup and hold time is
        // 10ns and 15ns respectively. Shouldn't need nop through 100 MHz
   // unless capacitance is high (>30pF) on data bus/control lines
  LCD_DC1;         // Default to argument/data
  wait();         
}

// Write byte argument (arg) to LCD controller
void LCD_ARG( unsigned char arg )
{
   // Assumes DC1, RD1 and CS0
  LCD_DC1;         // Argument/data
  //LCD_WR0;
  //LCD_DATA_SET(0);
  //LCD_WR1;
  LCD_WR0;
  LCD_DATA_SET(arg);
  LCD_WR1;
}


void init_lcd(void)
{
   putstring1("Initializing LCD\n");
  LCD_WR1;      // De-assert write
  LCD_RD1;
  LCD_WR0;
  LCD_RESET0;
  waitsome();
  LCD_RESET1;
  waitsome(); 
 
  // New routine
  LCD_CMD (0x28);   // Display OFF
 
  LCD_CMD(0x11);   // exit sleep mode
  LCD_ARG(0x00);   
 
  LCD_CMD(0xCB);   // Power Control A
  LCD_ARG(0x39);   // always 0x39
  LCD_ARG(0x2C);   // always 0x2C
  LCD_ARG(0x00);   // always 0x00
  LCD_ARG(0x34);   // Vcore=1.6V
  LCD_ARG(0x02);   // DDVDH=5.6V
 
  LCD_CMD(0xCF);   // Power Control B
  LCD_ARG(0x00);   // always 0x00
  LCD_ARG(0x81);   // PCEQ off
  LCD_ARG(0x30);   // ESD protection
 
  LCD_CMD(0xE8);   // Driver Timing Control A
  LCD_ARG(0x85);   // non-overlap
  LCD_ARG(0x01);   // EQ timing
  LCD_ARG(0x79);   // Pre-charge timing
   
  LCD_CMD(0xEA);   // Driver Timing Control B
  LCD_ARG(0x00);   // Gate driver timing
  LCD_ARG(0x00);   // always 0x00
   
  LCD_CMD(0xED);   // Power-ON sequence control
  LCD_ARG(0x64);   // soft start
  LCD_ARG(0x03);   // power on sequence
  LCD_ARG(0x12);   // power on sequence
  LCD_ARG(0x81);   // DDVDH enhance on
 
  LCD_CMD(0xF7);   // Pump ratio control
  LCD_ARG(0x20);   // DDVDH=2xVCI
 
  LCD_CMD(0xC0);   // Power control 1
  LCD_ARG(0x26);   //
   
  LCD_CMD(0xC1);   // Power control 2
  LCD_ARG(0x11);   //

  LCD_CMD(0xC5);   // VCOM control 1
  LCD_ARG(0x35);   //
  LCD_ARG(0x3E);   //

  LCD_CMD(0xC7);   // VCOM control 2
  LCD_ARG(0xBE);   //
 
  LCD_CMD(0x36);   // memory access control=BGR
  LCD_ARG(0x88);   //

  LCD_CMD(0xB1);   // Frame rate control
  LCD_ARG(0x00);   //
  LCD_ARG(0x10);   //

  LCD_CMD(0xB6);   // display function control
  LCD_ARG(0x0A);   //
  LCD_ARG(0xA2);   //

  LCD_CMD(0x3A);   // pixel format = 16 bit per pixel
  LCD_ARG(0x55);   //

  LCD_CMD(0xF2);   // 3G Gamma control
  LCD_ARG(0x02);   // off

  LCD_CMD(0x26);   // Gamma curve 3
  LCD_ARG(0x01);   //
 
  LCD_CMD(0xE0);   // Positive gamma correction
  LCD_ARG(0x1F);
  LCD_ARG(0x1B);
  LCD_ARG(0x18);
  LCD_ARG(0x0B);
  LCD_ARG(0x0F);
  LCD_ARG(0x09);
  LCD_ARG(0x46);
  LCD_ARG(0xB5);
  LCD_ARG(0x37);
  LCD_ARG(0x0A);
  LCD_ARG(0x0C);
  LCD_ARG(0x07);
  LCD_ARG(0x07);
  LCD_ARG(0x05);
  LCD_ARG(0x00);

  LCD_CMD(0xE1);   // Negative gamma correction
  LCD_ARG(0x00);
  LCD_ARG(0x24);
  LCD_ARG(0x27);
  LCD_ARG(0x04);
  LCD_ARG(0x10);
  LCD_ARG(0x06);
  LCD_ARG(0x39);
  LCD_ARG(0x74);
  LCD_ARG(0x48);
  LCD_ARG(0x05);
  LCD_ARG(0x13);
  LCD_ARG(0x38);
  LCD_ARG(0x38);
  LCD_ARG(0x3a);
  LCD_ARG(0x1F);

  LCD_CMD(0x2A);   // column address set
  LCD_ARG(0x00);   //
  LCD_ARG(0x00);   // start 0x0000
  LCD_ARG(0x00);   //
  LCD_ARG(0xEF);   // end 0x00EF (240)

  LCD_CMD(0x2B);   // page address set
  LCD_ARG(0x00);   //
  LCD_ARG(0x00);   // start 0x0000
  LCD_ARG(0x01);   //
  LCD_ARG(0x3F);   // end 0x013F (320)
 
}

I would appreciate any suggestions.

Michael_L

  • Administrator
  • Hero Member
  • *****
  • Posts: 356
  • Karma: 33
    • View Profile
Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« Reply #1 on: July 02, 2014, 08:16:13 AM »
I'm not sure how fast your micro is running, but you may need to add more delay after the hard reset.  I have posted some Arduino code below that illustrates this, along with the rest of the initialization, and how to write to the display.  Please try to match this code as close as you can, as it is 100% working code:

Code: [Select]
//---------------------------------------------------------
/*
NHD_2_4_240320SF_CTXI_mega.ino
Program for writing to Newhaven Display 2.4 TFT with ILI9341 controller

(c)2014 Mike LaVine - Newhaven Display International, LLC.

        This program is free software; you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation; either version 2 of the License, or
        (at your option) any later version.

        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.
*/
//---------------------------------------------------------

// The 8 bit data bus is connected to PORTA of the Arduino Mega2560
// 5V voltage regulator on Arduino Mega has been replaced with a 3.3V regulator to

provide 3.3V logic

int RS = 30;      // RS signal connected to Arduino digital pin 30
int WR = 31;      // /WR signal connected to Arduino digital pin 31
int RD = 32;      // /RD signal connected to Arduino digital pin 32
int RES = 33;     // /RES signal connected to Arduino digital pin 33

// /CS signal tied to GND
// IM0 signal tied to VDD

void comm_out(unsigned char c)
{
  digitalWrite(RS, LOW);
  PORTA = c;
  digitalWrite(WR, LOW);
  digitalWrite(WR, HIGH);
}

void data_out(unsigned char d)
{
  digitalWrite(RS, HIGH);
  PORTA = d;
  digitalWrite(WR, LOW);
  digitalWrite(WR, HIGH);
}
void disp()
{
unsigned int i;
comm_out(0x2C);              //command to begin writing to frame memory
for(i=0;i<38400;i++)         //fill screen with blue pixels
{
    data_out(0x00);
            data_out(0x1F);
            data_out(0x00);
            data_out(0x1F);
}
        for(i=0;i<38400;i++)         //fill screen with green pixels
{
    data_out(0x07);
            data_out(0xE0);
            data_out(0x07);
            data_out(0xE0);
        }
}

void setup()
{
  DDRC = 0xFF;   
  PORTC = 0x00;
  DDRA = 0xFF;
  PORTA = 0x00;
  digitalWrite(RD, HIGH);
  digitalWrite(WR, LOW);
  digitalWrite(RES, LOW);
  delay(250);
  digitalWrite(RES, HIGH);
  delay(250);
 
  comm_out(0x28);                                  //display off
  comm_out(0x11);  //exit SLEEP mode
 
  comm_out(0xCB);  //power control A
  data_out(0x39);
  data_out(0x2C);
  data_out(0x00);
  data_out(0x34);
  data_out(0x02);
 
  comm_out(0xCF);  //power control B
  data_out(0x00);
  data_out(0x81);
  data_out(0x30);
 
  comm_out(0xC0);
  data_out(0x26);  //power control 1
  data_out(0x04);  //second parameter for ILI9340 (ignored by ILI9341)
 
  comm_out(0xC1);
  data_out(0x11);                  //power control 2
 
  comm_out(0xC5);
  data_out(0x35);
  data_out(0x3E);  //VCOM control 1
 
  comm_out(0x36);
  data_out(0x88);                  //memory access control = BGR
 
  comm_out(0xB1);
  data_out(0x00);
  data_out(0x18);  //frame rate control
 
  comm_out(0xB6);
  data_out(0x0A);
  data_out(0xA2);  //display function control
 
  comm_out(0xC7);
  data_out(0xBE);                  //VCOM control 2
 
  comm_out(0x3A);
  data_out(0x55);                  //pixel format = 16 bit per pixel
 
  /*comm_out(0xE0);
  data_out(0x1F);                  //positive gamma correction
  data_out(0x1B);
  data_out(0x18);
  data_out(0x0B);
  data_out(0x0F);
  data_out(0x09);
  data_out(0x46);
  data_out(0xB5);
  data_out(0x37);
  data_out(0x0A);
  data_out(0x0C);
  data_out(0x07);
  data_out(0x07);
  data_out(0x05);
  data_out(0x00);
 
  comm_out(0xE1);
  data_out(0x00);                  //negative gamma correction
  data_out(0x24);
  data_out(0x27);
  data_out(0x04);
  data_out(0x10);
  data_out(0x06);
  data_out(0x39);
  data_out(0x74);
  data_out(0x48);
  data_out(0x05);
  data_out(0x13);
  data_out(0x38);
  data_out(0x38);
  data_out(0x3A);
  data_out(0x1F);*/
 
  comm_out(0xF2);                  //3g damma control
  data_out(0x02);                  //off
 
  comm_out(0x26);                  //gamma curve 3
  data_out(0x01);
 
  comm_out(0x2A);
  data_out(0x00);                  //column address set
  data_out(0x00);                  //start 0x0000
  data_out(0x00);
  data_out(0xEF);                  //end 0x00EF
 
  comm_out(0x2B);
  data_out(0x00);                  //page address set
  data_out(0x00);                  //start 0x0000
  data_out(0x01);
  data_out(0x3F);                  //end 0x003F
 
  comm_out(0x29);                  //display ON

  delay(10);
}

void loop()
{
  disp();
  delay(1000);
}

sean

  • Jr. Member
  • **
  • Posts: 16
  • Karma: 0
    • View Profile
Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« Reply #2 on: July 02, 2014, 10:13:52 AM »
Thanks Michael_L.  A quick question as I start to go through the code.  It uses RS.  This version of the display does not use an RS but a D/C (data or command).  It is a major change since the last version and all the commands are different.  It is using a ILI9341.  Am I correct that I can just change D/C when the code references RS?

Michael_L

  • Administrator
  • Hero Member
  • *****
  • Posts: 356
  • Karma: 33
    • View Profile
Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« Reply #3 on: July 02, 2014, 12:22:44 PM »
Yes that is correct. The D/C and RS signals are interchangeable, and they represent the same pin.  Some of our displays call that pin RS, whereas others call it D/C, sorry for the confusion!

sean

  • Jr. Member
  • **
  • Posts: 16
  • Karma: 0
    • View Profile
Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« Reply #4 on: July 02, 2014, 01:03:03 PM »
I changed the code to match, very closely, to the code you posted.  I also matched the timer/delay (I am assuming that the number represents milliseconds).  I still do not get any response (any change visually) from the display.    I thought maybe I had wired it wrong.  So I checked the pinout on the data sheet against my schematic and it is the same.  Then I verified that I can change each of the following signals (to make sure there was not a break in the pcb): CS, DC, WR, RD, RST, D0:D8.  They all responded.  I checked this on the connector going to the display.

I have attached a shot of the schematic.  Is it hooked up as you would expect?  I don't really know where to go from here.  I have two identical boards and they both are acting the same way, with the same version of code loaded.

sean

  • Jr. Member
  • **
  • Posts: 16
  • Karma: 0
    • View Profile
Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« Reply #5 on: July 07, 2014, 05:49:17 PM »
Michael_L: Is the schematic wired the way you would expect in order to make the code you provided work?

Michael_L

  • Administrator
  • Hero Member
  • *****
  • Posts: 356
  • Karma: 33
    • View Profile
Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« Reply #6 on: July 08, 2014, 09:39:30 AM »
Yes the schematic looks good.  Do you see the backlight turn on when you apply power?

sean

  • Jr. Member
  • **
  • Posts: 16
  • Karma: 0
    • View Profile
Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« Reply #7 on: July 08, 2014, 09:41:31 AM »
Yes,  I can adjust the brightness of the backlight using the two transistors.  Yesterday I ohmed out all the grounds at the connector and then measured all the power lines. Every connection looks like it is good.  Do you have any suggestions on what I could try?

Michael_L

  • Administrator
  • Hero Member
  • *****
  • Posts: 356
  • Karma: 33
    • View Profile
Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« Reply #8 on: July 08, 2014, 09:47:11 AM »
Not anything I can think of.  The code I sent you is confirmed to work, and your schematic looks fine.  How fast is your micro running?  Do you have another display you can try?  What do you see on the display when it is powered on?

sean

  • Jr. Member
  • **
  • Posts: 16
  • Karma: 0
    • View Profile
Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« Reply #9 on: July 08, 2014, 10:03:33 AM »
The micro is running at 30 Mhz.  I am transferring at about 150 Khz on the data line (6.72 uS per bit).  When I power on the backlight comes on but I never see anything on the display.

Michael_L

  • Administrator
  • Hero Member
  • *****
  • Posts: 356
  • Karma: 33
    • View Profile
Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« Reply #10 on: July 08, 2014, 10:08:24 AM »
Thank you, I just wanted to make sure you micro wasn't running too fast for the code I sent to work.  What exactly do you see on the display?  All white screen? Any lines or colors?
Please double check that you have matched the code I sent in terms of initialization (the order and the values), my write functions, and how I am writing to the display.

sean

  • Jr. Member
  • **
  • Posts: 16
  • Karma: 0
    • View Profile
Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« Reply #11 on: July 08, 2014, 11:57:53 AM »
The display is basically white. There are no colors.  Nothing is ever displayed on the screen.  I have gone through the code I am using again and very carefully compared it to the code you said works.  I think it is the same but I am going to put down my code here so I am being clear as to what I am doing.


Setting up the ports is done in MCU initialization and is not shown.

In main.c  the backlight is turned on and the LCD initialized
// Set up LCD
  LCD_BACKLIGHT_ON;
  init_lcd();

Then the program loops forever waiting for a command from the user. In this case the letter L.
//=======================================================
//LCD
//=======================================================

else if (c == 'L'|| c == 'l')
{
   putstring1("Write blue and green to screen then loop\n");
   putstring1("Power cycle to exit\n");
   loopL:
   display();
   waitsome(1000);
   goto loopL;
}



This is the wait routine.  Millisecond counter, but even ms only:
void waitsome (uint16_t lev)
{
   // Each count is 2 ms; e.g. lev=50 is 100ms.
   // Write lev as the ms you want let the code divide by 2
   extern uint16_t P;
   P=0;
   while (P< (lev/2));// 2 ms/count
 
}

Write a command:
// Write a command to the LCD Controller
void LCD_CMD (uint8_t cmd)
{
  LCD_DC0;            // This is a Command
  LCD_DATA_SET(cmd);   // Command index
  LCD_WR0;
  LCD_WR1;            // Data latched on rising edge
     // (8080 parallel interface). Minimum data setup and hold time is
        // 10ns and 15ns respectively. Shouldn't need NOP through 100 MHz
      // unless capacitance is high (>30pF) on data bus/control lines
  LCD_DC1;            // Default to argument/data      
}

Write data:
// Write byte argument (arg) to LCD controller
void LCD_ARG(uint8_t arg)
{
  LCD_DC1;            // This is an Argument/data
  LCD_DATA_SET(arg);   //  Argument put on data lines
  LCD_WR0;
  LCD_WR1;            // Data latched on rising edge
}

This writes the blue and green to memory:
void display(void)
{
   uint16_t i;
   LCD_CMD(0x2C);   // Begin writing to frame memory
   for (i=0; i<38400; i++)   // fill screen with blue pixels
   {
      LCD_ARG(0x00);
      LCD_ARG(0x1F);
      LCD_ARG(0x00);
      LCD_ARG(0x1F);
   }
   for (i=0; i<38400; i++)   // fill screen with green pixels
   {
      LCD_ARG(0x07);
      LCD_ARG(0xE0);
      LCD_ARG(0x07);
      LCD_ARG(0xE0);
   }
}


Here is the initialization code:
void init_lcd(void)
{
  putstring1("\nInitializing LCD\n");
  GPIO[(GPIO_PORTA + GPIO_OVRC) >> 2] = NH_CS; // Clear chip select (make active)
  LCD_RD1;      // Not doing a read so make sure it's high
  LCD_WR0;
  LCD_RESET0;
  waitsome(250);
  LCD_RESET1;
  waitsome(250); 
 
  // New routine
  LCD_CMD (0x28);   // Display OFF
  LCD_CMD(0x11);   // exit sleep mode
 
  LCD_CMD(0xCB);   // Power Control A
  LCD_ARG(0x39);   //
  LCD_ARG(0x2C);   //
  LCD_ARG(0x00);   //
  LCD_ARG(0x34);   // Vcore=1.6V
  LCD_ARG(0x02);   // DDVDH=5.6V
 
  LCD_CMD(0xCF);   // Power Control B
  LCD_ARG(0x00);   //
  LCD_ARG(0x81);   // PCEQ off
  LCD_ARG(0x30);   // ESD protection
 
  LCD_CMD(0xC0);
  LCD_ARG(0x26);   // Power Control 1
  LCD_ARG(0X04);   // second parameter for ILI9340 (ignored by ILI9341)
 
  LCD_CMD(0xC1);   // Power control 2
  LCD_ARG(0x11);   //
 
  LCD_CMD(0xC5);   // VCOM control 1
  LCD_ARG(0x35);   //
  LCD_ARG(0x3E);   //

  LCD_CMD(0x36);   // memory access control=BGR
  LCD_ARG(0x88);   //

  LCD_CMD(0xB1);   // Frame rate control
  LCD_ARG(0x00);   //
  LCD_ARG(0x18);   //

  LCD_CMD(0xB6);   // display function control
  LCD_ARG(0x0A);   //
  LCD_ARG(0xA2);   //

  LCD_CMD(0xC7);   // VCOM control 2
  LCD_ARG(0xBE);   //
 
  LCD_CMD(0x3A);   // pixel format = 16 bit per pixel
  LCD_ARG(0x55);   //

  /*LCD_CMD(0xE0);   // Positive gamma correction
  LCD_ARG(0x1F);
  LCD_ARG(0x1B);
  LCD_ARG(0x18);
  LCD_ARG(0x0B);
  LCD_ARG(0x0F);
  LCD_ARG(0x09);
  LCD_ARG(0x46);
  LCD_ARG(0xB5);
  LCD_ARG(0x37);
  LCD_ARG(0x0A);
  LCD_ARG(0x0C);
  LCD_ARG(0x07);
  LCD_ARG(0x07);
  LCD_ARG(0x05);
  LCD_ARG(0x00);

  LCD_CMD(0xE1);   // Negative gamma correction
  LCD_ARG(0x00);
  LCD_ARG(0x24);
  LCD_ARG(0x27);
  LCD_ARG(0x04);
  LCD_ARG(0x10);
  LCD_ARG(0x06);
  LCD_ARG(0x39);
  LCD_ARG(0x74);
  LCD_ARG(0x48);
  LCD_ARG(0x05);
  LCD_ARG(0x13);
  LCD_ARG(0x38);
  LCD_ARG(0x38);
  LCD_ARG(0x3A);
  LCD_ARG(0x1F);*/

  LCD_CMD(0xF2);   // 3G Gamma control
  LCD_ARG(0x02);   // off

  LCD_CMD(0x26);   // Gamma curve 3
  LCD_ARG(0x01);   //
 
  LCD_CMD(0x2A);   // column address set
  LCD_ARG(0x00);   //
  LCD_ARG(0x00);   // start 0x0000
  LCD_ARG(0x00);   //
  LCD_ARG(0xEF);   // end 0x00EF (240)

  LCD_CMD(0x2B);   // page address set
  LCD_ARG(0x00);   //
  LCD_ARG(0x00);   // start 0x0000
  LCD_ARG(0x01);   //
  LCD_ARG(0x3F);   // end 0x013F (320)
 
  LCD_CMD(0x29);   // Turn on Display

  waitsome(10); 
}

That is all of it.


sean

  • Jr. Member
  • **
  • Posts: 16
  • Karma: 0
    • View Profile
Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« Reply #12 on: July 08, 2014, 12:09:40 PM »
FYI Here is the board I am working with.  The connector on the left of the screen is where I am measuring the voltages.  For some reason the picture shows stripes on the screen but it is really just a white screen.
« Last Edit: July 08, 2014, 12:12:50 PM by sean »

sean

  • Jr. Member
  • **
  • Posts: 16
  • Karma: 0
    • View Profile
Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« Reply #13 on: July 17, 2014, 01:33:30 PM »
Here is a link to the connector that I am using to attach the LCD to the board: http://www.digikey.com/product-detail/en/FH28-40S-0.5SH(05)/HFV140CT-ND/2119015.  It is a 40 Pin Bottom contact 0.020" pitch.

Michael_L

  • Administrator
  • Hero Member
  • *****
  • Posts: 356
  • Karma: 33
    • View Profile
Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« Reply #14 on: July 18, 2014, 11:03:47 AM »
The code I sent you is confirmed to work, are your connections look good.  It seems there is some issue with the board you are using.  Do you have another display you can try?

 

NHD‐2.4‐240320SF‐CTXL#‐FTN1 touch-screen problem

Started by hbcelebiBoard TFTs

Replies: 5
Views: 4162
Last post December 10, 2014, 11:19:05 AM
by Michael_L
Working on NHD‐2.4‐240320SF‐CTXL#‐FTN1, have problem in initialization

Started by sli25Board TFTs

Replies: 6
Views: 3773
Last post June 04, 2015, 09:52:25 PM
by sli25
NHD-2.4-240320CF-CTXI#-FT (ST7789S controller) and STM32F4 FSMC LCD Interface

Started by deshayesBoard TFTs

Replies: 1
Views: 2656
Last post March 17, 2016, 06:25:18 PM
by fahad
NHDEV firmware to support NHD-2.4-240320CF-CTXI#-FT (ST7889S controller)

Started by deshayesBoard Evaluation Tools

Replies: 1
Views: 2613
Last post December 17, 2015, 09:52:29 AM
by Saurabh_B
Problem in bringing up NHD‐2.4‐240320SF‐CTXL#‐FTN1 on Renesas RL78/G14

Started by sli25Board TFTs

Replies: 3
Views: 3044
Last post May 28, 2015, 02:59:03 PM
by Michael_L