LCD_Command = Set_Ref_Vol_Mode; delay(;
LCD_Command = Set_Ref_Vol_Reg; delay(; LCD_Clear(; delay(;
LCD_Command = Set_Page_Addr_X|0x0; delay(;
LCD_Command = Set_ColH_Addr_X|0x0; delay(;
LCD_Command = Set_ColL_Addr_X|0x0; delay(;
LCD_Command = Display_On; // delay(; #endif }
/******************************************************************** *************************************************/
void LCD_IOConfig(void
{ */
/*补充:复位后 LCD 模式如下: Page address: 0 Column address: 0 Modify-read: OFF Display ON / OFF: OFF Initial display line: 0 (first Initial COM0 register: 0 (COM0 Partial display duty ratio: 1/64 Icon enable/disable : 0 (disable
Reverse display ON / OFF: OFF (normal n-line inversion register: 0 (disable Entire display ON / OFF: OFF (normal Power control register (VC, VR, VF = (0, 0, 0 DC-DC step up: 3 times converter circuit = (0, 0 Regulator resistor select register: (R2, R1, R0 = (0, 0, 0
Reference voltage control register: (EV5, EV4, EV3, EV2, EV1, EV0 = (1, 0, 0, 0, 0, 0
LCD bias ratio: 1/9 SHL select: OFF (normal ADC select: OFF (normal Oscillator status: OFF Power save mode: release #ifndef NO_LCD
GPIO_InitTypeDef GPIO_InitStructure; GPIO_DeInit(GPIOD;
/* Set PD.00(D2, PD.01(D3, PD.04(NOE, PD.05(NWE, PD.14(D0, PD.15(D1 as alternate
function push pull */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_4 | GPIO_Pin_5 |
GPIO_Pin_14 | GPIO_Pin_15;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; GPIO_Init(GPIOD, &GPIO_InitStructure; GPIO_DeInit(GPIOE;
/* Set PE.07(D4, PE.08(D5, PE.09(D6, PE.10(D7 as alternate function push pull */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_9 | GPIO_Pin_10 ;
GPIO_Init(GPIOE, &GPIO_InitStructure; //GPIO_DeInit(GPIOF;
/* Set PF.00(A0 (RS as alternate function push pull */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0; GPIO_Init(GPIOF, &GPIO_InitStructure; GPIO_DeInit(GPIOG;
/* Set PG.12(NE4 (LCD/CS as alternate function push pull - CE3(LCD /CS */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12; GPIO_Init(GPIOG, &GPIO_InitStructure; #endif }
/******************************************************************** *************************************************/
#ifdef __CC_ARM __asm void wait( { nop
相关推荐: