PIC Programming - Matrix Orbital LCD's
Driving Matrix Orbital serial LCD displays
I modified Mark Crosbies LCD library
so that it works with Matrix Orbital LCDs, which have somewhat different
commands to the Scott Edwards Electronics
LCDs the library was originally written for. You can use the library for
either type of LCD by setting a #define. Note that Matrix Orbital rows and
columns are numbered from 1.
Here is my library source code.
I have made the following changes to the library:
lcd_scroll_left and lcd_scroll_right are not implemented for Matrix Orbital
LCDs.
void lcd_printnum(unsigned short x, char digits) Print a number with leading zero suppression, and selectable significant digits
Similar to lcd_printdec, but this routine can print any value up to 65535,
and leading zeros are suppressed. The number of characters to print is
selected by the digits parameter.
The following commands are only implemented for Martix Orbital LCDs.
void lcd_command(char cmd) Send an arbitrary command to the LCD
Sends a command to the LCD. Since there are quite a large number of single
character commands, I decided it was more efficient to send them to the LCD
via one common routine than to have a separate piece of code for each one.
You can access the commands for your program here
void lcd_bargraph_vert( char column, char length) display vertical bargraph
Displays a vertical bargraph of size length at the specified column. The bar
can be between 0 and 8 * the number of rows in the display [e.g. 32 for a 4
line display].
void lcd_bargraph_horiz( char row, char column, char direction, char
length) display horizontal bargraph
Displays a horizontal bargraph at row,column with the specified length. The
length can be between 0 and 5 * the number of columns in the display [e.g.
100 for a 20 column display]. The graph displays L to R if direction is 0
and R to L if direction is 1.
Back Home