Difference between revisions of "Component: Colour GLCD (BL0157) (E-blocks 2)"
(3 intermediate revisions by 2 users not shown) | |||
Line 17: | Line 17: | ||
==Component Source Code== | ==Component Source Code== | ||
− | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/ | + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_EBlocks2_Colour_GLCD_BL0157.fcfx FC_Comp_Source_EBlocks2_Colour_GLCD_BL0157.fcfx] |
− | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/ | + | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_EBlocks2_Colour_GLCD_BL0157.fcfx FC_Comp_Source_EBlocks2_Colour_GLCD_BL0157.fcfx] |
==Detailed description== | ==Detailed description== | ||
Line 51: | Line 51: | ||
A simple example that shows how to use some common functions. | A simple example that shows how to use some common functions. | ||
+ | |||
+ | Now can take advantage of SPI faster speed, instead of bit banging | ||
{{Fcfile|BL0157_Example.fcfx|BL0157 Example}} | {{Fcfile|BL0157_Example.fcfx|BL0157 Example}} | ||
Line 56: | Line 58: | ||
+ | ===BL0157 Maze Builder=== | ||
+ | {{Fcfile|Maze_Builder_gLCD.fcfx|Maze Builder gLCD}} | ||
+ | Example to draw a randomly generated 2D maze on an BL0157 graphical display. | ||
+ | [[File:MazeBuildGLCD.jpg]] | ||
+ | |||
+ | |||
+ | ===BL0157 Drawing 3D Objects With Perspective=== | ||
+ | |||
+ | {{Fcfile|3D_Manipulations.fcfx|3D Manipulations}} | ||
+ | |||
+ | Example should show the following on the display on the panel and on the hardware. The two switches allow you to move closer to or away from the object. The perspective provides more and more distortion to the object the closer you get. | ||
+ | |||
+ | [[File:3DClose.jpg]] | ||
+ | |||
+ | [[File:3DFar.jpg]] | ||
==Macro reference== | ==Macro reference== | ||
Line 600: | Line 617: | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
− | |||
− | |||
Latest revision as of 09:14, 20 September 2024
Author | Matrix Ltd |
Version | 1.6 |
Category | E-blocks 2 |
Contents
- 1 Colour GLCD (BL0157) component
- 2 Component Source Code
- 3 Detailed description
- 4 Examples
- 5 Macro reference
- 5.1 BPlot
- 5.2 BacklightOff
- 5.3 BacklightOn
- 5.4 ClearDisplay
- 5.5 DrawCircle
- 5.6 DrawEllipse
- 5.7 DrawLine
- 5.8 DrawRectangle
- 5.9 FastPlot
- 5.10 Initialise
- 5.11 Plot
- 5.12 Print
- 5.13 PrintNumber
- 5.14 ReadFontStat
- 5.15 ReadFontWidth
- 5.16 SetBackgroundColour
- 5.17 SetDisplayOrientation
- 5.18 SetFontScaler
- 5.19 SetForegroundColour
- 5.20 Window
- 6 Property reference
Colour GLCD (BL0157) component
Graphical display component designed to work with the BL0157 E-block. Based on the ILI9163C 16-bit colour graphical controller IC.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_EBlocks2_Colour_GLCD_BL0157.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_EBlocks2_Colour_GLCD_BL0157.fcfx
Detailed description
No detailed description exists yet for this component
Examples
A simple example that shows how to use some common functions.
Now can take advantage of SPI faster speed, instead of bit banging
BL0157 Maze Builder
Example to draw a randomly generated 2D maze on an BL0157 graphical display.
BL0157 Drawing 3D Objects With Perspective
Example should show the following on the display on the panel and on the hardware. The two switches allow you to move closer to or away from the object. The perspective provides more and more distortion to the object the closer you get.
Macro reference
BPlot
![]() |
BPlot |
Sets a pixel with the current background colour at pixel location X, Y. | |
![]() |
X1 |
![]() |
Y1 |
![]() |
Return |
BacklightOff
![]() |
BacklightOff |
Clears the backlight enable pin allowing the display backlight to switch off. Switching the backlight on and off at high speed allow the light to be dimmed. | |
![]() |
Return |
BacklightOn
![]() |
BacklightOn |
Sets the backlight enable pin allowing the display backlight to switch on. Switching the backlight on and off at high speed allow the light to be dimmed. | |
![]() |
Return |
ClearDisplay
![]() |
ClearDisplay |
This macro clears the display of any previous output by overwriting the entire display with the background colour. | |
![]() |
Return |
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
FastPlot
![]() |
FastPlot |
Sets a pixel with the current foreground colour at current pixel location. Not compatible with orientations other than 0. | |
![]() |
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. | |
![]() |
X1 |
![]() |
Y1 |
![]() |
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
SetDisplayOrientation
SetFontScaler
SetForegroundColour
Window
![]() |
Window |
Specifies a full screen or sub window of pixels to draw. Useful when used with the FastPlot function to draw bitmaps at high speed. | |
![]() |
X1 |
![]() |
Y1 |
![]() |
X2 |
![]() |
Y2 |
![]() |
Return |