Skip to content

Instantly share code, notes, and snippets.

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