Well here is my library I threw together for interfacing the Jaycar QP-5512 LCD screen to AVR micro controllers. A couple of functions. InitiliseLCD, displayData and writeInstruction.
To use you need to include <util/delay.h> and define F_CPU. Have a gander at the usage of delay.h.
Considering we are passing in the ports and pins as addresses, it’s a little bit of pointer passing. But don’t get phased at all about that.
A slight example of calling the functions.
displayData(&PORTB, &PB7, &PB6, ‘c’);
Do a loop of that function call to print words! Easy!
The code is simple. Have a look for yourself.
For a wiring diagram, look back at this post.
Questions? Comments? Suggestions? Flick us a comment.