Home
What's New?
GLCD Font Creator
Overview
Features
Screenshots
Tutorials (video)
FAQ
Downloads
X-GLCD Project
Overview
Infos. & Details
Support Forum
Contact Us
Useful links

 

 

 

X-GLCD Project Informations



MikroElektronika Sponsored Product

Downloads links are at the bottom of this page.

History: 09/11/2009- version 1.0.0
- XGLCD Lib completely reworked. Now it's compatible with
ALL MikroElektronika compilers and for all microcontrollers (PIC, AVR, 8051)
*Please note that you have to use GLCD Font Creator 1.1.0 with this version.
 
11/08/2007- version 0.0.3
- mikroC XSPI_XGLCD lib source codes added*.
*Please note that you have to use GLCD Font Creator 1.0.1 with this version.
 
04/08/2007- version 0.0.2
- mikroC XGLCD lib source codes added*.
*Please note that you have to use GLCD Font Creator 1.0.1 with this version.
 
24/07/2007 - version 0.0.1
- First public release :
XGLCD lib and XSPI-GLCD lib. Source codes for mikroBasic and mikroPascal.
 
  Please read the informations below carefully, as the help file may be not up to date with regards to the content of the provided source codes. These libraries are changing quickly, so please understand that I can not change the help file as quickly as the developments are going on these libraries especially if other users contribute to enhance it on the forum.
Details:

This is the first public release, in alpha stage !!!
Please feel free to test it and report problems and suggestions on our public forum.

This version contains two libs: XGLCD lib and XSPI-GLCD Lib. These libraries act as their counter-parts form MikroElektronika GLCD Lib and SPI-GLCD lib.

Each of these libraries exposes a set of functions/subs that acts the same. XSPI-Lib functions have the same parameters and functionnalities as those of XGLCD Lib, the name ot its functions/subs is prefixed by SPI. So in the following text:
- I will describe only XGLCD lib functions.
- Most of the parameters of the functions/subs are absolutely the same as GLCD/SPI-GLCD lib equivalent functions/procedures. See mikroBasic help (GLCD/SPI-GLCD section) for details of parameters and functions.

The exposed functions/subs:

sub procedure xGlcd_Set_Font(dim const ptrFontTbl as ^byte, dim font_width, font_height as byte, dim font_offset as word)
Sets the font to be used by the X-GLCD lib.
Note: This sub also sets transparency to false.

sub procedure xGLCD_Set_Transparency(dim active as boolean)
Sets the transparency ON (active=True) or OFF (active=False). When the transparency is ON, drawing the chars does not erase their background.
When it's OFF, every pixel behind the drawn char will be erased.
Note: Each call to sub xGlcd_Set_Font(...) sets transparency to FALSE.

sub function xGlcd_Write_Char(dim ch, x, y, color as byte) as byte
Writes the char "ch" at a position x, Y.
The color parameter can be xColorClear(=0), xColorSet(=1) or xColorInvert(=2).
The char is drawn with an opaque background, i.e it erases all pixels under it. If the user turns ON the transparency with xGLCD_Set_Transparency(...), the char is drawn in transparent mode, i.e all pixels under it are kept as is.
Returns the width of the drawn char. This is useful for functions like xGlcd_Write_Text to compute the position of the next char to draw.
Note: X and Y position see notes below.

sub procedure xGlcd_Write_Text(dim byref text as char[50], dim x, y, color as byte)
Draw the string "text" at position X, Y.
The color parameter can be xColorClear(=0), xColorSet(=1) or xColorInvert(=2).
The text is drawn with an opaque background, i.e it erases all pixels under it. If the user turns ON the transparency with xGLCD_Set_Transparency(...), the text is drawn in transparent mode, i.e all pixels under it are kept as is.
Note: X and Y position see notes below.

sub function xGlcd_Char_Width(dim ch as byte) as byte
Returns the width of a char.
It's useful because xGLCD draws proportional width fonts, so all chars have NOT the same width.

sub function xGlcd_Text_Width(dim byref text as string[50]) as byte
Return the width of a whole string of chars.
It's useful because xGLCD draws proportional width fonts, so all chars have NOT the same width.
This function can be useful to be able to compute the position of text in order to center it or right align it for example.

IMPORTANT NOTES :
1. The Coordinate system is not the same as GLCD lib from MikroElektronika!
2. Fonts used by GLCD Lib are not compatible with XGLCD lib !
X-GLCD lib aims at hiding the physical structure or hardware GLCD. So the big difference between X-GLCD and GLCD is the fact that for coordinates (X, Y) passed as parameters to each procedure (xGLCD_Write_Char(…) and xGLCD_Write_Text(…)) are the logical coordinate you want to use on the screen. That means that the X coordinate is between 0..127 and the Y coordinate is between 0 to 63.
If you want to write a char at position X=69 and Y=72 you have only to call xGLCD_Write_Char(myChar, 69, 72, xColorSet).
With X-GLCD Lib You do not have to worry about pages or sides. All is done automatically for you.

MikroElektronika Sponsored Product Downloads
X-GLCD and SPI-XGLCD Source Codes and Examples v1.0.0 (242 KB)
*Please note that you have to use GLCD Font Creator 1.1.0 with this version.
 

X-GLCD and SPI-XGLCD Source Codes and Examples v0.0.3 (34,4 KB)
*Please note that you have to use GLCD Font Creator 1.0.1 with this version.