Difference between revisions of "Component: LCD (Generic, 20x4) (Alphanumeric)"
From Flowcode Help
Jump to navigationJump to searchLine 70: | Line 70: | ||
The LCD will retain the contents of the display, for high speed data we only want to have to write to the portion of the display that can change. | The LCD will retain the contents of the display, for high speed data we only want to have to write to the portion of the display that can change. | ||
{{Fcfile|LCDDemo.fcfx|LCD Demo}} | {{Fcfile|LCDDemo.fcfx|LCD Demo}} | ||
+ | |||
+ | |||
Line 75: | Line 77: | ||
==Macro reference== | ==Macro reference== | ||
+ | ===Clear=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 88: | Line 91: | ||
+ | ===PrintString=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 106: | Line 110: | ||
+ | ===PrintAscii=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 124: | Line 129: | ||
+ | ===PrintNumber=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 142: | Line 148: | ||
+ | ===RAMWrite=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 200: | Line 207: | ||
+ | ===ClearLine=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 218: | Line 226: | ||
+ | ===Cursor=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 241: | Line 250: | ||
+ | ===Command=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 259: | Line 269: | ||
+ | ===PrintFormattedNumber=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 282: | Line 293: | ||
+ | ===ScrollDisplay=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 305: | Line 317: | ||
+ | ===RawSend=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 328: | Line 341: | ||
+ | ===PrintFloat=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 351: | Line 365: | ||
+ | ===RemapCharacter=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 379: | Line 394: | ||
+ | ===Start=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- |
Revision as of 11:50, 3 February 2023
Author | Matrix Ltd |
Version | 1.1 |
Category | Alphanumeric |
Contents
LCD (Generic, 20x4) component
LCD based on the standard 4 x 20 character unit.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_LCD_4X20.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_LCD_4X20.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Connections
For the LCDs to work with the Flowcode LCD component they need to be connected up in 4-bit data mode.
The 4 data signals actually go to the upper data nibble on the LCD as shown below.
Displaying a numeric value
The LCD will retain the contents of the display, for high speed data we only want to have to write to the portion of the display that can change. LCD Demo
Macro reference
Clear
Clear | |
Clears the entire contents of the display. | |
- VOID | Return |
PrintString
PrintString | |
Breaks down a string of text and sends it to the LCD via the private RawSend(byte, mask) macro | |
- STRING | Text |
Enter the text or variable to print to the LCD | |
- VOID | Return |
PrintAscii
PrintAscii | |
Takes the ascii value for a character and prints the character | |
- BYTE | character |
Holds an ascii value. | |
- VOID | Return |
PrintNumber
PrintNumber | |
Based on v5 macro, will allow you to print a number. This is limited to a signed-INT, -32768 to 32767 | |
- INT | Number |
Enter the number or variable to print to the LCD | |
- VOID | Return |
RAMWrite
ClearLine
Cursor
Command
PrintFormattedNumber
ScrollDisplay
ScrollDisplay | |
Scrolls the display left or right by a number of given positions. | |
- BYTE | Position |
Holds the number of positions to shift the display | |
- BYTE | Direction |
0 = left, 1 = right | |
- VOID | Return |
RawSend
RawSend | |
Sends data to the LCD display | |
- BYTE | data |
The data byte to send to the LCD | |
- BOOL | type |
A boolean to indicate command type: true to write data, false to write a command | |
- VOID | Return |
PrintFloat
RemapCharacter
Start
Start | |
Startup routine required by the hardware device. Automatically clears the display after initialising. | |
- VOID | Return |