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 - sean

Pages: [1] 2
TFTs / Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« on: October 27, 2014, 09:40:50 AM »

We have not fixed it yet.  We have turned it over to someone to review the design and debut the project.  As of yet they have not discovered the problem either.  You said you have fixed your problem.  Would you mind explaining what was happening and how you solved the problem. Perhaps it will help us solve our problem.  Thanks.


TFTs / Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« on: July 21, 2014, 05:01:41 PM »
Sorry I was not clear.  I have  a 1 ohm resistor on main 3.3V regulator for the whole board.  I can set the back light to draw 25mA, 100mA or I can turn the backlight off.  With the backlight off, but the LCD connected and initialized, I am measuring 97mA draw for the entire board.  Then I remove the LCD and measure the current again and I get roughly the same 97mA (the difference is in the noise).  It seams like the LCD is not drawing any current or it is drawing less then 1mA.  I have two board I have test the LCD on each board and have swaped the LCD between boards and they act the same.

I also opened the LCD connector and measured from the pin that contacts the LCD flex cable to the pad on my PCB and found them all making a good connection.

TFTs / Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« on: July 21, 2014, 03:58:40 PM »
I measured the current draw of the board with the backlight off and with the LCD disconnected and I do not see a change.  It seams the current change should be 7-9mA.

TFTs / Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« on: July 21, 2014, 02:34:10 PM »
In the datasheet is days that for 8-bit parallel communication we should use DB8-DB15.  Is that correct (as shown in my schematic)?  The LCD is behaving as though it is not getting anything at all.  I disabled the init routine briefly just to see what it would do and I got the same display, all white.

TFTs / Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« on: July 21, 2014, 02:21:08 PM »
I hard wired the CS line to ground.  Same result.  I also rechecked my code against the know good code and did not find any inconsistencies.

TFTs / Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« on: July 21, 2014, 11:40:22 AM »
I verified that the value I write to the data port shows up on the pins to the LCD.

Then I wrote the following code but did not get any green (or any changed) pixels.

   // Define an area of 100 Pixels
   LCD_CMD(0x2A);               // Column Address
   LCD_ARG(0x00);LCD_ARG(0x0A);   // Set Start column at pixel 10
   LCD_ARG(0x00);LCD_ARG(0x13);   // Set End column at pixel 19
   LCD_CMD(0x2B);               // Page Address
   LCD_ARG(0x00);LCD_ARG(0x0A);   // Set Start row at 10
   LCD_ARG(0x00);LCD_ARG(0x13);   // Set End row at 19

   // Turn the area defined from white to green
   for (i=0; i<100; i++)   // write out 100 values
         LCD_ARG(0x07);   // Set color to green

TFTs / Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« on: July 18, 2014, 02:24:29 PM »
Yes.  I have two identical boards.  They both behave the same, that is I only get a white screen that does not change when I run the code.  I have tried a few things.  I swapped the display between the two boards with no change.  I was talking to a friend who thought it might be a timing issue during the init routine.  So I have placed a 250ms delay after each command  ( command, arguments, delay, next command).  That did not change anything except make the initialization take much longer.

I think I am so close to making this work. I feel like a am missing some small detail and have no idea how to get past this roadblock.

TFTs / Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« 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:  It is a 40 Pin Bottom contact 0.020" pitch.

TFTs / Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« 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.

TFTs / Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« 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

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

else if (c == 'L'|| c == 'l')
   putstring1("Write blue and green to screen then loop\n");
   putstring1("Power cycle to exit\n");
   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;
   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_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_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
   for (i=0; i<38400; i++)   // fill screen with green pixels

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
  // 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_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_CMD(0xE1);   // Negative gamma correction

  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


That is all of it.

TFTs / Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« 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.

TFTs / Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« 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?

TFTs / Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« 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?

TFTs / Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« 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.

TFTs / Re: Getting started with NHD-2.4-240320SF-CTXI#-FT1
« 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?

Pages: [1] 2