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/

Revision:
20:14daa48ffd4c
Parent:
11:b842b8e332cb
Child:
25:daacdcf34e52
--- a/Protocols/PAR16.h	Mon Mar 02 10:52:26 2015 +0000
+++ b/Protocols/PAR16.h	Mon Mar 23 14:08:04 2015 +0000
@@ -96,6 +96,35 @@
     */ 
     virtual unsigned int rd_extcreg_data32(unsigned char reg, unsigned char SPIreadenablecmd);
     
+    /** ILI932x specific, does a dummy read cycle, number of bits is protocol dependent
+    * for PAR protocols: a signle RD bit toggle
+    * for SPI8: 8clocks
+    * for SPI16: 16 clocks
+    */   
+    virtual void dummyread ();
+    
+    /** ILI932x specific, select register for a successive write or read
+    *
+    * @param reg register to be selected
+    * @param forread false = a write next (default), true = a read next
+    * @note forread only used by SPI protocols
+    */   
+    virtual void reg_select(unsigned char reg, bool forread =false);
+    
+    /** ILI932x specific, write register with data
+    *
+    * @param reg register to write
+    * @param data 16bit data
+    */   
+    virtual void reg_write(unsigned char reg, unsigned short data);
+    
+    /** ILI932x specific, read register
+    *
+    * @param reg register to be read
+    * @returns 16bit register value
+    */ 
+    virtual unsigned short reg_read(unsigned char reg);
+    
     /** HW reset sequence (without display init commands)   
     */
     virtual void hw_reset();