Programming: LCD Code for checking if the LCD is busy

The data direction for the data port must be input since we will be getting information from the LCD. All of the PORTB lines will be set low for this to happen. The enable must be set high and wait for a little while using the asm volatile ("nop"); command a couple of times. The R/W line is set high to have the LCD in read mode so we can receive data from the LCD. The RS line is set low to be in command mode. Turn the enable on and off and grabbing the data until the data gives us the not busy signal of < 0x80 When all of the reading from the LCD is completed, the port is set back to output so the rest of the program can be in output mode for sending commands and sending characters.



Back to blog

Leave a comment

Please note, comments need to be approved before they are published.