RM68090初始化

来源:本站
导读:目前正在解读《RM68090初始化》的相关信息,《RM68090初始化》是由用户自行发布的知识型内容!下面请观看由(电工技术网 - www.9ddd.net)用户发布《RM68090初始化》的详细说明。
简介:RM68090初始化

void RM68090_BOE28_Initial(void)

{

// VCI=2.8V, IOVCC=2.8V

//************* Reset LCD Driver ****************//

LCD_nRESET = 1;

delayms(1); // Delay 1ms

LCD_nRESET = 0;

delayms(10); // Delay 10ms, This delay time is necessary

LCD_nRESET = 1;

delayms(50); // Delay 50 ms

//************* Start Initial Sequence **********//

LCD_CtrlWrite_RM68090 (0x0001,0x0100); // set SS and SM bit

LCD_CtrlWrite_RM68090 (0x0002,0x0200); // set 1 line inversion

LCD_CtrlWrite_RM68090 (0x0003,0x1030); // set GRAM write direction and BGR=1

LCD_CtrlWrite_RM68090 (0x0004,0x0000); // Resize register

LCD_CtrlWrite_RM68090 (0x0008,0x0202); // set the back porch and front porch

LCD_CtrlWrite_RM68090 (0x0009,0x0000); // set non-display area refresh cycle ISC[3:0]

LCD_CtrlWrite_RM68090 (0x000A,0x0000); // FMARK function disable

LCD_CtrlWrite_RM68090 (0x000C,0x0000); // RGB interface setting

LCD_CtrlWrite_RM68090 (0x000D,0x0000); // Frame marker Position

LCD_CtrlWrite_RM68090 (0x000F,0x0000); // RGB interface polarity

delayms(10); // Delay 10 ms

//*************Power On sequence ****************//

LCD_CtrlWrite_RM68090 (0x0010,0x0000); // SAP, BT[3:0], AP, DSTB, SLP, STB

LCD_CtrlWrite_RM68090 (0x0011,0x0007); // DC1[2:0], DC0[2:0], VC[2:0]

LCD_CtrlWrite_RM68090 (0x0012,0x0000); // VREG1OUT voltage

LCD_CtrlWrite_RM68090 (0x0013,0x0000); // VDV[4:0] for VCOM amplitude

LCD_CtrlWrite_RM68090 (0x0007,0x0001);

LCD_CtrlWrite_RM68090 (0x0007,0x0020);

delayms(200); // Dis-charge capacitor power voltage

LCD_CtrlWrite_RM68090 (0x0010,0x1490); // SAP, BT[3:0], AP, DSTB, SLP, STB

LCD_CtrlWrite_RM68090 (0x0011,0x0227); // Set DC1[2:0], DC0[2:0], VC[2:0]

delayms(50); // Delay 50ms

LCD_CtrlWrite_RM68090 (0x0012,0x0081); // Internal reference voltage

delayms(10); // Delay 10ms

LCD_CtrlWrite_RM68090 (0x0013,0x0800); // VDV[4:0] for VCOM amplitude

LCD_CtrlWrite_RM68090 (0x0029,0x0015); // VCM[5:0] for VCOMH

LCD_CtrlWrite_RM68090 (0x002B,0x000C); // Set Frame Rate

delayms(50); // Delay 50ms

LCD_CtrlWrite_RM68090 (0x0020,0x0000); // GRAM horizontal Address

LCD_CtrlWrite_RM68090 (0x0021,0x0000); // GRAM Vertical Address

// ----------- Adjust the Gamma Curve ----------//

LCD_CtrlWrite_RM68090 (0x0030,0x0303);

LCD_CtrlWrite_RM68090 (0x0031,0x0307);

LCD_CtrlWrite_RM68090 (0x0032,0x0001);

LCD_CtrlWrite_RM68090 (0x0035,0x0204);

LCD_CtrlWrite_RM68090 (0x0036,0x0000);

LCD_CtrlWrite_RM68090 (0x0037,0x0607);

LCD_CtrlWrite_RM68090 (0x0038,0x0004);

LCD_CtrlWrite_RM68090 (0x0039,0x0404);

LCD_CtrlWrite_RM68090 (0x003C,0x0402);

LCD_CtrlWrite_RM68090 (0x003D,0x0000);

//------------------ Set GRAM area ---------------//

LCD_CtrlWrite_RM68090 (0x0050,0x0000); // Horizontal GRAM Start Address

LCD_CtrlWrite_RM68090 (0x0051,0x00EF); // Horizontal GRAM End Address

LCD_CtrlWrite_RM68090 (0x0052,0x0000); // Vertical GRAM Start Address

LCD_CtrlWrite_RM68090 (0x0053,0x013F); // Vertical GRAM Start Address

LCD_CtrlWrite_RM68090 (0x0060,0xA700); // Gate Scan Line

LCD_CtrlWrite_RM68090 (0x0061,0x0001); // NDL,VLE, REV

LCD_CtrlWrite_RM68090 (0x006A,0x0000); // set scrolling line

//-------------- Panel Control -------------------//

LCD_CtrlWrite_RM68090 (0x0090,0x0010);

LCD_CtrlWrite_RM68090 (0x0092,0x0000);

delayms(10); // Delay 10ms

LCD_CtrlWrite_RM68090 (0x0007,0x0133); // 262K color and display ON

}

void LCD_EnterSleep_RM68090(void)

{

LCD_CtrlWrite_RM68090 (0x0007,0x0131); // Set D1=0, D0=1

delayms(10); // Delay 10ms

LCD_CtrlWrite_RM68090 (0x0007,0x0130); // Set D1=0, D0=0

delayms(10); // Delay 10ms

LCD_CtrlWrite_RM68090 (0x0007,0x0000); // display OFF

//************* Power OFF sequence **************//

LCD_CtrlWrite_RM68090 (0x0010,0x0080); // SAP, BT[3:0], APE, AP, DSTB, SLP

LCD_CtrlWrite_RM68090 (0x0011,0x0000); // DC1[2:0], DC0[2:0], VC[2:0]

LCD_CtrlWrite_RM68090 (0x0012,0x0000); // VREG1OUT voltage

LCD_CtrlWrite_RM68090 (0x0013,0x0000); // VDV[4:0] for VCOM amplitude

delayms(50); // Dis-charge capacitor power voltage

LCD_CtrlWrite_RM68090 (0x0010,0x0082); // SAP, BT[3:0], APE, AP, DSTB, SLP

}

void LCD_ExitSleep_RM68090(void)

{

//*************Power On sequence ******************//

LCD_CtrlWrite_RM68090 (0x0010,0x0080); // SAP, BT[3:0], AP, DSTB, SLP

delayms(50); // Dis-charge capacitor power voltage

LCD_CtrlWrite_RM68090 (0x0010,0x1290); // SAP, BT[3:0], AP, DSTB, SLP, STB

LCD_CtrlWrite_RM68090 (0x0011,0x0221); // DC1[2:0], DC0[2:0], VC[2:0]

delayms(80); // Delay 80ms

LCD_CtrlWrite_RM68090 (0x0012,0x0082); // External reference voltage =Vci;

delayms(10); // Delay 10ms

LCD_CtrlWrite_RM68090 (0x0013,0x1600); // VDV[4:0] for VCOM amplitude

LCD_CtrlWrite_RM68090 (0x0029,0x001C); // VCM[5:0] for VCOMH

delayms(50); // Delay 50ms

LCD_CtrlWrite_RM68090 (0x0007,0x0133); // 262K color and display ON

}

提醒:《RM68090初始化》最后刷新时间 2024-03-14 01:00:23,本站为公益型个人网站,仅供个人学习和记录信息,不进行任何商业性质的盈利。如果内容、图片资源失效或内容涉及侵权,请反馈至,我们会及时处理。本站只保证内容的可读性,无法保证真实性,《RM68090初始化》该内容的真实性请自行鉴别。