Amigos,
He intentado iniciar TFT LCD con el chipset SD1289, Foto del resultado:
Códigodeinicioqueheescrito
voidLcd_Write_Com(intDH)//ÃüÁî{LCD_RS=0;LCD_CS=0;LCD_DataPortH=DH>>8;LCD_DataPortL=DH;LCD_WR=0;LCD_WR=1;LCD_CS=1;}voidLcd_Write_Data(intDH)//Êý¾Ý{LCD_RS=1;LCD_CS=0;LCD_DataPortH=DH>>8;LCD_DataPortL=DH;LCD_WR=0;LCD_WR=1;LCD_CS=1;}voidmain_init(void){LCD_RS=1;LCD_WR=1;LCD_RD=1;LCD_CS=1;LCD_REST=0;//P1=0xFF;delayms(100);LCD_REST=1;P2=0x00;delayms(20);P3=0x00;delayms(20);//StartscreeninitialisationLcd_Write_Com(OSC_START);//StartOscillationLcd_Write_Data(0x00);Lcd_Write_Data(0x01);delayms(30);Lcd_Write_Com(DRIVER_OUT);//DriverOutputControlLcd_Write_Data(0x23);Lcd_Write_Data(0x3F);delayms(30);Lcd_Write_Com(LCD_DRIVE_AC);//LCDDriveACControlLcd_Write_Data(0x06);Lcd_Write_Data(0x00);delayms(30);Lcd_Write_Com(POWER_CONTROL1);//PowerControl(1)Lcd_Write_Data(0xA8);Lcd_Write_Data(0xA6);delayms(30);Lcd_Write_Com(DISPLAY_CONTROL);//DisplayControlLcd_Write_Data(0x00);Lcd_Write_Data(0x33);delayms(30);Lcd_Write_Com(POWER_CONTROL2);//PowerControl(2)Lcd_Write_Data(0x00);Lcd_Write_Data(0x05);delayms(30);Lcd_Write_Com(POWER_CONTROL3);//PowerControl(3)Lcd_Write_Data(0x30);Lcd_Write_Data(0x0B);delayms(30);Lcd_Write_Com(POWER_CONTROL4);//PowerControl(4)Lcd_Write_Data(0x20);Lcd_Write_Data(0x00);delayms(30);Lcd_Write_Com(ENTRY_MODE);//SetDisplaycolormodefor65kcolorLcd_Write_Data(0x68);Lcd_Write_Data(0x30);delayms(30);Lcd_Write_Com(SLEEP_MODE);//ExitSleepModeLcd_Write_Data(0x00);Lcd_Write_Data(0x00);delayms(30);//delay30msLcd_Write_Com(POWER_CONTROL5);//PowerControl(5)Lcd_Write_Data(0x00);Lcd_Write_Data(0xA8);delayms(30);Lcd_Write_Com(HORIZONTAL_RAM_START);//HorizontalRAMaddresspositionstart/endsetupLcd_Write_Data(0xEF);//decimal239Lcd_Write_Data(0x00);//decimal0,i.e.horizontalrangesfrom0->239delayms(30);//PORvalueis0xEF00anyway.ThisaddressmustbesetbeforeRAMwriteLcd_Write_Com(VERTICAL_RAM_START);//VerticalRAMaddressstartpositionsettingLcd_Write_Data(0x00);//0x0000=decimal0Lcd_Write_Data(0x00);delayms(30);Lcd_Write_Com(VERTICAL_RAM_END);//VerticalRAMaddressendpositionsettingLcd_Write_Data(0x01);//0x013F=decimal319Lcd_Write_Data(0x3F);delayms(30);Lcd_Write_Com(RAM_WRITE);//Commanded'ecrituredanslaMemoireecranLCD_CLS(BLANC);//sendblank(mode16Bits)}
hojadedatosdeSD1289