Skip to content

Instantly share code, notes, and snippets.

@Amritach
Last active August 29, 2015 14:22
Show Gist options
  • Save Amritach/a2be754e2f1cc8206293 to your computer and use it in GitHub Desktop.
Save Amritach/a2be754e2f1cc8206293 to your computer and use it in GitHub Desktop.
/* Function to send the command to LCD */
void Lcd_CmdWrite(char cmd)
{
sendByte(cmd); //Send the command
LcdControlBusPort &= ~(1<<LCD_RS); // Send LOW pulse on RS pin for selecting Command register
LcdControlBusPort &= ~(1<<LCD_RW); // Send LOW pulse on RW pin for Write operation
LcdControlBusPort |= (1<<LCD_EN); // Generate a High-to-low pulse on EN pin
delay(1000);
LcdControlBusPort &= ~(1<<LCD_EN);
delay(10000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment