Skip to content

Instantly share code, notes, and snippets.

@OrsoEric
Last active February 16, 2019 08:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OrsoEric/fc2a452dc79a36a0e61f71899c0dc1fa to your computer and use it in GitHub Desktop.
Save OrsoEric/fc2a452dc79a36a0e61f71899c0dc1fa to your computer and use it in GitHub Desktop.
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