/** ****************************************************************************** ** ** Function Name : LCD_Init ** ** Description : Initializes the LCD. ** ** Passed Parameters : None ** ** Modified Data : None ** ** Return Value : None ** ****************************************************************************** */ void LCD_Init(void) { //Set LCD Port Pins as GPIO PINSEL0 &= ~(0x30000000); //SET Port0 LCD Pins as GPIO PINSEL1 &= ~(0x00003FC0); //SET Port0 LCD Pins as GPIO PINSEL2 &= ~(0x0000000C); //SET Port Pins P1.16 - P1.31 as GPIO SET_PORT0_PIN_DIRN_OUT( LCD_RS_PIN | LCD_RW_PIN | LCD_EN1_PIN | LCD_EN2_PIN | LCD_CLK ); SET_PORT1_PIN_DIRN_OUT( LCD_DATA | LCD_BKLIT | LCD_PWR | LCD_FS ); LCD_POWER_ON; LCD_BKLIT_ON; LCD_InitDriver(); LCD_Clear(); LCD_CursorOff(); // load user-defined characters into LCD LCD_DefineChar(0, RIGHT_ARROW); LCD_DefineChar(1, LEFT_ARROW); LCD_DefineChar(2, LCD_CHAR_TRADEMARK_T); LCD_DefineChar(3, LCD_CHAR_TRADEMARK_M); LCD_DefineChar(4, RIGHT_ARROW); LCD_DefineChar(5, LEFT_ARROW); LCD_DefineChar(6, LCD_CHAR_BAR3); LCD_DefineChar(7, LCD_CHAR_BAR4); }
void Config_LCD(void){ //Config_Contrast_PWM(); //not needed for OLED, since no contrast pin //LCD_Init(); LCD_Init(); LCD_CursorOff(); //Build symbol in LCD's CGRAM to be used later on LCD_build(0, framelement); //build '||' symbol at location 0, used to draw frame LCD_build(1, PILOGO); //build Polltech LOGO at location 1 LCD_build(2,DegreeSym); }