Esempio n. 1
0
/************************************************************************
* Function: void GfxTconInit(void)                                           
*                                                                       
* Overview: Initialize the IOs to implement Bitbanged SPI interface
*           to connect to the Timing Controller through SPI.
*                                                                       
* Input: none
*                                                                       
* Output: none                                 
*                                                                       
************************************************************************/
void GfxTconInit(void)
{
    InitBitBangedIO();

    DelayMs(20);
    GPIO_TCON(0x0006, 0x2020);
    DelayMs(20);
}
Esempio n. 2
0
/************************************************************************
* Function: void GfxTconInit(void)                                           
*                                                                       
* Overview: Initialize the IOs to implement Bitbanged SPI interface
*           to connect to the Timing Controller through SPI.
*                                                                       
* Input: none
*                                                                       
* Output: none                                 
*                                                                       
************************************************************************/
void GfxTconInit(void)
{
    InitBitBangedIO();
  
 	GfxTconWriteCommand(0x0028, 0x0006);
	GfxTconWriteCommand(0x0000, 0x0001);
	DelayMs(15);

	GfxTconWriteCommand(0x002B, 0x9532);
	GfxTconWriteCommand(0x0003, 0xAAAC);
	GfxTconWriteCommand(0x000C, 0x0002);
	GfxTconWriteCommand(0x000D, 0x000A);
	GfxTconWriteCommand(0x000E, 0x2C00);
	GfxTconWriteCommand(0x001E, 0x00AA);
	GfxTconWriteCommand(0x0025, 0x8000);
	DelayMs(15);

	GfxTconWriteCommand(0x0001, 0x2B3F);
	GfxTconWriteCommand(0x0002, 0x0600);
	GfxTconWriteCommand(0x0010, 0x0000);
	DelayMs(20);

	GfxTconWriteCommand(0x0005, 0x0000);
	GfxTconWriteCommand(0x0006, 0x0000);
	
	
	GfxTconWriteCommand(0x0016, 0xEF1C);
	GfxTconWriteCommand(0x0017, 0x0003);
	GfxTconWriteCommand(0x0007, 0x0233);
	GfxTconWriteCommand(0x000B, 0x5312);
	GfxTconWriteCommand(0x000F, 0x0000);
	DelayMs(20);

	GfxTconWriteCommand(0x0041, 0x0000);
	GfxTconWriteCommand(0x0042, 0x0000);
	GfxTconWriteCommand(0x0048, 0x0000);
	GfxTconWriteCommand(0x0049, 0x013F);
	GfxTconWriteCommand(0x0044, 0xEF00);
	GfxTconWriteCommand(0x0045, 0x0000);
	GfxTconWriteCommand(0x0046, 0x013F);
	GfxTconWriteCommand(0x004A, 0x0000);
	GfxTconWriteCommand(0x004B, 0x0000);
	DelayMs(20);

	GfxTconWriteCommand(0x0030, 0x0707);
	GfxTconWriteCommand(0x0031, 0x0704);
	GfxTconWriteCommand(0x0032, 0x0204);
	GfxTconWriteCommand(0x0033, 0x0201);
	GfxTconWriteCommand(0x0034, 0x0203);
	GfxTconWriteCommand(0x0035, 0x0204);
	GfxTconWriteCommand(0x0036, 0x0204);
	GfxTconWriteCommand(0x0037, 0x0502);
	GfxTconWriteCommand(0x003A, 0x0302);
	GfxTconWriteCommand(0x003B, 0x0500);
	DelayMs(20);

    TCON_CLKLow();        
}
Esempio n. 3
0
/************************************************************************
* Function: void GfxTconInit(void)                                           
*                                                                       
* Overview: Initialize the IOs to implement Bitbanged SPI interface
*           to connect to the Timing Controller through SPI.
*                                                                       
* Input: none
*                                                                       
* Output: none                                 
*                                                                       
************************************************************************/
void GfxTconInit(void)
{
    InitBitBangedIO();

    DelayMs(20);

    GfxTconWriteCommand(0x0001, 0x6300);  //Driver Output Control
    GfxTconWriteCommand(0x0002, 0x0200);  //LCD-Driving-Waveform Control:N-line inversion,N=0
    GfxTconWriteCommand(0x0003, 0x7184);  //Power control 1:Set the step-up cycle of the step-up circuit for 262k-color mode
    DelayMs(100);
    GfxTconWriteCommand(0x0004, 0x0447);  //Input Data and Color Filter Control
    GfxTconWriteCommand(0x0005, 0xb854);  //Function Control
    GfxTconWriteCommand(0X000a, 0x4008);  //Contrast/Brightness Control

    //GfxTconWriteCommand(0X000a,0xff18);//Contrast/Brightness Control
    
    DelayMs(40);
    GfxTconWriteCommand(0x000b, 0xd400);  //Frame Cycle Control
    GfxTconWriteCommand(0x000d, 0x123a);  //Power Control 2
    DelayMs(200);
    GfxTconWriteCommand(0x000e, 0x3000);  //Power Control 3
    DelayMs(200);
    GfxTconWriteCommand(0x000f, 0x0000);  //Gate Scan Position
    GfxTconWriteCommand(0x0016, 0x9f80);  //Horizontal Porch
    GfxTconWriteCommand(0x0017, 0x2212);  //Vertical Porch
    DelayMs(200);
    GfxTconWriteCommand(0x001e, 0x00ef);  //Set the VCOMH voltage
    DelayMs(200);

    GfxTconWriteCommand(0x0030, 0x0507);  //Gamma Control
    GfxTconWriteCommand(0x0031, 0x0004);  //Gamma Control
    GfxTconWriteCommand(0x0032, 0x0707);  //Gamma Control
    GfxTconWriteCommand(0x0033, 0x0000);  //Gamma Control
    GfxTconWriteCommand(0x0034, 0x0000);  //Gamma Control
    GfxTconWriteCommand(0x0035, 0x0307);  //Gamma Control
    GfxTconWriteCommand(0x0036, 0x0700);  //Gamma Control
    GfxTconWriteCommand(0x0037, 0x0000);  //Gamma Control
    GfxTconWriteCommand(0x003a, 0x140b);  //Gamma Control
    GfxTconWriteCommand(0x003b, 0x140b);  //Gamma Control
}