2016-09-25 5 views
0

직렬 8080 8 비트 데이터 프로토콜을 사용하여 MII283QT-17CP1 2.8 인치 TFT LCD를 ILI9341V 드라이버와 함께 사용하려고합니다.MI0283QT-17CP1 LCD with ILI9341V 컨트롤러

/* Software reset */ 
LCD_Send_Command(ILI9341_RESET); 
HAL_Delay(50); 

LCD_Send_Command(0x34); // TE off 

LCD_Send_Command(ILI9341_POWERA); 
LCD_Send_data(0x39); 
LCD_Send_data(0x2C); 
LCD_Send_data(0x00); 
LCD_Send_data(0x34); //33 
LCD_Send_data(0x02); //06 
LCD_Send_Command(ILI9341_POWERB); 
LCD_Send_data(0x00); 
LCD_Send_data(0xC1); //C3/F9/EA 
LCD_Send_data(0x30); //  /F0 
LCD_Send_Command(ILI9341_DTCA); 
LCD_Send_data(0x85); 
LCD_Send_data(0x00); //01 
LCD_Send_data(0x78); //79 
LCD_Send_Command(ILI9341_DTCB); 
LCD_Send_data(0x00); //seems to be ok 
LCD_Send_data(0x00); //seems to be ok 
LCD_Send_Command(ILI9341_POWER_SEQ); 
LCD_Send_data(0x64); //seems to be ok 
LCD_Send_data(0x03); //seems to be ok 
LCD_Send_data(0x12); //seems to be ok 
LCD_Send_data(0x81); //seems to be ok 
LCD_Send_Command(ILI9341_PRC); 
LCD_Send_data(0x20); //seems to be ok 
LCD_Send_Command(ILI9341_POWER1); 
LCD_Send_data(0x21);//0x1B/1D/27 /21 
LCD_Send_Command(ILI9341_POWER2); 
LCD_Send_data(0x10); // 01 
LCD_Send_Command(ILI9341_VCOM1); 
LCD_Send_data(0x3E); //2D /3F/33/4D/4F 
LCD_Send_data(0x33); //33 /3C/34/3B/38 
LCD_Send_Command(ILI9341_MAC); 
LCD_Send_data(0x48); 
LCD_Send_Command(ILI9341_PIXEL_FORMAT); //seems to be ok 
LCD_Send_data(0x55);     //seems to be ok 
//LCD_Send_Command(ILI9341_RGB_INTERFACE); 
//LCD_Send_data(0x60); 
LCD_Send_Command(ILI9341_FRC); 
LCD_Send_data(0x00); 
LCD_Send_data(0x18); 
LCD_Send_Command(ILI9341_DFC); 
LCD_Send_data(0x08); 
LCD_Send_data(0x82); 
LCD_Send_data(0x27); 
//LCD_Send_Command(ILI9341_3GAMMA_EN); 
//LCD_Send_data(0x00); 
LCD_Send_Command(ILI9341_COLUMN_ADDR); 
LCD_Send_data(0x00); 
LCD_Send_data(0x00); 
LCD_Send_data(0x00); 
LCD_Send_data(0xEF); 
LCD_Send_Command(ILI9341_PAGE_ADDR); 
LCD_Send_data(0x00); 
LCD_Send_data(0x00); 
LCD_Send_data(0x01); 
LCD_Send_data(0x3F); 
LCD_Send_Command(ILI9341_GAMMA); 
LCD_Send_data(0x01); 
LCD_Send_Command(ILI9341_PGAMMA); 
LCD_Send_data(0x0F); 
LCD_Send_data(0x31); 
LCD_Send_data(0x2B); 
LCD_Send_data(0x0C); 
LCD_Send_data(0x0E); 
LCD_Send_data(0x08); 
LCD_Send_data(0x4E); 
LCD_Send_data(0xF1); 
LCD_Send_data(0x37); 
LCD_Send_data(0x07); 
LCD_Send_data(0x10); 
LCD_Send_data(0x03); 
LCD_Send_data(0x0E); 
LCD_Send_data(0x09); 
LCD_Send_data(0x00); 
LCD_Send_Command(ILI9341_NGAMMA); 
LCD_Send_data(0x00); 
LCD_Send_data(0x0E); 
LCD_Send_data(0x14); 
LCD_Send_data(0x03); 
LCD_Send_data(0x11); 
LCD_Send_data(0x07); 
LCD_Send_data(0x31); 
LCD_Send_data(0xC1); 
LCD_Send_data(0x48); 
LCD_Send_data(0x08); 
LCD_Send_data(0x0F); 
LCD_Send_data(0x0C); 
LCD_Send_data(0x31); 
LCD_Send_data(0x36); 
LCD_Send_data(0x0F); 

LCD_Send_Command(ILI9341_SLEEP_OUT); 

HAL_Delay(1000); 

LCD_Send_Command(ILI9341_DISPLAY_ON); 
LCD_Send_Command(ILI9341_GRAM); 

내가 빨간색 (5-6-5 RGB 형식) 모든 화면을 그리기 시작을 시도하고 아무것도 그릴 수없는 것 ... 이미 확인 : 이 내 초기화 코드 리셋, CS, 데이터/명령 및 모든 데이터 라인과 같은 모든 HW 라인. 아무도이 설정으로 작업하고 내가 잘못한 것을 말할 수 있습니까? 감사합니다, Avner

답변

0

확인, 그래서 대답을 발견, initilaiztion 코드에서 아니지만 화면 색칠. 화면 sram에 데이터 쓰기를 설정하는 Gram 명령을 추가하는 것을 잊었습니다. 은 이제 내 착색 기능은 다음과 같이이다 :

void LCD_MNG_FillRect(uint16_t Xpos, uint16_t Ypos, uint16_t Width, uint16_t Heigth, LCD_COLORS_NAMES Color) 
{ 
     uint32_t Index; 
     uint16_t DisplayColor; 
     uint32_t Size = (uint32_t)(Width * Heigth); 
     LCD_InitDrawImage(Xpos, Ypos, Width, Heigth); 
     DisplayColor = LCD_MNG_CreateColor565((uint8_t)LCD_ColorsList[(int)Color].Red, (uint8_t)LCD_ColorsList[(int)Color].Green, (uint8_t)LCD_ColorsList[(int)Color].Blue); 
     LCD_Send_Command(ILI9341_GRAM); // this was missing... 

     for (Index = 0; Index < Size; Index++) 
     { 
       LCD_DisplayNextPoint(DisplayColor); 

     } 
} 

나는이 다른 사람을 도움이되기를 바랍니다.