Parallel LCD library
0.5
Display driver for character LCD screens based on Hitachi HD44780 (or compatible) chipsets
|
Display driver for character LCD screens based on Hitachi HD44780 (or compatible) chipsets, which are found in most text-based LCDs. The library works with either 4 or 8 data lines in addition to the rs, and enable lines. More...
Go to the source code of this file.
Functions | |
lcdParallel * | lcdParallel_init (char cols, char lines, char dotsize, char rs, char enable, char d0, char d1, char d2, char d3) |
initialize a parallel character LCD display into 4-wire mode. More... | |
lcdParallel * | lcdParallel_init8 (char cols, char lines, char dotsize, char rs, char enable, char d0, char d1, char d2, char d3, char d4, char d5, char d6, char d7) |
initialize a parallel character LCD display into 8-wire mode. More... | |
int | lcdParallel_print (lcdParallel *device, const char *fmt,...) |
Print format "..." args to the display. The output is limited to 128 bytes. More... | |
void | lcdParallel_writeChar (lcdParallel *device, char value) |
Send a single ASCII character to the display. More... | |
void | lcdParallel_clear (lcdParallel *device) |
Clears the display. More... | |
void | lcdParallel_home (lcdParallel *device) |
Sets the cursor to the Home (first column and first line) position. More... | |
void | lcdParallel_noDisplay (lcdParallel *device) |
Turns the display off. More... | |
void | lcdParallel_display (lcdParallel *device) |
Turns the display on. More... | |
void | lcdParallel_noBlink (lcdParallel *device) |
Makes the cursor solid (no blinking). More... | |
void | lcdParallel_blink (lcdParallel *device) |
Makes the cursor blink. More... | |
void | lcdParallel_noCursor (lcdParallel *device) |
Turns the cursor off. More... | |
void | lcdParallel_cursor (lcdParallel *device) |
Turns the cursor on. More... | |
void | lcdParallel_scrollDisplayLeft (lcdParallel *device) |
Scrolls the text on the display to the left. More... | |
void | lcdParallel_scrollDisplayRight (lcdParallel *device) |
Scrolls the text on the display to the right. More... | |
void | lcdParallel_leftToRight (lcdParallel *device) |
Causes the display to add new charaters to the right of the previous ones. More... | |
void | lcdParallel_rightToLeft (lcdParallel *device) |
Causes the display to add new charaters to the left of the previous ones. More... | |
void | lcdParallel_autoscroll (lcdParallel *device) |
Causes the display 'right justify' text from the cursor. More... | |
void | lcdParallel_noAutoscroll (lcdParallel *device) |
Causes the display 'left justify' text from the cursor. More... | |
void | lcdParallel_createChar (lcdParallel *device, char loc, char charmap[]) |
Create and store a custom character in the display's CGRAM memory. More... | |
void | lcdParallel_setCursor (lcdParallel *device, char col, char row) |
Sets the cursor to the specified location on the disply's screen. More... | |
void | lcdParallel_send (lcdParallel *device, char value, char mode) |
Low-level function used to transmit data to the display. More... | |
void | lcdParallel_write (lcdParallel *device, char value, char bits) |
Low-level function used to transmit data to the display. More... | |
Display driver for character LCD screens based on Hitachi HD44780 (or compatible) chipsets, which are found in most text-based LCDs. The library works with either 4 or 8 data lines in addition to the rs, and enable lines.
void lcdParallel_autoscroll | ( | lcdParallel * | device | ) |
Causes the display 'right justify' text from the cursor.
*device | Device pointer returned by the lcdParallel_init or _init8 function. |
void lcdParallel_blink | ( | lcdParallel * | device | ) |
Makes the cursor blink.
*device | Device pointer returned by the lcdParallel_init or _init8 function. |
void lcdParallel_clear | ( | lcdParallel * | device | ) |
Clears the display.
*device | Device pointer returned by the lcdParallel_init or _init8 function. |
void lcdParallel_createChar | ( | lcdParallel * | device, |
char | loc, | ||
char | charmap[] | ||
) |
Create and store a custom character in the display's CGRAM memory.
*device | Device pointer returned by the lcdParallel_init or _init8 function. |
loc | Memory location (0-7) to store the custom character. |
charmap[] | map of the custom character's pixels. |
void lcdParallel_cursor | ( | lcdParallel * | device | ) |
Turns the cursor on.
*device | Device pointer returned by the lcdParallel_init or _init8 function. |
void lcdParallel_display | ( | lcdParallel * | device | ) |
Turns the display on.
*device | Device pointer returned by the lcdParallel_init or _init8 function. |
void lcdParallel_home | ( | lcdParallel * | device | ) |
Sets the cursor to the Home (first column and first line) position.
*device | Device pointer returned by the lcdParallel_init or _init8 function. |
lcdParallel* lcdParallel_init | ( | char | cols, |
char | lines, | ||
char | dotsize, | ||
char | rs, | ||
char | enable, | ||
char | d0, | ||
char | d1, | ||
char | d2, | ||
char | d3 | ||
) |
initialize a parallel character LCD display into 4-wire mode.
cols | Number of columns on the character display. |
lines | Number of lines on the character display. |
dotsize | Number of pixels tall the characters are on the display. Most displays are 8, a few displays have 10 pixel tall characters. |
rs | Register Select pin connect to the display's RS pin. |
enable | Enable pin connect to the display's Enable pin. |
d0 | Data pin 0 usually connected to the display's fifth data pin (for 4-wire mode). |
d1 | Data pin 1 usually connected to the display's sixth data pin (for 4-wire mode). |
d2 | Data pin 2 usually connected to the display's seventh data pin (for 4-wire mode). |
d3 | Data pin 3 usually connected to the display's eigth data pin (for 4-wire mode). |
lcdParallel* lcdParallel_init8 | ( | char | cols, |
char | lines, | ||
char | dotsize, | ||
char | rs, | ||
char | enable, | ||
char | d0, | ||
char | d1, | ||
char | d2, | ||
char | d3, | ||
char | d4, | ||
char | d5, | ||
char | d6, | ||
char | d7 | ||
) |
initialize a parallel character LCD display into 8-wire mode.
cols | Number of columns on the character display. |
lines | Number of lines on the character display. |
dotsize | Number of pixels tall the characters are on the display. Most displays are 8, a few displays have 10 pixel tall characters. |
rs | Register Select pin connect to the display's RS pin. |
enable | Enable pin connect to the display's Enable pin. |
d0 | Data pin 0 usually connected to the display's first data pin (for 8-wire mode). |
d1 | Data pin 1 usually connected to the display's second data pin (for 8-wire mode). |
d2 | Data pin 2 usually connected to the display's third data pin (for 8-wire mode). |
d3 | Data pin 3 usually connected to the display's fourth data pin (for 8-wire mode). |
d4 | Data pin 4 usually connected to the display's fifth data pin (for 8-wire mode). |
d5 | Data pin 5 usually connected to the display's sixth data pin (for 8-wire mode). |
d6 | Data pin 6 usually connected to the display's seventh data pin (for 8-wire mode). |
d7 | Data pin 7 usually connected to the display's eigth data pin (for 8-wire mode). |
void lcdParallel_leftToRight | ( | lcdParallel * | device | ) |
Causes the display to add new charaters to the right of the previous ones.
*device | Device pointer returned by the lcdParallel_init or _init8 function. |
void lcdParallel_noAutoscroll | ( | lcdParallel * | device | ) |
Causes the display 'left justify' text from the cursor.
*device | Device pointer returned by the lcdParallel_init or _init8 function. |
void lcdParallel_noBlink | ( | lcdParallel * | device | ) |
Makes the cursor solid (no blinking).
*device | Device pointer returned by the lcdParallel_init or _init8 function. |
void lcdParallel_noCursor | ( | lcdParallel * | device | ) |
Turns the cursor off.
*device | Device pointer returned by the lcdParallel_init or _init8 function. |
void lcdParallel_noDisplay | ( | lcdParallel * | device | ) |
Turns the display off.
*device | Device pointer returned by the lcdParallel_init or _init8 function. |
int lcdParallel_print | ( | lcdParallel * | device, |
const char * | fmt, | ||
... | |||
) |
Print format "..." args to the display. The output is limited to 128 bytes.
*device | Device pointer returned by the lcdParallel_init or _init8 function. |
*fmt | String which may contain formatters to be printed to the display. |
void lcdParallel_rightToLeft | ( | lcdParallel * | device | ) |
Causes the display to add new charaters to the left of the previous ones.
*device | Device pointer returned by the lcdParallel_init or _init8 function. |
void lcdParallel_scrollDisplayLeft | ( | lcdParallel * | device | ) |
Scrolls the text on the display to the left.
*device | Device pointer returned by the lcdParallel_init or _init8 function. |
void lcdParallel_scrollDisplayRight | ( | lcdParallel * | device | ) |
Scrolls the text on the display to the right.
*device | Device pointer returned by the lcdParallel_init or _init8 function. |
void lcdParallel_send | ( | lcdParallel * | device, |
char | value, | ||
char | mode | ||
) |
Low-level function used to transmit data to the display.
*device | Device pointer returned by the lcdParallel_init or _init8 function. |
value | Byte to send to the display. |
mode | descibes whether the byte is a command or to be displayed. |
void lcdParallel_setCursor | ( | lcdParallel * | device, |
char | col, | ||
char | row | ||
) |
Sets the cursor to the specified location on the disply's screen.
*device | Device pointer returned by the lcdParallel_init or _init8 function. |
col | Column for the cursor to go to. |
row | Line for the cursor to go to. |
void lcdParallel_write | ( | lcdParallel * | device, |
char | value, | ||
char | bits | ||
) |
Low-level function used to transmit data to the display.
*device | Device pointer returned by the lcdParallel_init or _init8 function. |
value | Byte to send to the display. |
bits | descibes whether the display is in 4- or 8-wire mode. |
void lcdParallel_writeChar | ( | lcdParallel * | device, |
char | value | ||
) |
Send a single ASCII character to the display.
*device | Device pointer returned by the lcdParallel_init or _init8 function. |
value | Character to send to the display. |