//Èí¼þ¸´Î»£¬¿ÉÄÜÔì³ÉÏÔʾÆÁÒì³££¬²»½¨ÒéʹÓà void LCD_SoftReset(void) { LCD_CmdWrite(0x01); LCD_DataWrite(0x01); LCD_DataWrite(0x00); SysCtlDelay(SysCtlClockGet()/10); }
void Backlight_PWM2Initial(void) { LCD_CmdWrite(0x8c);//PWM setting LCD_DataWrite(0x80); LCD_CmdWrite(0x8c);//PWM setting LCD_DataWrite(0x81);//open PWM }
//0x19: LCD Vertical Display Height Register (VDHR0) //0x1a: LCD Vertical Display Height Register0 (VDHR1) void LCD_VerticalPixelSet(uint16_t verticalPixels) { uint8_t tmp = (uint8_t)(verticalPixels%0x100-1); LCD_CmdWrite(0x19); //VDHR0 //Vertical Display Height Bit [7:0] LCD_DataWrite(tmp);//Vertical pixels = VDHR + 1 tmp = (uint8_t)verticalPixels/0x100; LCD_CmdWrite(0x1a); //VDHR1 //Vertical Display Height Bit [8] LCD_DataWrite(tmp);//Vertical pixels = VDHR + 1 }
//0x9b: Draw Circle Center Vertical Address Register0 (DCVR0) //0x9c: Draw Circle Center Vertical Address Register1 (DCVR1) void Draw_CircleYCenterSet(uint16_t YCenter) { uint8_t temp = (uint8_t) YCenter; LCD_CmdWrite(0x9b); LCD_DataWrite(temp); temp = (uint8_t)(YCenter >> 8); LCD_CmdWrite(0x9c); LCD_DataWrite(temp); }
//0x99: Draw Circle Center Horizontal Address Register0 (DCHR0) //0x9a: Draw Circle Center Horizontal Address Register1 (DCHR1) void Draw_CircleXCenterSet(uint16_t XCenter) { uint8_t temp = (uint8_t) XCenter; LCD_CmdWrite(0x99); LCD_DataWrite(temp); temp = (uint8_t)(XCenter >> 8); LCD_CmdWrite(0x9a); LCD_DataWrite(temp); }
//0x97: Draw Line/Square Vertical End Address Register0 (DLVER0) //0x98: Draw Line/Square Vertical End Address Register1 (DLVER1) void Draw_LSYEndSet(uint16_t YEnd) { uint8_t temp = (uint8_t) YEnd; LCD_CmdWrite(0x97); LCD_DataWrite(temp); temp = (uint8_t)(YEnd >> 8); LCD_CmdWrite(0x98); LCD_DataWrite(temp); }
//0x95: Draw Line/Square Horizontal End Address Register0 (DLHER0) //0x96: Draw Line/Square Horizontal End Address Register1 (DLHER1) void Draw_LSXEndSet(uint16_t XEnd) { uint8_t temp = (uint8_t) XEnd; LCD_CmdWrite(0x95); LCD_DataWrite(temp); temp = (uint8_t)(XEnd >> 8); LCD_CmdWrite(0x96); LCD_DataWrite(temp); }
//0x93: Draw Line/Square Vertical Start Address Register0 (DLVSR0) //0x94: Draw Line/Square Vertical Start Address Register1 (DLVSR1) void Draw_LSYStartSet(uint16_t YStart) { uint8_t temp = (uint8_t) YStart; LCD_CmdWrite(0x93); LCD_DataWrite(temp); temp = (uint8_t)(YStart >> 8); LCD_CmdWrite(0x94); LCD_DataWrite(temp); }
//0x91: Draw Line/Square Horizontal Start Address Register0 (DLHSR0) //0x92: Draw Line/Square Horizontal Start Address Register1 (DLHSR1) void Draw_LSXStartSet(uint16_t XStart) { uint8_t temp = (uint8_t) XStart; LCD_CmdWrite(0x91); LCD_DataWrite(temp); temp = (uint8_t)(XStart >> 8); LCD_CmdWrite(0x92); LCD_DataWrite(temp); }
//0x34: Horizontal End Point 0 of Active Window (HEAW0) //0x35: Horizontal End Point 1 of Active Window (HEAW1) void Window_ActiveXEndPointSet(uint16_t XEnd) { uint8_t temp = XEnd%0x100; LCD_CmdWrite(0x34); LCD_DataWrite(temp); temp = XEnd/0x100; LCD_CmdWrite(0x35); LCD_DataWrite(temp); }
void PLL_Initial(void) { LCD_CmdWrite(0x88); LCD_DataWrite(0x0a); __Delay1ms(); LCD_CmdWrite(0x89); LCD_DataWrite(0x02); __Delay1ms(); }
//0x33: Vertical Start Point 1 of Active Window (VSAW0) void Window_ActiveYStartPointSet(uint16_t YStart) { uint8_t temp = YStart%0x100; LCD_CmdWrite(0x32); LCD_DataWrite(temp); temp = YStart/0x100; LCD_CmdWrite(0x33); LCD_DataWrite(temp); }
//0x31: Horizontal Start Point 1 of Active Window (HSAW1) void Window_ActiveXStartPointSet(uint16_t XStart) { uint8_t temp = XStart%0x100; LCD_CmdWrite(0x30); LCD_DataWrite(temp); temp = XStart/0x100; LCD_CmdWrite(0x31); LCD_DataWrite(temp); }
//0x3c: Horizontal End Point 0 of Scoll Window (HESW0) //0x3d: Horizontal End Point 1 of Scoll Window (HESW1) void Window_ScrollXEndPointSet(uint16_t XEnd) { uint8_t temp = XEnd%0x100; LCD_CmdWrite(0x3c); LCD_DataWrite(temp); temp = XEnd/0x100; LCD_CmdWrite(0x3d); LCD_DataWrite(temp); }
//0x3e: Vertical End Point 0 of Scoll Window (VESW0) //0x3f: Vertical End Point 1 of Scoll Window (VESW0) void Window_ScrollYEndPointSet(uint16_t YEnd) { uint8_t temp = YEnd%0x100; LCD_CmdWrite(0x3e); LCD_DataWrite(temp); temp = YEnd/0x100; LCD_CmdWrite(0x3f); LCD_DataWrite(temp); }
//0x5e: BTE Height Register 0 (BEHR0) //0x5f: BTE Height Register 1 (BEHR0) void BTE_HeightSet(uint16_t height) { uint8_t temp = (uint8_t)(height % 0x100); LCD_CmdWrite(0x5e); LCD_DataWrite(temp); temp = (uint8_t)(height / 0x100); LCD_CmdWrite(0x5f); LCD_DataWrite(temp); }
//0x5a: Vertical Destination Point 0 of BTE (VDBE0) //0x5b: Vertical Destination Point 1 of BTE (VDBE1) void BTE_YDstPointSet(uint16_t YDst) { uint8_t temp = (uint8_t)(YDst % 0x100); LCD_CmdWrite(0x5a); LCD_DataWrite(temp); temp = (uint8_t)(YDst / 0x100); LCD_CmdWrite(0x5b); LCD_DataWrite(temp); }
//0x5c: BTE Width Register 0 (BEWR0) //0x5d: BTE Width Register 1 (BEWR1) void BTE_WidthSet(uint16_t width) { uint8_t temp = (uint8_t)(width % 0x100); LCD_CmdWrite(0x5c); LCD_DataWrite(temp); temp = (uint8_t)(width / 0x100); LCD_CmdWrite(0x5d); LCD_DataWrite(temp); }
//0x56: Vertical Source Point 0 of BTE (VSBE0) //0x57: Vertical Source Point 1 of BTE (VSBE1) void BTE_YSourcePointSet(uint16_t YSource) { uint8_t temp = (uint8_t)(YSource % 0x100); LCD_CmdWrite(0x56); LCD_DataWrite(temp); temp = (uint8_t)(YSource / 0x100); LCD_CmdWrite(0x57); LCD_DataWrite(temp); }
//0x58: Horizontal Destination Point 0 of BTE (HDBE0) //0x59: Horizontal Destination Point 1 of BTE (HDBE1) void BTE_XDstPointSet(uint16_t XDst) { uint8_t temp = (uint8_t)(XDst % 0x100); LCD_CmdWrite(0x58); LCD_DataWrite(temp); temp = (uint8_t)(XDst / 0x100); LCD_CmdWrite(0x59); LCD_DataWrite(temp); }
/////////////PLL setting void PLL_ini(void) { LCD_CmdWrite(0x88); LCD_DataWrite(0x0C); Delay1ms(1); LCD_CmdWrite(0x89); LCD_DataWrite(0x02); Delay1ms(1); }
//0x54: Horizontal Source Point 0 of BTE (HSBE0) //0x55: Horizontal Source Point 1 of BTE (HSBE1) void BTE_XSourcePointSet(uint16_t XSource) { uint8_t temp = (uint8_t)(XSource % 0x100); LCD_CmdWrite(0x54); LCD_DataWrite(temp); temp = (uint8_t)(XSource / 0x100); LCD_CmdWrite(0x55); LCD_DataWrite(temp); }
//0x3a: Vertical Start Point 0 of Scoll Window (VSSW0) //0x3b: Vertical Start Point 1 of Scoll Window (VSSW1) void Window_ScrollYStartPointSet(uint16_t YStart) { uint8_t temp = YStart%0x100; LCD_CmdWrite(0x3a); LCD_DataWrite(temp); temp = YStart/0x100; LCD_CmdWrite(0x3b); LCD_DataWrite(temp); }
//0x38: Horizontal Start Point 0 of Scoll Window (HSSW0) //0x39: Horizontal Start Point 1 of Scoll Window (HSSW1) void Window_ScrollXStartPointSet(uint16_t XStart) { uint8_t temp = XStart%0x100; LCD_CmdWrite(0x38); LCD_DataWrite(temp); temp = XStart/0x100; LCD_CmdWrite(0x39); LCD_DataWrite(temp); }
//0x36: Vertical End Point 0 of Active Window (VEAW0) //0x37: Vertical End Point 1 of Active Window (VEAW0) void Window_ActiveYEndPointSet(uint16_t YEnd) { uint8_t temp = YEnd%0x100; LCD_CmdWrite(0x36); LCD_DataWrite(temp); temp = YEnd/0x100; LCD_CmdWrite(0x37); LCD_DataWrite(temp); }
//0x25: Horizontal Scroll Offset Register1 (HOFS1) void Scroll_HorizontalOffset(uint16_t offset) { uint8_t temp = (uint8_t)(offset%0x100); LCD_CmdWrite(0x24); LCD_DataWrite(temp); temp = (uint8_t)(offset/0x100); temp &= 0x07; LCD_CmdWrite(0x25); LCD_DataWrite(temp); }
//0x2d: Font Write Cursor Vertical Position Register 1 (F_CURYH) void FontCtl_CursorYPositionSet(uint16_t YPosition) { uint8_t temp = (uint8_t)(YPosition%0x100); LCD_CmdWrite(0x2c); LCD_DataWrite(temp); temp = (uint8_t)(YPosition/0x100); temp &= 0x01; LCD_CmdWrite(0x2d); LCD_DataWrite(temp); }
//0x27: Vertical Scroll Offset Register 1 (VOFS1) void Scroll_VerticalOffset(uint16_t offset) { uint8_t temp = (uint8_t)(offset%0x100); LCD_CmdWrite(0x26); LCD_DataWrite(temp); temp = (uint8_t)(offset/0x100); temp &= 0x03; LCD_CmdWrite(0x27); LCD_DataWrite(temp); }
//0x2b: Font Write Cursor Horizontal Position Register 1 (F_CURXH) void FontCtl_CursorXPositionSet(uint16_t XPosition) { uint8_t temp = (uint8_t)(XPosition%0x100); LCD_CmdWrite(0x2a); LCD_DataWrite(temp); temp = (uint8_t)(XPosition/0x100); temp &= 0x03; LCD_CmdWrite(0x2b); LCD_DataWrite(temp); }
static void RA8875_PLL_ini(void) { #ifdef P800x480 LCD_CmdWrite(0x88); LCD_DataWrite(0x0c); Delay1ms(1); LCD_CmdWrite(0x89); LCD_DataWrite(0x02); Delay1ms(1); #endif }