SHARPメモリ液晶+つぼフォント(GT20L16J1Y) の表示サンプル。 半角カナ(JIS X 0201)と、2バイトUTF-8コード(顔文字に使用)に対応。

Dependencies:   GT20L16J1Y_font TFT_fonts mbed sharp_mlcd

Fork of hello_GT20L16J1Y_FONT by Toyomasa Watarai

Files at this revision

API Documentation at this revision

Comitter:
MACRUM
Date:
Tue Jan 14 07:40:10 2014 +0000
Child:
1:64e5c3bcdf37
Commit message:
Initial release

Changed in this revision

C12832_lcd.lib Show annotated file Show diff for this revision Revisions of this file
GT20L16J1Y_font.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/C12832_lcd.lib	Tue Jan 14 07:40:10 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/dreschpe/code/C12832_lcd/#42eba69dfc8e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/GT20L16J1Y_font.lib	Tue Jan 14 07:40:10 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/MACRUM/code/GT20L16J1Y_font/#61b32e34bcbf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Jan 14 07:40:10 2014 +0000
@@ -0,0 +1,50 @@
+#include "mbed.h"
+#include "C12832_lcd.h"
+#include "GT20L16J1Y_font.h"
+
+/* 
+    GT20L16J1Y library test program
+    works with mbed application board
+*/
+
+C12832_LCD lcd;
+GT20L16J1Y_FONT font(p11, p12, p13, p10);
+
+void draw_kanji(int offset_x, int offset_y)
+{
+    int color;
+    for(int x=0; x<32; x++)
+    {
+        for(int y=0; y<8; y++)
+        {
+            if (font.bitmap[x] & (1<<y))
+                color = 1;
+            else
+                color = 0;
+            lcd.pixel(x%16 + offset_x, y+(8*(x>>4)) + offset_y, color);
+        }
+    }
+    lcd.copy_to_lcd();
+}
+
+int main()
+{
+    unsigned short kbuf[16] = {
+        0x9069,
+        0x92BB,
+        0x82C7,
+        0x82A4,
+        0x82C5,
+        0x82B7,
+        0x82A9,
+        0x8148
+    };
+        
+    lcd.cls();
+
+    for(int i=0; i<8; i++) {
+        font.read(kbuf[i]); 
+        draw_kanji(16*i, 0);
+    }
+    
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Jan 14 07:40:10 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/824293ae5e43
\ No newline at end of file