Last active
February 16, 2019 08:28
-
-
Save OrsoEric/fc2a452dc79a36a0e61f71899c0dc1fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int init(void) | |
{ | |
//LCD Port Config | |
//PA0 : LCD_D4 | |
//PA1 : LCD_D5 | |
//PA2 : LCD_D6 | |
//PA3 : LCD_D7 | |
//PA4 : LCD_RS | |
//PA5 : LCD_EN | |
//PA6 : | |
//PA7 : | |
PORT_A_CONFIG('L','L','L','L','H','H','R','R'); | |
///LCD Init | |
//Turn OFF Delay | |
//This is meant to allow LCD display to safely power down and reset | |
//If it's too short, the LCD will bug out when quickly doing ON -> OFF -> ON | |
_delay_ms( 250.0 ); | |
//Power Up the LCD Display | |
CLEAR_BIT( PORTC, PC5 ); | |
//Turn ON Delay | |
//This is meant to give the LCD Display time to safely power Up | |
//Ifit's too short, The LCD will bug out when doing OFF -> ON -> COMMANDS | |
_delay_ms( 250.0 ); | |
//Initialise the display and the driver: Send the sequences that configure the display | |
lcd_init(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment