Author Topic: NHD-4.3-480272FT-CTXL-T not clearing all to one color properly  (Read 349 times)

maolvera93

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
NHD-4.3-480272FT-CTXL-T not clearing all to one color properly
« on: October 09, 2018, 06:15:31 PM »
Hello,

I've been trying to get my Newhaven (NHD-4.3-480272FT-CTXL-T) display to work properly and I just can't. First I had an issue with the screen having random colors, and now when I run the following code, it works unless I OR the DL_CLEAR_RGB function with any color other than black or white. Am I missing a step in my initializing process? Why aren't my colors being displayed properly. I have my external clock set to 4MHz from my PSoC Cypress 5LP microcontroller connected to my Newhaven display. Is it a clock problem?

Code: [Select]
int main()
{
 

    SPIM_Start();
    Clock_SPI_Start();
   
   
    //ss_Write(1);
   
   
    Reset_Write(1);//Power on
    CyDelay(20);
    Reset_Write(0);//Power off
    CyDelay(20);
     Reset_Write(1);//Power on
    CyDelay(20);
   
    cmd_write(ACTIVE);
    CyDelay(20);
    cmd_write(CLKEXT);
    CyDelay(20);
    cmd_write(FT812_CLK36M);
    CyDelay(20);
 

    ft81xMemWrite8(REG_PCLK, ZERO); // Set PCLK to zero - don't clock the LCD until later
    ft81xMemWrite8(REG_PWM_DUTY, ZERO); // Turn off backlight
 
    //initialize display registers
    ft81xMemWrite16(HCYCLE,548);
ft81xMemWrite16(HOFFSET,43);
ft81xMemWrite16(HSYNC0,0);
ft81xMemWrite16(HSYNC1,41);
ft81xMemWrite16(VCYCLE,292);
ft81xMemWrite16(VOFFSET,12);
ft81xMemWrite16(VSYNC0,0);
ft81xMemWrite16(VSYNC1,10);
ft81xMemWrite8(SWIZZLE,0);
    ft81xMemWrite8(PCLK_POL,0);
ft81xMemWrite8(CSPREAD,1);
ft81xMemWrite16(HSIZE,480);
ft81xMemWrite16(VSIZE,272);
   
   
    ft81xMemWrite32(RAM_CMD    , (DL_CLEAR_RGB | WHITE));
    ft81xMemWrite32(RAM_CMD + 4, (DL_CLEAR | 0x1 | CLR_STN | CLR_TAG));
    ft81xMemWrite32(RAM_CMD + 8, (DL_DISPLAY));
    //ft81xMemWrite32(RAM_CMD +12, (DL_CLEAR_RGB | BLUE));
   
    ft81xMemWrite8(REG_DLSWAP,DLSWAP_FRAME);//display list swap
   
    ft81xMemWrite8(REG_GPIO_DIR,(0x80 | ft81xMemRead8(REG_GPIO_DIR)));
    ft81xMemWrite8(REG_GPIO,0x080 | ft81xMemRead8(REG_GPIO));//enable display bit
   
    ft81xMemWrite8(REG_PCLK,5);
   

   
    for(int duty = 0; duty <= 128; duty++)
    {
        ft81xMemWrite8(REG_PWM_DUTY, duty); // Turn on backlight - ramp up slowly to full brighness
        CyDelay(10);
    }


I am using the 4.23 CLEAR_COLOR_RGB command from the FT81x Programmers guide for the command.

 

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

Started by hbcelebiBoard TFTs

Replies: 5
Views: 8755
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: 7
Views: 8077
Last post January 14, 2019, 03:03:30 AM
by rubyatiy
Problem in bringing up NHD‐2.4‐240320SF‐CTXL#‐FTN1 on Renesas RL78/G14

Started by sli25Board TFTs

Replies: 3
Views: 6483
Last post May 28, 2015, 02:59:03 PM
by Michael_L
Problem with WHITE COLOR CHAR on NHD-0440WH-ATMI-JT with 2 lines

Started by Mic71Board Character LCDs

Replies: 1
Views: 468
Last post November 21, 2018, 01:33:08 PM
by Alee_S
most easily read 2x16 LCD color combination - daylight only

Started by j fergusonBoard Character LCDs

Replies: 5
Views: 6812
Last post February 11, 2015, 04:49:45 PM
by Paul_B