Author
|
Matrix Ltd
|
Version
|
2.2
|
Category
|
|
LCD I2C (Backpack) component
Standard alphanumeric LCD based on a standard I2C control bus. Usually using either a PIC device or Microchip IO expander IC.
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Downloadable macro reference
|
Clear
|
|
- VOID
|
Return
|
|
PrintString
|
|
- STRING
|
Text
|
|
- VOID
|
Return
|
|
PrintAscii
|
Takes the ascii value for a character and prints the character
|
- BYTE
|
character
|
|
- VOID
|
Return
|
|
PrintNumber
|
Allows you to print a number. This is limited to a signed-INT, -32768 to 32767
|
[[File:]] -
|
Number
|
|
- VOID
|
Return
|
|
RAMWrite
|
Modifies the internal memory of the LCD to allow for up to 8 customised characters to be created and stored in the device memory
|
- BYTE
|
Index
|
|
- BYTE
|
d0
|
|
- BYTE
|
d1
|
|
- BYTE
|
d2
|
|
- BYTE
|
d3
|
|
- BYTE
|
d4
|
|
- BYTE
|
d5
|
|
- BYTE
|
d6
|
|
- BYTE
|
d7
|
|
- VOID
|
Return
|
|
BacklightControl
|
|
- BYTE
|
State
|
|
- VOID
|
Return
|
|
ClearLine
|
|
- BYTE
|
Line
|
|
- VOID
|
Return
|
|
Cursor
|
Moves the cursor on the LCD Display
|
- BYTE
|
x
|
|
- BYTE
|
y
|
|
- VOID
|
Return
|
|
Command
|
Use this method/macro to send a specific command to the LCD. Refer to the Matrix Multimedia EB006 datasheet for a list of supported instructions. For Non-Matrix LCD's refer to the manufacturers datasheet.
|
- BYTE
|
instruction
|
|
- VOID
|
Return
|
|
PrintFormattedNumber
|
Will allow you to print a number up to 32-bits with signed or unsigned formatting. Signed = -2147483648 to 2147483647 Unsigned = 0 to 4294967295
|
- ULONG
|
Number
|
Enter the number or variable to print to the LCD
|
[[File:]] -
|
Format
|
0=Signed, 1=Unsigned
|
- VOID
|
Return
|
|
ScrollDisplay
|
Scrolls the display left or right by a number of given positions.
|
- BYTE
|
position
|
|
- BYTE
|
direction
|
|
- VOID
|
Return
|
|
PrintFloat
|
Print a Float number rounded up to a specified amount of decimal places.
|
[[File:]] -
|
Number
|
Enter the number or variable to print to the LCD
|
- BYTE
|
DecimalPlaces
|
Enter how many decimal places to round up to (1 - 6)
|
- VOID
|
Return
|
|
Start
|
Startup routine required by the hardware device.
|
- VOID
|
Return
|
|
SetI2CAddress
|
Allows the I2C device address to be dynamically changed in software without having to re-compile. Can be called before the first Start macro or at any point after.
|
- BYTE
|
Address
|
New I2C Device Address excluding R/W bit - Range 0 - 127
|
- VOID
|
Return
|
|
SetBackgroundColour
|
Specifies the colour of the background by creating a mixture of red, green and blue.
|
- BYTE
|
PixelColour
|
0=White, 1=Black
|
- VOID
|
Return
|
|
DrawCircle
|
Draws a circle object on the display with the center of the circle at the location X,Y
|
- UINT
|
X
|
X Coordinate for the center of the circle
|
- UINT
|
Y
|
Y coordinate for the center of the circle
|
- UINT
|
Radius
|
Radius of the circle specified in pixels
|
- BYTE
|
Transparent
|
0=Fill inside circle using background colour / 1=Draw outer circle only
|
- BYTE
|
Solid
|
0=Use Transparent Setting / 1=Fill with foreground colour
|
- VOID
|
Return
|
|
SetForegroundColour
|
Specifies the colour of the foreground by creating a mixture of red, green and blue.
|
- BYTE
|
PixelColour
|
0=White, 1=Black
|
- VOID
|
Return
|
|
DrawRectangle
|
Draws a rectangle with the current foreground colour from pixel loaction X1, Y1 to pixel location X2, Y2
|
- UINT
|
X1
|
|
- UINT
|
Y1
|
|
- UINT
|
X2
|
|
- UINT
|
Y2
|
|
- BYTE
|
Transparent
|
Chooses the transparency of the box - 0 = Box contains background colour, 1 = Box contains previous pixel data.
|
- BYTE
|
Solid
|
Chooses to fill the box with colour - 0 = Box contains transparency data, 1 = Box contains foreground colour.
|
- VOID
|
Return
|
|
Initialise
|
The Init macro must be called once to initialise the Graphical LCD display before any other Graphical LCD component macros are called.
|
- VOID
|
Return
|
|
InvertDisplay
|
|
- VOID
|
Return
|
Property reference
|
Properties
|
|
LCD Address
|
|
|
Channel
|
Channel selection
|
|
Baud Select
|
Baud rate option selector
|
|
Baud Rate
|
Baud rate to be used
|
|
Stop Delay
|
On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not a 10ms delay between an I2C stop event and the next I2C start event. Most modern microcontrollers will not have a problem so this property can be disabled to speed up the I2C communications.
|
|
Rows
|
|
|
Columns
|
|
|
Use Backlight
|
Controls if the backlight is controlled as part of the main data routine or if it is handled separately.
|
|
Scope Traces
|
Selects if the component pin connections are automatically generated on the data recorder window or not. Yes: Automatically add the component pins to a group on the data recorder which will reflect the sim data during simultion. No: Do not show the pin signals on the data recorder window.
|
|
Console Data
|
Selects if the console data is automatically generated or not
|
|
API
|
Specifies the injector component on the panel to interact with to provide comms simulation.
|
|
Connections
|
|
SDA
|
Pin used for SDA (data signal)
|
|
SCL
|
Pin used for SCL (clock signal)
|
|
Simulations
|
|
Simulate Comms
|
Allows the communications to be simulated via an injector component.
|