E-Paper Device (EPD) based MiniNote module, powered by mbed on LPC1114FBD48. Shared in public domain with enclosure in 3D step format, hardware interface compatible with microBUS interface. Anyone can contribute on this project.

Dependencies:   mbed _24LCXXX

E-Badge MiniNote Project on mbed/NXP LPC1114 platform

Revision:
3:1fa000d4da94
Parent:
2:bb9f154ea2f4
--- a/SSD1606/ssd1606.h	Mon Jun 09 11:01:38 2014 +0000
+++ b/SSD1606/ssd1606.h	Wed Jun 11 09:12:36 2014 +0000
@@ -4,41 +4,43 @@
 #include "mbed.h"
 #define MODE1
 
-#define IRAM_8KB            0
-#define BPP_2bit            1
-
-#define INT_FB_3K           0
-#define INT_FB_1K           0
-#define EXT_FB_3K           1
-
 /*
     The width/height parameters depend on different vendor. The max is 180x128
     http://www.solomon-systech.com.cn/cn/product/advanced-display/bistable-display-driver-controller/
  */
-#define SSD1606_LCDWIDTH 172
-#define SSD1606_LCDHEIGHT 72
-#define SSD1606_GREYLEVEL   2
+#define SSD1606_WIDTH 172
+#define SSD1606_HEIGHT 72
+
+#define GREY_BPP            2   // [1:2], 1bpp or 2bpp
 
-#define FRAMEBUF_SIZE_1bpp      (SSD1606_LCDWIDTH * SSD1606_LCDHEIGHT / 8)
-#define FRAMEBUF_SIZE_2bpp      (SSD1606_LCDWIDTH * SSD1606_LCDHEIGHT * SSD1606_GREYLEVEL / 8)
+#define COLBUF_SIZE     (SSD1606_HEIGHT / 8 * GREY_BPP) // 72/8*2=18 Byte for 2bpp
+#define FRAMEBUF_SIZE   (SSD1606_WIDTH * COLBUF_SIZE)   // 172 * 18 = 3096B
+
+#define IRAM_8KB
 
-#define FRAMEBUF_SIZE       FRAMEBUF_SIZE_1bpp
+#define ROM2BPP_SIZE    3096
+#define ROM1BPP_SIZE    1548
 
+//ROM IMAGE INDEX
 #define PIC_ONE                 1
 #define PIC_NOKIA               2
 #define PIC_SUNING          3
-#define PIC_SHOUSI          4
-#define PIC_BAZHE           5
+#define PIC_SUSHI           4
+#define PIC_20OFF           5
 #define PIC_CHESSBOARD  6
-#define PIC_JIFEN               7
+#define PIC_ROYALTY         7
 #define PIC_FU                  8
 #define PIC_GC4                 9
 #define PIC_SAVE                10
-#define PIC_GL1                 20
-#define PIC_GL2                 21
-#define PIC_BLACK               22
-#define PIC_WHITE               23
+#define PIC_RUSSIAN         11
+#define PIC_COMPANY         12
+#define PIC_KOREAN          13
+#define PIC_OED                 14
+#define PIC_OEDBOOK         15
+#define PIC_JAPANESE        16
+#define PIC_RECT                17
 
+//FUNCTION IMAGE INDEX
 #define TEST_GREY1          1
 #define TEST_GREY2          2
 #define TEST_BLK                3
@@ -47,7 +49,7 @@
 #define TEST_STRIP1         6
 #define TEST_STRIP2         7
 
-#define SPI_BUS_DELAY       10
+#define SPI_BUS_DELAY       5
 
 class SSD1606
 {
@@ -90,6 +92,7 @@
 
     void _send_command(unsigned char code);
     void _send_data(unsigned char value);
+        void _send_data_1bpp(unsigned char value);
         void _vspi_write(unsigned char value);
         void _draw_pattern(unsigned char value, unsigned int pix);