UniGraphic-Fork for ST7920-LCD-controller and SH1106. Tested with 128x64 LCD with SPI and 128x64-OLED with IIC

Dependents:   UniGraphic-St7920-Test AfficheurUTILECO

Fork of UniGraphic by GraphicsDisplay

Fork of the UniGraphic-Library for monochrome LCDs with ST7920 controller and 128x64-IIC-OLED-Display with SH1106-Controller

/media/uploads/charly/20170522_210344.jpg

/media/uploads/charly/20180425_230623.jpg

Had to adapt LCD for following reasons:

  • Give access to screenbuffer buffer[] to parent class
  • pixel() and pixel_read() as they are hardware-dependent
  • added reset-pin to IIC-Interface

GraphicDisplay:: sends buffer to LCD when auto_update is set to true.

Testprogram for ST7920 can be found here:

https://developer.mbed.org/users/charly/code/UniGraphic-St7920-Test/

Files at this revision

API Documentation at this revision

Comitter:
Geremia
Date:
Sat Feb 14 17:42:21 2015 +0000
Parent:
2:713844a55c4e
Child:
4:12ba0ecc2c1f
Commit message:
small things

Changed in this revision

Display/LCD.cpp Show annotated file Show diff for this revision Revisions of this file
Display/TFT.cpp Show annotated file Show diff for this revision Revisions of this file
Font/Arial12x12.h Show annotated file Show diff for this revision Revisions of this file
Font/Arial24x23.h Show annotated file Show diff for this revision Revisions of this file
Font/Arial28x28.h Show annotated file Show diff for this revision Revisions of this file
Font/Arial43x48_numb.h Show annotated file Show diff for this revision Revisions of this file
Font/Terminal6x8.h Show annotated file Show diff for this revision Revisions of this file
Graphics/GraphicsDisplay.cpp Show annotated file Show diff for this revision Revisions of this file
Graphics/GraphicsDisplay.h Show annotated file Show diff for this revision Revisions of this file
Inits/IST3020.cpp Show annotated file Show diff for this revision Revisions of this file
Inits/UC1608.cpp Show annotated file Show diff for this revision Revisions of this file
Protocols/Protocols.h Show annotated file Show diff for this revision Revisions of this file
--- a/Display/LCD.cpp	Fri Feb 13 23:17:55 2015 +0000
+++ b/Display/LCD.cpp	Sat Feb 14 17:42:21 2015 +0000
@@ -1,3 +1,17 @@
+/* mbed library for the mbed Lab Board  128*32 pixel LCD
+ * use C12832 controller
+ * Copyright (c) 2012 Peter Drescher - DC2PD
+ * Released under the MIT License: http://mbed.org/license/mit
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
 #include "LCD.h"
 
 //#include "mbed_debug.h"
--- a/Display/TFT.cpp	Fri Feb 13 23:17:55 2015 +0000
+++ b/Display/TFT.cpp	Sat Feb 14 17:42:21 2015 +0000
@@ -1,3 +1,15 @@
+/* mbed library for 240*320 pixel display TFT based on ILI9341 LCD Controller
+ * Copyright (c) 2013 Peter Drescher - DC2PD
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
 #include "TFT.h"
 
 //#include "mbed_debug.h"
@@ -87,25 +99,25 @@
     switch (orientation) {
         case 0:// default, portrait view 0°
             if(mipistd) wr_data8(0x0A); // this is in real a vertical flip enabled, seems most displays are vertical flipped
-            else wr_data8(0x48); //48 for 9341
+            else wr_data8(0x48); //for some other ILIxxxx
             set_width(LCDSIZE_X);
             set_height(LCDSIZE_Y);
             break;
         case 1:// landscape view +90°
             if(mipistd) wr_data8(0x28); 
-            else wr_data8(0x29);//28 for 9341
+            else wr_data8(0x29);//for some other ILIxxxx
             set_width(LCDSIZE_Y);
             set_height(LCDSIZE_X);
             break;
         case 2:// portrait view +180°
             if(mipistd) wr_data8(0x09); 
-            else wr_data8(0x99);//88 for 9341
+            else wr_data8(0x99);//for some other ILIxxxx
             set_width(LCDSIZE_X);
             set_height(LCDSIZE_Y);
             break;
         case 3:// landscape view -90°
             if(mipistd) wr_data8(0x2B); 
-            else wr_data8(0xF8);//E8 for 9341
+            else wr_data8(0xF8);//for some other ILIxxxx
             set_width(LCDSIZE_Y);
             set_height(LCDSIZE_X);
             break;
@@ -116,6 +128,7 @@
 {
     //ili9486 does not like truncated 2A/2B cmds, at least in par mode
     //setting only start column/page would speedup, but needs a windowmax() before, maybe implement later
+    //fixme for PAR_16: // cmd 2A/2B expects 8bit parameters
     wr_cmd8(0x2A);
     wr_data16(x);   //start column
     wr_data16(x+w-1);//end column
--- a/Font/Arial12x12.h	Fri Feb 13 23:17:55 2015 +0000
+++ b/Font/Arial12x12.h	Sat Feb 14 17:42:21 2015 +0000
@@ -7,7 +7,7 @@
  */ 
 __align(2) 
 const unsigned char Arial12x12[] = {
-        25,12,12,2,                                                                           // Length,horz,vert,byte/vert
+        0xFF/*unused*/,12,12,0xFF/*unused*/,                                                                           // Length,horz,vert,byte/vert
         0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char  
         0x02, 0x00, 0x00, 0x7F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char !
         0x03, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char "
--- a/Font/Arial24x23.h	Fri Feb 13 23:17:55 2015 +0000
+++ b/Font/Arial24x23.h	Sat Feb 14 17:42:21 2015 +0000
@@ -9,7 +9,7 @@
 */
 __align(2)
 const unsigned char Arial24x23[] = {
-        73,24,23,3,
+        0xFF/*unused*/,24,23,0xFF/*unused*/,
         0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char  
         0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x03, 0x00, 0x30, 0x01, 0x00, 0x0F, 0x00, 0xE0, 0x03, 0x00, 0x7C, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char !
         0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x40, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char "
--- a/Font/Arial28x28.h	Fri Feb 13 23:17:55 2015 +0000
+++ b/Font/Arial28x28.h	Sat Feb 14 17:42:21 2015 +0000
@@ -9,7 +9,7 @@
 */
 __align(2)
 const unsigned char Arial28x28[] = {
-113,28,28,4,
+0xFF/*unused*/,28,28,0xFF/*unused*/,
 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
--- a/Font/Arial43x48_numb.h	Fri Feb 13 23:17:55 2015 +0000
+++ b/Font/Arial43x48_numb.h	Sat Feb 14 17:42:21 2015 +0000
@@ -8,7 +8,7 @@
 // big font but only numbers (ascii 46-58)
 __align(2)
 const unsigned char Arial43x48_numb[] = {
-        0, 43, 48, 6,
+        0xFF/*unused*/, 43, 48, 0xFF/*unused*/,
         0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char .
         0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x03, 0x00, 0xC0, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x03, 0x00, 0xC0, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char /
         0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x7F, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0x7F, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFE, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0xFE, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char 0
--- a/Font/Terminal6x8.h	Fri Feb 13 23:17:55 2015 +0000
+++ b/Font/Terminal6x8.h	Sat Feb 14 17:42:21 2015 +0000
@@ -6,7 +6,7 @@
 //GLCD FontSize : 6 x 8
 __align(2)
 const unsigned char Terminal6x8[] = {
-		7,6,8,1,
+		0xFF/*unused*/,6,8,0xFF/*unused*/,
         0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  // Code for char  
         0x05, 0x00, 0x00, 0x06, 0x5F, 0x06, 0x00,  // Code for char !
         0x06, 0x00, 0x07, 0x03, 0x00, 0x07, 0x03,  // Code for char "
--- a/Graphics/GraphicsDisplay.cpp	Fri Feb 13 23:17:55 2015 +0000
+++ b/Graphics/GraphicsDisplay.cpp	Sat Feb 14 17:42:21 2015 +0000
@@ -1,4 +1,17 @@
-/* mbed GraphicsDisplay Display Library Base Class
+ 
+ /* mbed library for 240*320 pixel display TFT based on ILI9341 LCD Controller
+ * Copyright (c) 2013 Peter Drescher - DC2PD
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+ 
+ /* mbed GraphicsDisplay Display Library Base Class
  * Copyright (c) 2007-2009 sford
  * Released under the MIT License: http://mbed.org/license/mit
  */
@@ -212,7 +225,7 @@
 {
     return oriented_height / fontvert;
 }
-void GraphicsDisplay::set_font(unsigned char* f, unsigned char firstascii, unsigned char lastascii)
+void GraphicsDisplay::set_font(unsigned char* f, unsigned char firstascii, unsigned char lastascii, bool proportional)
 {
     font = f;
     // read font parameter from start of array
@@ -224,6 +237,7 @@
     fontoffset = (fonthor*fontbpl)+1;
     firstch = firstascii;   // first ascii code present in font array (usually 32)
     lastch = lastascii;     // last ascii code present in font array (usually 127)
+    fontprop=proportional;
 }
 int GraphicsDisplay::_putc(int value)
 {
@@ -279,7 +293,8 @@
             }
         }
     }
-    char_x += w;
+    if(fontprop) char_x += w;
+    else char_x += fonthor;
 }
 void GraphicsDisplay::Bitmap_BW(Bitmap_s bm, int x, int y)
 {
--- a/Graphics/GraphicsDisplay.h	Fri Feb 13 23:17:55 2015 +0000
+++ b/Graphics/GraphicsDisplay.h	Sat Feb 14 17:42:21 2015 +0000
@@ -269,6 +269,7 @@
    * @param f pointer to font array 
    * @param firstascii first ascii code present in font array, default 32 (space)
    * @param lastascii last ascii code present in font array, default 127 (DEL)
+   * @param proportional enable/disable variable font width (default enabled)
    *                                                                              
    *   font array can created with GLCD Font Creator from http://www.mikroe.com
    *   you have to add 4 parameter at the beginning of the font array to use: 
@@ -279,7 +280,7 @@
    *   you also have to change the array to cont unsigned char[] and __align(2)
    *
    */  
-  void set_font(unsigned char* f, unsigned char firstascii=32, unsigned char lastascii=127);
+  void set_font(unsigned char* f, unsigned char firstascii=32, unsigned char lastascii=127, bool proportional = true);
 
     /** Get the number of columns based on the currently active font.
     * @returns number of columns.
@@ -346,7 +347,8 @@
     int fontbpl;   // bytes per line (char)
     unsigned char firstch;  // first ascii code present in font array (usually 32)
     unsigned char lastch;   // last ascii code present in font array (usually 127)
-    bool auto_up;  // autoupdate flag for LCD   
+    bool auto_up;  // autoupdate flag for LCD
+    bool fontprop;
     
 
 };
--- a/Inits/IST3020.cpp	Fri Feb 13 23:17:55 2015 +0000
+++ b/Inits/IST3020.cpp	Sat Feb 14 17:42:21 2015 +0000
@@ -1,6 +1,8 @@
 #include "Protocols.h"
 #include "IST3020.h"
 
+/*this is a quite standard config, should be compatible with ST7565, except bigger screen and diff resistor ratio value*/
+
 //////////////////////////////////////////////////////////////////////////////////
 // display settings ///////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////
@@ -32,6 +34,7 @@
     locate(0,0);
 }
 // reset and init the lcd controller
+// init sequence is manufacturer specific
 void IST3020::init()
 {
     /* Start Initial Sequence ----------------------------------------------------*/
@@ -56,7 +59,7 @@
     wr_cmd8(0x2F);   //  Internal Voltage Follower ON
     wait_ms(10);
     wr_cmd8(0x20);   //  Regulor_Resistor_Select resistor ratio 20-27 20=4.5(default) 27=8.0, 0.5 steps
-    set_contrast(48);
+    set_contrast(46);
     //wr_cmd8(0x81);   //  set contrast (reference voltage register set)
     //wr_cmd8(0x20);   //  contrast 00-3F default 20
     
--- a/Inits/UC1608.cpp	Fri Feb 13 23:17:55 2015 +0000
+++ b/Inits/UC1608.cpp	Sat Feb 14 17:42:21 2015 +0000
@@ -52,8 +52,8 @@
     wait_ms(10);
     
    // wr_cmd8(0x81);//Set Gain and Potentiometer
-  //  wr_cmd8(0x40|46);//Set Gain and Potentiometer  xx xxxxxx
-    set_contrast(46);
+  //  wr_cmd8(0x40|26);//Set Gain and Potentiometer  xx xxxxxx
+    set_contrast(26);
     
     wr_cmd8(0x88);   //disable colum/page address wraparound
     wr_cmd8(0xA4);   //  LCD display ram (EntireDisplayOn disable)
--- a/Protocols/Protocols.h	Fri Feb 13 23:17:55 2015 +0000
+++ b/Protocols/Protocols.h	Sat Feb 14 17:42:21 2015 +0000
@@ -5,6 +5,8 @@
 
 #include "mbed.h"
 
+//#define USE_CS
+
 /** Protocol types
 */
 enum proto_t {