WebbotLib AVR library
WebbotLib It just does it
  C++ documentation  C documentation

SparkFun/serLCD.h

Adds support for the Sparkfun serLCD board for various display sizes.
The serLCD product is either supplied when you buy one of their LCD devices, or can be bought as a standalone item that piggybacks onto a parallel display to convert it into a serial display.
To create a new device then define a Writer:
Writer(myDisplay_put_char); // Forward definition of myDisplay_put_char - detail to come
Then create the device. All of the WebbotLib constructors are the same: they just cope with different numbers of columns and lines eg
SPARKFUN_SERLCD myDisplay = MAKE_SPARKFUN_SERLCD_CC_LL(uart,baud,&myDisplay_put_char)
where CC is the number of columns (16 or 20) and LL is the number of lines (2 or 4).
The default baud rate is 9600 but it may changed.
So for a 16 x 2 line display on UART0 then:
SPARKFUN_SERLCD myDisplay = MAKE_SPARKFUN_SERLCD_16_2(UART0,9600, &myDisplay_put_char);
Now implement the body of the Writer to send a byte to this display:-
MAKE_WRITER(myDisplay_put_char){
   return displaySendByte(&myDisplay, byte);
}
If that seems complex - then don't worry - the Project Designer application will write all of the above code for you!
Once defined you should call displayInit from appInitHardware and then you can use other display commands as listed in _display_common.h

Valid XHTML 1.0 Transitional