_______________________________________________
Those that used this lib under mP 7 already know it's properties. It's been updated and slightly extended for the incoming mP PRO 3.00 release.
For those that never heard of this library, a short description follows.
It's a rather extensive library, called xGLCD, for PIC18 processors and KS107 based GLCDs (128x64 pixels) containing both textual and graphical routines allowing to draw on both the physical screen and a virtual one, placed in RAM.
Basic properties:
- both text and graphics may be drawn anywhere on the screen,
- 'packed' bitmap format implemented saving ROM space,
- clipping rectangle for most graphical functions,
- routines for copying whole, or part of the screen from GLCD to RAM and back,
- routines for icon drawing (from RAM or ROM), inverting, and horizontal shifting,
- both ME's fonts and variable-width fonts of any size (created, for example with Octal's GLCD Font Creator, http://www.pocketmt.com/) may be used,
- increased speed performance over standard lib, especially visible for higher clock frequencies.
For those that don't want to read further, here's a link to the lib: http://www.cobir.com/xGLCD_PRO.rar
The library consists of two parts - the main, precompiled lib file, xGLCDlib.mcl, and a header file, xGLCDheader.mpas. The latter is more than just a header. It also contains all the low level functions for communication with the GLCD. It's possible, therefore, to modify it, for example to work with GLCD connected by a serial interface, like SPI.
The header file also contains definitions of text, draw and plot styles and properties (xGLCD_Transparency, xGLCD_Var_Width, xGLCD_Add_Column, xGLCD_Aspect_ratio, and xGLCD_Clipped). The latter may be set and read with appropriate routines.
The header file should be placed together with user application (the main lib may be placed in mP Uses\P18 directory and, optionally, included in used processor definition file) and compiled after any change to it - like after redefining the data and control ports and lines. These are defined easily in the following part of header file:
Code: Select all
// --> Adjust data and control ports here to fit the hardware:
atDataP = atPORTD; // data port assignment
atCtrlP = atPORTB; // control lines port assignment
GD_CS1 = 2; // GLCD control lines (CtrlP)
GD_CS2 = 3;
GD_rs = 4;
GD_rw = 5;
GD_en = 6;
GD_rst = 7;
Code: Select all
{$Define no_reset} // no reset (GD_rst) line
{$Define RAMdraw} // allows drawing on RAM screen
{$Define LTE4MHz} // oscillator freq <= 4MHz
The Bitmap2Array PC program, included in the package, may be used to convert bitmaps to screens and icons in compressed format (for details, see http://www.mikroe.com/forum/viewtopic.php?t=13979).
An example program, xGlcdDemo, is provided to demonstrate the use of library routines. It was tested with PIC18F4620 processor. There's also library description in pdf format.
Have fun .