How long does it take to write a single character to an LCD 16x2 display with 8MHz AVR

466 Views Asked by At

I need to create some major improvements in my circut and I am not sure if the LCD display I am using is or is not the bottleneck.
Assuming well designed C code, how long would it take to set cursor position to (0,0), write 4 characters (or a single character) and set cursor to next line?
Does checking the busy flag increase/decrease the operation time?
I know measuring times like those can be problematic but I just need the order of magnitude. (Although if You have some experience with specific times please share your benchmarks).

2

There are 2 best solutions below

0
JimmyB On BEST ANSWER

On page 52 the datasheet states the "Enable cycle time" t[cycE] is 500ns min. => At least 500ns are needed to send one word (4 or 8 bits) of data to the display.

Add to that the processing time for each operation (37µs for most). The return home command however takes 1500µs and hence dominates the processing time.

0
0x6261627564 On

If you check the HD44780 datasheet you can find the timing related information in Table 6: https://www.sparkfun.com/datasheets/LCD/HD44780.pdf Based on this table I estimate to set the cursor and write 4 characters should take approx. 300 us.