This library allows a Flyport board to Control a LiquidCrystal displays based on the Hitachi HD4478O (or a Compatible) chipset, which is found on most text-based LCDs. The library Works with in either 4 or 8-bit mode.
- 4 bits connection
- 8 bits connection
Importing into OpenPicus IDE
Once included the files OpenPicusLCD.c and OpenPicusLCD.h, the OpenPicusLCD.h must be included in the files that uses the library With the #include “OpenPicusLCD.h” directive.
This function is mandatory
Sets the variables used in the other functions
init(int rs, int rw, int enable,int d0, int d1, int d2, int d3, int d4, int d5, int d6, int d7)
|int rs||the number of the F/yport pin that is connected to the RS pin on the LCD|
|int rw||the number of the pin that is connected to the RW pin on the LCD (optional)|
|int enable||the number of the F/yport pin that is connected to the enable pin on the LCD|
|int d0, d1, d2, d3, d4, d5, d6, d7||the numbers of the Flyport pins that are connected to the corresponding data pins on the LCD. d0, d1, d2, and d3 are optional (used in 8 bits mode), if setted as 0 (zero), the LCD will be controlled using only the four data lines d4, d5, d6, d7 (4 bits mode).|
This function is mandatory and must be called after the init() function.
Specifies the dimensions (width and height) of the display and the dotsize.
This function sets automatically the 4 or 8 bits operation mode of the display.
begin(int cols, int lines, int dotsize);
|int cols||the number of columns|
|int lines||the number of the rows|
Clears the LCD screen and positions the cursor in the upper-left corner.
Positions the cursor in the upper-left of the LCD. That is, use that location in outputting subsequent text to the display.
To also Clear the display, use the Clear() function instead.
Position the LCD Cursor; that is, set the location at which subsequent text written to the LCD Will be displayed.
setCursor(int col, int row);
|int col||the column at which to position the cursor (with 0 being the first column).|
|int row||the row at which to position the cursor (with 0 being the first row).|
Turns on the LCD display, after it's been turned off with noDisp|ay(). This will restore the text (and Cursor) that was on the display.
Turns off the LCD display, Without losing the text Currently shown on it.
Display the LCD cursor: an underscore (line) at the position to which the next character will be Written.
Hides the LCD cursor.
Display the blinking LCD cursor. If used in combination with the Cursor() function, the result will depend on the particular display.
Turns off the blinking LCD Cursor.
Scrolls the Contents of the display (text and cursor) one space to the left.
Scrolls the Contents of the display (text and cursor) one space to the right.
Set the direction for text Written to the LCD to left-to-right, the default. This means that subsequent characters written to the display will go from left to right, but does not affect previously-output text.
Set the direction for text written to the LCD to right-to-left (the default is left-to-right). This means that subsequent Characters written to the display will go from right to left, but does not affect previously-output text.
Turns on automatic scrolling of the LCD. This causes each character output to the display to push previous Characters over by one space.
If the Current text direction is left-to-right (the default), the display scrolls to the left; if the current direction is right-to-left, the display scrolls to the right. This has the effect of outputting each new character to the same location on the LCD.
Turns off automatic scrolling of the LCD.
Write a single character to the LCD.
write (int value);
|int value||the character to Write to the display|
print(char text  , int delay);
|char text ||it is a string array with length setted by cols parameter of begin() function.|
|int delay||text can be written with a dela y effect expressed in milliseconds for each character.|