Component: GLCD Free (ST7567) SPI (Graphical Monochrome): Difference between revisions
No edit summary |
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"" |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 143: | Line 143: | ||
===BPlot=== | ===BPlot=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''BPlot''' | ||
|- | |- | ||
| colspan="2" | Sets a pixel with the current background colour at pixel location X, Y. | | colspan="2" | Sets a pixel with the current background colour at pixel location X, Y. | ||
| Line 167: | Line 167: | ||
===ClearDisplay=== | ===ClearDisplay=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ClearDisplay''' | ||
|- | |- | ||
| colspan="2" | This macro clears the display of any previous output by overwriting the entire display with the background colour. | | colspan="2" | This macro clears the display of any previous output by overwriting the entire display with the background colour. | ||
| Line 181: | Line 181: | ||
===DrawArc=== | ===DrawArc=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DrawArc''' | ||
|- | |- | ||
| colspan="2" | Draws an arc either as an outline or as a filled object. | | colspan="2" | Draws an arc either as an outline or as a filled object. | ||
| Line 235: | Line 235: | ||
===DrawCircle=== | ===DrawCircle=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DrawCircle''' | ||
|- | |- | ||
| colspan="2" | Draws a circle object on the display with the center of the circle at the location X,Y | | colspan="2" | Draws a circle object on the display with the center of the circle at the location X,Y | ||
| Line 274: | Line 274: | ||
===DrawEllipse=== | ===DrawEllipse=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DrawEllipse''' | ||
|- | |- | ||
| colspan="2" | Draws an ellipse object on the display with the center of the ellipse at the location X,Y | | colspan="2" | Draws an ellipse object on the display with the center of the ellipse at the location X,Y | ||
| Line 318: | Line 318: | ||
===DrawLine=== | ===DrawLine=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DrawLine''' | ||
|- | |- | ||
| colspan="2" | Draws a line with the current foreground colour from pixel location X1, Y1 to pixel location X2, Y2. | | colspan="2" | Draws a line with the current foreground colour from pixel location X1, Y1 to pixel location X2, Y2. | ||
| Line 352: | Line 352: | ||
===DrawRectangle=== | ===DrawRectangle=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DrawRectangle''' | ||
|- | |- | ||
| colspan="2" | Draws a rectangle with the current foreground colour from pixel loaction X1, Y1 to pixel location X2, Y2 | | colspan="2" | Draws a rectangle with the current foreground colour from pixel loaction X1, Y1 to pixel location X2, Y2 | ||
| Line 396: | Line 396: | ||
===DrawRoundedRectangle=== | ===DrawRoundedRectangle=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''DrawRoundedRectangle''' | ||
|- | |- | ||
| colspan="2" | Draws a rectangle with rounded corners | | colspan="2" | Draws a rectangle with rounded corners | ||
| Line 445: | Line 445: | ||
===Goto_XY=== | ===Goto_XY=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Goto_XY''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
| Line 469: | Line 469: | ||
===Initialise=== | ===Initialise=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Initialise''' | ||
|- | |- | ||
| colspan="2" | The Init macro must be called once to initialise the Graphical LCD display before any other Graphical LCD component macros are called. | | colspan="2" | The Init macro must be called once to initialise the Graphical LCD display before any other Graphical LCD component macros are called. | ||
| Line 483: | Line 483: | ||
===Plot=== | ===Plot=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Plot''' | ||
|- | |- | ||
| colspan="2" | Sets a pixel with the current foreground colour at pixel location X, Y. | | colspan="2" | Sets a pixel with the current foreground colour at pixel location X, Y. | ||
| Line 507: | Line 507: | ||
===Print=== | ===Print=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Print''' | ||
|- | |- | ||
| colspan="2" | This macro prints a string of characters to the Graphical LCD. | | colspan="2" | This macro prints a string of characters to the Graphical LCD. | ||
| Line 546: | Line 546: | ||
===PrintNumber=== | ===PrintNumber=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''PrintNumber''' | ||
|- | |- | ||
| colspan="2" | This macro prints a decimal number to the Graphical LCD. | | colspan="2" | This macro prints a decimal number to the Graphical LCD. | ||
| Line 585: | Line 585: | ||
===ReadFontStat=== | ===ReadFontStat=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadFontStat''' | ||
|- | |- | ||
| colspan="2" | Gets a stat from the selected embedded ASCII font data. | | colspan="2" | Gets a stat from the selected embedded ASCII font data. | ||
| Line 609: | Line 609: | ||
===ReadFontWidth=== | ===ReadFontWidth=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadFontWidth''' | ||
|- | |- | ||
| colspan="2" | Reads the number of pixel columns used in the selected font | | colspan="2" | Reads the number of pixel columns used in the selected font | ||
| Line 633: | Line 633: | ||
===SetBackgroundColour=== | ===SetBackgroundColour=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetBackgroundColour''' | ||
|- | |- | ||
| colspan="2" | Specifies the colour of the foreground | | colspan="2" | Specifies the colour of the foreground | ||
| Line 652: | Line 652: | ||
===SetDisplayOrientation=== | ===SetDisplayOrientation=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetDisplayOrientation''' | ||
|- | |- | ||
| colspan="2" | Controls the way data is printed out on the display allowing multiple different viewing orientations. Default is 0. | | colspan="2" | Controls the way data is printed out on the display allowing multiple different viewing orientations. Default is 0. | ||
| Line 671: | Line 671: | ||
===SetFontScaler=== | ===SetFontScaler=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetFontScaler''' | ||
|- | |- | ||
| colspan="2" | Allows the fonts to be scaled up by multiplying the number of pixels on the X and Y. | | colspan="2" | Allows the fonts to be scaled up by multiplying the number of pixels on the X and Y. | ||
| Line 695: | Line 695: | ||
===SetForegroundColour=== | ===SetForegroundColour=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetForegroundColour''' | ||
|- | |- | ||
| colspan="2" | Specifies the colour of the foreground. | | colspan="2" | Specifies the colour of the foreground. | ||
| Line 714: | Line 714: | ||
===Write_Command=== | ===Write_Command=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Write_Command''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
| Line 733: | Line 733: | ||
===Write_Data=== | ===Write_Data=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Write_Data''' | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
| Line 753: | Line 753: | ||
==Property reference== | ==Property reference== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Dimensions | ||
|- | |- | ||
|- | |- | ||
| Line 773: | Line 773: | ||
| colspan="2" | Heigt of gLCD canvas measured in pixels. | | colspan="2" | Heigt of gLCD canvas measured in pixels. | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Colour | ||
|- | |- | ||
|- | |- | ||
| Line 792: | Line 792: | ||
| colspan="2" | Specifies the initial background color. | | colspan="2" | Specifies the initial background color. | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Bit Depth | ||
|- | |- | ||
|- | |- | ||
| Line 816: | Line 816: | ||
| colspan="2" | Number of bits of Blue colour depth on the display | | colspan="2" | Number of bits of Blue colour depth on the display | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Connections | ||
|- | |- | ||
|- | |- | ||
| Line 845: | Line 845: | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Fonts | ||
|- | |- | ||
|- | |- | ||
| Line 854: | Line 854: | ||
| colspan="2" | Specifies the number of fonts available to use on the display. | | colspan="2" | Specifies the number of fonts available to use on the display. | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Font 0 | ||
|- | |- | ||
|- | |- | ||
| Line 873: | Line 873: | ||
| colspan="2" | Sets the number of horizontal pixels used to represent a space character. | | colspan="2" | Sets the number of horizontal pixels used to represent a space character. | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Simulation Mode | ||
|- | |- | ||
|- | |- | ||
Latest revision as of 14:36, 13 July 2026
| Author | Matrix Ltd |
| Version | 1.5 |
| Category | Graphical Monochrome |
GLCD Free (ST7567) SPI component
Graphical display component designed to work with the ST7567 type monochrome displays. Transfers data using a 4-wire SPI interface, cannot read back so pixel based routines won't work Not for public release.
Version information
Library Version, Component Version, Date, Author, Info 11, 1.0, 22-07-24, BR, Added DrawArc and DrawRoundedRectangle functions
Detailed description
No detailed description exists yet for this component
Examples
The MQTT component requires connection to a Network Comms component via the "Network Component" property, to provide the bridge for simulated TCP/IP communication.
The Network Comms component can then be linked to an embedded TCP/IP component to provide embedded TCP/IP support.
Here is a typical setup for using MQTT on a Raspberry Pi.
Local Weather
A simple example demonstrating how to use MQTT with Flowcode SCADA to get the local weather conditions.
The example shows temperatures from Halifax in the UK and from Sydney in Australia.
Publish
Raspberry Pi
Here we have an embedded Raspberry Pi project connected to an I2C Sensor, the sensor is sampled and the data is published to a MQTT server.
ESP8266 Module
Here we have an embedded project using an ESP8266 wifi module, an analogue input is sampled and the data is published to a MQTT server.
Subscribe
ESP8266 Module
Here we subscribe to a topic and receive it back into Flowcode embedded using an ESP8266 module.
Flowcode App Developer
Here we subscribe to a topic and receive it back into Flowcode App Developer.
Making your own Raspberry Pi based MQTT Broker
Click here for instructions on creating your own Raspberry Pi MQTT Broker.
Macro reference
BPlot
| BPlot | |
| Sets a pixel with the current background colour at pixel location X, Y. | |
| X | |
| Y | |
| Return | |
ClearDisplay
| ClearDisplay | |
| This macro clears the display of any previous output by overwriting the entire display with the background colour. | |
| Return | |
DrawArc
DrawCircle
DrawEllipse
DrawLine
| DrawLine | |
| Draws a line with the current foreground colour from pixel location X1, Y1 to pixel location X2, Y2. | |
| X1 | |
| Y1 | |
| X2 | |
| Y2 | |
| Return | |
DrawRectangle
DrawRoundedRectangle
Goto_XY
| Goto_XY | |
| X | |
| Y | |
| Return | |
Initialise
| Initialise | |
| The Init macro must be called once to initialise the Graphical LCD display before any other Graphical LCD component macros are called. | |
| Return | |
Plot
| Plot | |
| Sets a pixel with the current foreground colour at pixel location X, Y. | |
| X | |
| Y | |
| Return | |
PrintNumber
ReadFontStat
| ReadFontStat | |
| Gets a stat from the selected embedded ASCII font data. | |
| Font | |
| Font selection range: 0 to (NumFonts - 1) | |
| Index | |
| 0=SpaceWidth, 1=PixelHeight | |
| Return | |
ReadFontWidth
SetBackgroundColour
| SetBackgroundColour | |
| Specifies the colour of the foreground | |
| PixelColour | |
| 0=White, 1=Black | |
| Return | |
SetDisplayOrientation
SetFontScaler
SetForegroundColour
| SetForegroundColour | |
| Specifies the colour of the foreground. | |
| PixelColour | |
| 0=White, 1=Black | |
| Return | |
Write_Command
| Write_Command | |
| Command | |
| Return | |
Write_Data
| Write_Data | |
| data | |
| Return | |
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_glcd_ST7567_SPI_Free_FormulaAllCode.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_glcd_ST7567_SPI_Free_FormulaAllCode.fcfx
