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.


Topics - dfansler

Pages: [1]
1
TFTs / NHD 5.0 800480 resistive touch screen non-linearity
« on: September 06, 2017, 10:45:28 AM »
I have a problem with the resistive touch display on the above display.  On the right end of the display, if I am measuring the resistance from top to bottom, it changes by 300 ohms (increasing from top to bottom).  Reading the horizontal position on the right edge should give the same value from top to bottom - instead the value increases.  This means that if I scale the value to be 800 on the right side, it will go from say 800 at the top to 850 at the bottom.

Is there a problem with the touch screen, or my logic?
Kind regards,
David

2
TFTs / NHD 5.0 800480 startup woes - SOLVED
« on: June 16, 2017, 10:25:48 AM »
I built a board with LED's for all the signals going to the display, that sits between the processor board and the NHD controller board.  Watching the display init routine run, I noticed that bits 6 & 7 were not behaving.  Turns out that those two pins had a solder bridge between them at the processor.  My display now works.

I wish to thank my parents for having me, my wife for having me, my 2 dogs and 1 cat for having me and finally myself - for without myself I would be . . . . . . not be?

Kind regards,
David

Seems like everytime I try a new display, I have a battle getting it to respond.  On my current project I had to switch from the 7.0 TFT to the 5.0 TFT, both 800x480 and both using the SSD1963 controller board.

Attached is a video of the display going thru the init code.  I am using Curt's eval code for the 5.0 800x480 with the SSD1963.  Oh well, the video is too big - what it shows is the display goes black, then when the init occurs, the screen turns white and you can see a horizontal line of pixels as it moved down the display.  When it reaches the bottom, the screen stays mostly white, except for the upper third has darkend - looks a lot like a thunderstorm cloud.  Ok, so I could include a reduced version photo of the screen as the line scans down the display.

I have single stepped through the TFT_5_Write_Data and the TFT_5_Write_Command functions and verified the signals to the controller board - on the controller board.

I have included the code below.

Any suggestions?
Kind regards,
David

void TFT_5_Write_Data (unsigned char data1)  //no joy with delays
{
   gpio_set_gpio_pin(LCD_RS);
   delay_us(100);
   AVR32_GPIO.port[1].ovr = data1;
   delay_us(100);
   gpio_clr_gpio_pin(LCD_nWR);
   delay_us(100);
   gpio_set_gpio_pin(LCD_nWR);
   delay_us(100);
}

void TFT_5_Write_Command (unsigned char command)
{
   int x;
   
   AVR32_GPIO.port[1].ovr = command;
   delay_us(100);
   gpio_clr_gpio_pin(LCD_RS);
   delay_us(100);
   gpio_clr_gpio_pin(LCD_nWR);
   delay_us(100);
   gpio_set_gpio_pin(LCD_nWR);
   delay_us(100);
}

void TFT_5_WindowSet(int s_x, int e_x, int s_y, int e_y)
{
   int s_x_c;  //Start_X_Corrected
   s_x_c = e_x - s_x;
   TFT_5_Write_Command(0x2a);      //set page address
   TFT_5_Write_Data((s_x)>>8);      //set start page address = 0
   TFT_5_Write_Data(s_x);
   TFT_5_Write_Data((e_x)>>8);      //set end page address 639
   TFT_5_Write_Data((e_x));
   TFT_5_Write_Command(0x2b);      //set column address
   TFT_5_Write_Data((s_y)>>8);      //set start column address = 0
   TFT_5_Write_Data(s_y);
   TFT_5_Write_Data((e_y)>>8);      //set end column address = 459
   TFT_5_Write_Data((e_y));
}
void TFT_5_Init(void)
{
   //new setup as of 06-15-17
   gpio_set_gpio_pin(LCD_DISP);
   gpio_clr_gpio_pin(LCD_nWR);
   gpio_clr_gpio_pin(LCD_nRESET);
   delay_ms(15);
   gpio_set_gpio_pin(LCD_nRESET);
   delay_ms(100);
   TFT_5_Write_Command(0x01);     //Software Reset
   delay_ms(100);
   TFT_5_Write_Command(0x01);     //Software Reset
   delay_ms(100);

   TFT_5_Write_Command(0xe0);    //START PLL
   TFT_5_Write_Data(0x01);
   TFT_5_Write_Command(0xe0);    //LOCK PLL
   TFT_5_Write_Data(0x03);
   TFT_5_Write_Command(0xb0);      //SET LCD MODE (7 parameters)
   TFT_5_Write_Data(0x08);         //18-bit, TFT FRC enable, dithering off
   TFT_5_Write_Data(0x80);         //LCD panel mode
   TFT_5_Write_Data(0x03);         //SET horizontal size=800-1 HightByte
   TFT_5_Write_Data(0x1f);          //SET horizontal size=800-1 LowByte
   TFT_5_Write_Data(0x01);         //SET vertical size=480-1 HightByte
   TFT_5_Write_Data(0xdf);         //SET vertical size=480-1 LowByte
   TFT_5_Write_Data(0x00);         //SET even/odd line RGB seq.=RGB
   TFT_5_Write_Command(0xf0);      //SET pixel data I/F format=8bit
   TFT_5_Write_Data(0x00);   
   TFT_5_Write_Command(0x36);   //SET address mode=flip vertical
   TFT_5_Write_Data(0x09);
   TFT_5_Write_Command(0x3a);   // SET R G B format = 6 6 6
   TFT_5_Write_Data(0x60);
   TFT_5_Write_Command(0xe2);         //SET PCLK freq=9.5MHz  ; pixel clock frequency
   TFT_5_Write_Data(0x1d);
   TFT_5_Write_Data(0x02);
   TFT_5_Write_Data(0x54);
   TFT_5_Write_Command(0xe6);         //SET PCLK freq=9.5MHz  ; pixel clock frequency
   TFT_5_Write_Data(0x02);
   TFT_5_Write_Data(0xff);
   TFT_5_Write_Data(0xff);
   TFT_5_Write_Command(0xb4);      //SET Horizontal Period (8 parameters)
   TFT_5_Write_Data(0x04);         //SET HSYNC Total=1056
   TFT_5_Write_Data(0x20);
   TFT_5_Write_Data(0x00);         //SET HSYNC Start Position=88
   TFT_5_Write_Data(0x58);
   TFT_5_Write_Data(0x80);         //SET HSYNC Pulse Width=128=127pixels+1
   TFT_5_Write_Data(0x00);         //SET HSYNC pulse start position=0
   TFT_5_Write_Data(0x00);
   TFT_5_Write_Data(0x00);         //SET HSYNC pulse subpixel start position
   TFT_5_Write_Command(0xb6);       //SET Vertical Period (7 parameters),
   TFT_5_Write_Data(0x02);         //SET Vsync total=525
   TFT_5_Write_Data(0x0d);
   TFT_5_Write_Data(0x00);         //SET VSYNC Pulse Start Position=32
   TFT_5_Write_Data(0x20);
   TFT_5_Write_Data(0x01);         //SET VSYNC Pulse Width= 0=0lines+1
   TFT_5_Write_Data(0x00);         //SET VSYNC Pulse Start Position=0
   TFT_5_Write_Data(0x00);
   TFT_5_Write_Command(0x2a);      //SET column address
   TFT_5_Write_Data(0x00);         //SET start column address=0
   TFT_5_Write_Data(0x00);
   TFT_5_Write_Data(0x03);         //SET end column address=799
   TFT_5_Write_Data(0x1f);
   TFT_5_Write_Command(0x2b);      //SET page address
   TFT_5_Write_Data(0x00);         //SET start page address=0
   TFT_5_Write_Data(0x00);
   TFT_5_Write_Data(0x01);         //SET end page address=479
   TFT_5_Write_Data(0xdf);
   TFT_5_Write_Command(0x13);      //SET normal mode
   TFT_5_Write_Command(0x38);      //SET normal mode
   TFT_5_Write_Command(0x29);      //SET display on
}   

3
I recently purchased 3 each of the above units.  The X+,X-,Y+,Y- signals from the display are carried on the 40 pin conductor between the display and the NHD-5.0-800480TF-20 Controller Board.  There is no output of the  X+,X-,Y+,Y- signals on the NHD-5.0-800480TF-20 Controller Board.  How does one access those signals?
Kind regards,
David

4
TFTs / NHD-2.4-240320sf-ctxi#t1 reveresed colors
« on: December 21, 2016, 09:49:01 AM »
just got the above 2.4" LCD working, but have a strange problem - at least I think it is a problem.  When I send 0xffff to the display it is black, but sending 0x0000 it goes white!  Other NHD TFTs I have used go black with 0x0000 and white with 0xffff. 

Is this normal, or do I have something set wrong?
Thanks,
David

void LCD_INIT(void)
{
   gpio_set_pin_low(LCD_nWR);
   gpio_set_pin_low(LCD_nRESET);//        gpio_local_clr_gpio_pin(LCD_nRESET);         //cycle the reset line
   delay_ms(250);
   gpio_set_pin_high(LCD_nRESET);//   gpio_local_set_gpio_pin(LCD_nRESET);         //cycle the reset line
   delay_ms(250);
   TFT_24S_Write_Command(0x0028);//display OFF
   TFT_24S_Write_Command(0x0011);TFT_24S_Write_Data(0x0000);            //exit SLEEP mode
   TFT_24S_Write_Command(0x00C0);TFT_24S_Write_Data(0x0026);TFT_24S_Write_Data(0x0004);   //power control 1
   TFT_24S_Write_Command(0x00C1);TFT_24S_Write_Data(0x0004);            //power control 2
   TFT_24S_Write_Command(0x00C5);TFT_24S_Write_Data(0x0034);TFT_24S_Write_Data(0x0040);   //VCOM control 1
   TFT_24S_Write_Command(0x0036);TFT_24S_Write_Data(0x0088);            //memory access control = BGR
   TFT_24S_Write_Command(0x00B1);TFT_24S_Write_Data(0x0000);TFT_24S_Write_Data(0x0018);   //frame rate control
   TFT_24S_Write_Command(0x00B6);TFT_24S_Write_Data(0x000A);TFT_24S_Write_Data(0x00A2);   //display function control
   TFT_24S_Write_Command(0x00C7);TFT_24S_Write_Data(0x00C0);            //VCOM control 2
   TFT_24S_Write_Command(0x003A);TFT_24S_Write_Data(0x0055);            //pixel format = 16 bit per pixel
   TFT_24S_Write_Command(0x002A);TFT_24S_Write_Data(0x0000);            //column address set
   TFT_24S_Write_Data(0x0000);            //start 0x0000
   TFT_24S_Write_Data(0x0000);
   TFT_24S_Write_Data(0x00EF);            //end 0x00EF
TFT_24S_Write_Command(0x002B);TFT_24S_Write_Data(0x0000);            //page address set
      TFT_24S_Write_Data(0x0000);            //start 0x0000
   TFT_24S_Write_Data(0x0001);
   TFT_24S_Write_Data(0x003F);   
   TFT_24S_Write_Command(0x0020);
   delay_ms(100);
   TFT_24S_Write_Command(0x0029);//display ON
   delay_ms(10);
        return;
}

5
TFTs / 16 bit color with an ILI9328?
« on: March 31, 2016, 04:53:04 PM »
The ILI9328 is controlling a 2.4" 240x320 LCD TFT display.  While I am still having timing issues, that is a separate issue in a different thread.

The design I choose to use is a 16 bit interface.  The problem - why else would I be writing to the forum - is that the display is not showing the full red color. 

Cycling through the color bits:
0x0000 gives black
0x0001 gives a very dim blue
0x0002 gives a slightly brighter blue
0x0004 gives a slightly brighter blue that 0x0002
0x0008 gives a brighter blue than 0x0004
0x0010 gives a brighter blue than 0x0008
0x0020 gives the brightest single bit blue.
0x0040 gives a very dim green
0x0080 gives a slightly brighter green
0x0100 gives a slightly brighter green than 0x0080
0x0200 gives a slightly brighter green than 0x0100
0x0400 gives a brighter green than 0x0200
0x0800 gives the brightest green
0x1000 gives a very dim red
0x2000 gives a slightly brighter red
0x4000 gives a slightly brighter red than 0x2000
0x8000 gives black

I have checked the signal on the lcd for the 16th bit, and it is cycling up and down.

It appears that the unit is in an 18 bit mode.

Attached is the 16bit i80 interface picture form the ILI9328 manual - I don't understand the 6th bit pointing to the 1st bit in the red and blue . . . . . . .

I set the RGB Display Interface Control 1 (0x0C) to 0x0001  That was the only place I could find to set the interface to 16 bit (other than the IMO pin which is set low)

I want 65k colors - not 256k.

Ideas?
Thanks,
David

6
Like others I have read about on the forum, I get nothing but a white screen.  I have tried several different init codes I have found with no luck.  I know the signals are getting to the display - I hooked an led to each line with a 1k resistor, so I can see the led change, but not drop the volatge on the line.  I am set up for 16bit writes.
Kind regards,
David
The wiring of the unit is
1-gnd       11-D/C select     21-D7          31-gnd
2-nc         12- nWR            22-D8          32-nc
3-nc         13-3.3v             23-D9          33-gnd
4-nc         14-D0               24-D10         34-gnd
5-nc         15-D1               25-D11         35-gnd
6-nc         16-D2               26-D12         36-gnd
7-3.3v      17-D3               27-D13         37-gnd
8-3.3v      18-D4               28-D14         38-3.3v
9-nc         19-D5               29-D15         39-gnd
10-gnd     20-D6               30-nRESET

Code is:
void TFT_24S_Write_Command(int command)
{
            gpio_set_pin_low(LCD_RS);           //set DC low
            AVR32_GPIO.port[0].ovr = command;   //send the command to the LCD
           delay_ms(1);                                  //1ms safety delay
           gpio_set_pin_low(LCD_nWR);          //lower write pin
           delay_ms(1);                                 //1ms safety delay
           gpio_set_pin_high(LCD_nWR);        //raise write pin
          delay_ms(1);                                 //1ms safety delay
}
void TFT_24S_Write_Data(int data)
{
            gpio_set_pin_high(LCD_RS);           //set DC high
            AVR32_GPIO.port[0].ovr = data;   //send the data to the LCD
           delay_ms(1);                                  //1ms safety delay
           gpio_set_pin_low(LCD_nWR);          //lower write pin
           delay_ms(1);                                 //1ms safety delay
           gpio_set_pin_high(LCD_nWR);        //raise write pin
          delay_ms(1);                                 //1ms safety delay
}
/**************************************************************/
void init_lcd(void)
{
        gpio_set_pin_low(LCD_nWR);         //lower the write line
        gpio_set_pin_low(LCD_nRESET);                //cycle the reset line
   delay_ms(250);                                        //delay 250ms
        gpio_set_pin_high(LCD_nRESET);              //cycle the reset line
   delay_ms(250);                                        //delay 250ms
        gpio_set_pin_high(LCD_nWR);                   //raise the write line
   TFT_24S_Write_Command(0x0028);         //display OFF
   TFT_24S_Write_Command(0x0011);         //exit SLEEP mode
   TFT_24S_Write_Data(0x0000);
   TFT_24S_Write_Command(0x00CB);        //Power Control A
   TFT_24S_Write_Data(0x0039);           //always 0x39
   TFT_24S_Write_Data(0x002C);           //always 0x2C
   TFT_24S_Write_Data(0x0000);          //always 0x00
   TFT_24S_Write_Data(0x0034);          //Vcore = 1.6V
   TFT_24S_Write_Data(0x0002);          //DDVDH = 5.6V
   TFT_24S_Write_Command(0x00CF);       //Power Control B
   TFT_24S_Write_Data(0x0000);         //always 0x00
   TFT_24S_Write_Data(0x0081);          //PCEQ off
   TFT_24S_Write_Data(0x0030);         //ESD protection
   TFT_24S_Write_Command(0x00C0);     //power control 1
   TFT_24S_Write_Data(0x0026);
   TFT_24S_Write_Data(0x0004);        //second parameter for ILI9340 (ignored by ILI9341)
   TFT_24S_Write_Command(0x00C1);     //power control 2
   TFT_24S_Write_Data(0x0011);
   TFT_24S_Write_Command(0x00C5);     //VCOM control 1
   TFT_24S_Write_Data(0x0035);
   TFT_24S_Write_Data(0x003E);
   TFT_24S_Write_Command(0x0036);     //memory access control = BGR
   TFT_24S_Write_Data(0x0088);
   TFT_24S_Write_Command(0x00B1);     //frame rate control
   TFT_24S_Write_Data(0x0000);
   TFT_24S_Write_Data(0x0010);             //***********************
   TFT_24S_Write_Command(0x00B6);     //display function control
   TFT_24S_Write_Data(0x000A);
   TFT_24S_Write_Data(0x00A2);
   TFT_24S_Write_Command(0x00C7);          //VCOM control 2
   TFT_24S_Write_Data(0x00BE);
   TFT_24S_Write_Command(0x003A);        //pixel format = 16 bit per pixel
   TFT_24S_Write_Data(0x0055);

   TFT_24S_Write_Command(0x00F2);        //3G Gamma control
   TFT_24S_Write_Data(0x0002);          //off
   TFT_24S_Write_Command(0x0026);       //Gamma curve 3
   TFT_24S_Write_Data(0x0001);
   TFT_24S_Write_Command(0x002A);      //column address set
   TFT_24S_Write_Data(0x0000);
   TFT_24S_Write_Data(0x0000);          //start 0x0000
   TFT_24S_Write_Data(0x0000);
   TFT_24S_Write_Data(0x00EF);         //end 0x00EF
   TFT_24S_Write_Command(0x002B);      //page address set
   TFT_24S_Write_Data(0x0000);
   TFT_24S_Write_Data(0x0000);         //start 0x0000
   TFT_24S_Write_Data(0x0001);
   TFT_24S_Write_Data(0x003F);          //end 0x013F
   TFT_24S_Write_Command(0x0029);      //display ON
        return;
}   

7
I have the above system attached to an Atmel AT32UC processor.  I can not get it to initialize or to display data.  The software is based on the example given for the SSD1963 by New Haven Displays.

I used to use the same display with the SSD1963 built in and had it running before NHD came out with the controller separate.

I hope someone can tell me what I am doing wrong
David

Here is the code

void TFT_7_Write_Data (unsigned char data1)  //no joy with delays
{
   gpio_set_pin_high(LCD_RS);
   AVR32_GPIO.port[3].ovr = data1;         //send data to LCD
   gpio_set_pin_low(LCD_WR);
   gpio_set_pin_high(LCD_WR);

}
void TFT_7_Write_Command (unsigned char command)
{
   int x;

   AVR32_GPIO.port[3].ovr = command;
   gpio_set_pin_low(LCD_RS);
   gpio_set_pin_low(LCD_WR);
   gpio_set_pin_high(LCD_WR);
   delay_us(10);                  //was 1200
}
void TFT_7_Command_Write(unsigned char REG, unsigned char VALUE)
{
   int temp_1;

   AVR32_GPIO.port[3].ovr = REG;         //send data to LCD
   gpio_set_pin_low(LCD_RS);
   gpio_set_pin_low(LCD_WR);
   gpio_set_pin_high(LCD_WR);
   gpio_set_pin_high(LCD_RS);
   AVR32_GPIO.port[3].ovr = VALUE;         //send data to LCD

   return;
}
void TFT_7_Init(void)
{
   //new setup as of 09-25-2015
   gpio_set_pin_low(LCD0_CS);         //enable both LCD Displays
   gpio_set_pin_low(LCD1_CS);
   gpio_set_pin_low(LCD_WR);
   gpio_set_pin_low(LCD_RESET);
   delay_ms(120);
   gpio_set_pin_high(LCD_RESET);
   delay_ms(120);
   gpio_set_pin_high(LCD_BL);
   TFT_7_Write_Command(0x01);      //software reset
   delay_ms(120);
   TFT_7_Write_Command(0xe2);      //set multiplier and divider for PLL
   gpio_set_pin_high(LCD_RS);      //raise RS
   TFT_7_Write_Data(0x1d);      //18bit,Disable FRC,TFT FRC Disable, TFT Mode
   TFT_7_Write_Data(0x02);      //18bit,Disable FRC,TFT FRC Disable, TFT Mode
   TFT_7_Write_Data(0x04);      //18bit,Disable FRC,TFT FRC Disable, TFT Mode
   TFT_7_Command_Write(0xe0,0x01);   //start pll
   delay_ms(1);
   TFT_7_Command_Write(0xe0,0x03);   //lock pll
   TFT_7_Write_Command(0x01);      //software reset
   delay_ms(120);
   TFT_7_Write_Command(0xb0);      //set lcd mode set tft 18 bits mode
   gpio_set_pin_high(LCD_RS);
   TFT_7_Write_Data(0x0c);      //18bit,Disable FRC,TFT FRC Disable, TFT Mode
   TFT_7_Write_Data(0x80);      //was 80  now TFT Mode
   TFT_7_Write_Data(0x03);      //high byte of horz panel size
   TFT_7_Write_Data(0x1f);      //low byte of horz panal size
   TFT_7_Write_Data(0x01);      //high byte of vert panel size
   TFT_7_Write_Data(0xdf);      //low byte of vert panel size
   TFT_7_Write_Data(0x00);      //rgb sequence
   TFT_7_Command_Write(0xf0,0x00);   //set pixel data interface to 8 bit
   TFT_7_Command_Write(0x36,0x09);   //set address mode -  top to bot from sp to ep  was 09
   TFT_7_Write_Command(0xe6);      //set lshift freq
   gpio_set_pin_high(LCD_RS);      //raise RS
   TFT_7_Write_Data(0x02);
   TFT_7_Write_Data(0xff);
   TFT_7_Write_Data(0xff);
   TFT_7_Write_Command(0xb4);      //set horiz period
   gpio_set_pin_high(LCD_RS);
   TFT_7_Write_Data(0x02);//?0x03
   TFT_7_Write_Data(0xf8);//?0xef
   TFT_7_Write_Data(0x00);//0x00
   TFT_7_Write_Data(0x44);//0xa3
   TFT_7_Write_Data(0x0f);//0x07
   TFT_7_Write_Data(0x00);//0x00
   TFT_7_Write_Data(0x00);//0x00
   TFT_7_Write_Data(0x00);//0x00
   TFT_7_Write_Command(0xb6);   //set vert period
   gpio_set_pin_high(LCD_RS);
   TFT_7_Write_Data(0x01);//0x01
   TFT_7_Write_Data(0xf8);//0xef
   TFT_7_Write_Data(0x00);//0x00
   TFT_7_Write_Data(0x13);//0x04
   TFT_7_Write_Data(0x07);//0x01
   TFT_7_Write_Data(0x00);//0x00
   TFT_7_Write_Data(0x00);//0x00
   TFT_7_Write_Command(0x13);   //enter normal mode
   TFT_7_Write_Command(0x38);   //exit idle mode
   TFT_7_Write_Command(0x29);   //set display on
   delay_ms(10);
}

8
I am trying use the NHD-7.0-800480EF-20 Controller Board with one of your 800x480 resistive  displays.  I have not been able to find any info on what voltage you feed Pin3 B/L Enable Power Supply Backlight Enable.  I am currently doing 3.3v and not having much success - but did not want to try anything higher before asking/
Kind regards,
David

9
TFTs / NHD-7.0-800480EF-20 Controller Board
« on: February 24, 2015, 08:59:11 AM »
I recently purchased  NHD-7.0-800480EF-20 Controller Board to go with a 480x800 touch panel from NHD.  A couple of questions about the board that I did not see in the docs:
1.  What voltage does the back light require?
2 . Is there a separate ground for the back light?  Using a low-side driver to control the brightness is much easier than using a high-side driver.
3.  How does one use the Display On Signal?  Is it as simple as 3.3v turns on the display and 0v turns it off?
Kind regards,
david

10
TFTs / Controller for 800x480 TFT Display
« on: January 18, 2015, 07:29:27 PM »
I have a couple of the 800x489 TFT displays.  The older one came with the SSD1963 controller and the newer one (NHD-7.0-800480EF-ATXL#-T) without a controller.
question 1 - do I need a controller for the newer unit, or can i drive it from the 40 pin cable?
question 2 - can I replace the SSD1963 controller board with a NHD-7.0-800480EF-34 Controller Board?
question 3 - why did NHD quit using the SSD1963 on the 7" TFT Displays?
Thanks and Kind regards,
David

11
TFTs / How do you set the SED1963 to 8080 mode?
« on: January 11, 2015, 05:54:01 PM »
The SED1963 data sheet you set the "conf" line to define if the SED1963 is in the 8080 or 6800 mode.  In that the NHD‐7.0‐800480WF‐CTXI#‐T does not have the "conf" line, how do you tell the SED1963 which mode to use?
Kind regards,
David

Pages: [1]