Yoshihito Shimada / SG12864A

Dependents:   SG12864A_sample

Files at this revision

API Documentation at this revision

Comitter:
Yoshihito_Shimada
Date:
Fri Jun 06 23:46:41 2014 +0000
Commit message:
SG12864A test program

Changed in this revision

SG12864A.cpp Show annotated file Show diff for this revision Revisions of this file
SG12864A.h Show annotated file Show diff for this revision Revisions of this file
font.h Show annotated file Show diff for this revision Revisions of this file
imagedata.h Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SG12864A.cpp	Fri Jun 06 23:46:41 2014 +0000
@@ -0,0 +1,265 @@
+//
+//
+//
+
+#include "SG12864A.h"
+#include "font.h"
+
+ SG12864A::SG12864A() : DI_OUT(DI), RW_OUT(RW), E_OUT(E), DB_OUT(DB0,DB1,DB2,DB3,DB4,DB5,DB6,DB7),
+                      CS1_OUT(CS1),CS2_OUT(CS2),RST_OUT(RST)
+                      { DI_OUT = 0x01;RW_OUT = 0x01; E_OUT = 0x00;
+                        DB_OUT = 0x00; 
+                        DB_OUT.output();
+                        CS1_OUT= 0x01; CS2_OUT=0x01; RST_OUT=0x01; 
+                      }
+//Data output function
+void SG12864A::lcd_Write(char cs, char code, char DIflag){
+    int data;
+    DB_OUT.output();
+    RW_OUT = 0;
+    if(cs==1)
+        CS1_OUT=0;
+    else
+        CS2_OUT=0;
+    data = (int)code;
+    DB_OUT = data & 0x00FF;
+    if(DIflag == 0)
+        DI_OUT = 1;
+    else
+        DI_OUT = 0;
+    wait_us(1);
+    E_OUT = 1;
+    wait_us(1);
+    E_OUT = 0;
+    CS1_OUT = 1;
+    CS2_OUT = 1;
+    RW_OUT = 1;
+    wait_us(5);
+ }
+ 
+ // Data Read Function
+  char SG12864A::lcd_Read(char cs){
+    int data;
+    DB_OUT.input();
+    RW_OUT = 1;
+    if(cs==1)
+        CS1_OUT = 0;
+    else
+        CS2_OUT = 0;
+    DI_OUT = 1;
+    wait_us(1);
+    E_OUT = 1;
+    wait_us(1);
+    E_OUT = 0;
+    wait_us(3);
+    data = DB_OUT & 0x00FF;
+    wait_us(1);
+    CS1_OUT = 1;
+    CS2_OUT = 1;
+    DB_OUT.output();
+    return((char)data);
+ }
+ 
+  // Data Read Function
+  char SG12864A::lcd_StatusRead(char cs){
+    int data;
+    DB_OUT.input();
+    RW_OUT = 1;
+    if(cs==1)
+        CS1_OUT = 0;
+    else
+        CS2_OUT = 0;
+    DI_OUT = 0;
+    wait_us(1);
+    E_OUT = 1;
+    wait_us(1);
+    E_OUT = 0;
+    wait_us(3);
+    data = DB_OUT   & 0x00FF;
+    wait_us(1);
+    CS1_OUT = 1;
+    CS2_OUT = 1;
+    DB_OUT.output();
+    return((char)data);
+ }
+
+ // Screen Clear Function
+void SG12864A::lcd_Clear(char data){
+    char page, colum;
+    
+    for(page=0; page<8;page++){         //repeat 8 page
+        lcd_Write(1,0xB8+page,1);       //page set
+        lcd_Write(1,0x40,1);            //column reset
+        lcd_Write(2,0xB8+page,1);       //page set
+        lcd_Write(2,0x40,1);            //column reset
+        for(colum=0;colum<64;colum++){  //repeat 64column
+            lcd_Write(1,data,0);        //fill data
+            lcd_Write(2,data,0);        //fill data
+        }
+    }
+    
+    lcd_Write(1,0xC0,1);  //reset start line
+    lcd_Write(2,0xC0,1);
+}
+
+// Initialize Function
+void SG12864A::lcd_Init(void){
+    RST_OUT = 0;
+    wait_ms(1000);
+    RST_OUT = 1;
+    wait_ms(10);
+    lcd_Write(1, 0x3F, 1);  // Display On
+    lcd_Write(2, 0x3F, 1);  // Display On
+    lcd_Clear(0);
+}
+
+// Draw Pixel Function
+void SG12864A::lcd_Pixel(int Xpos, int Ypos, char On){
+    char cs, data, page, pos, count, i;
+
+    /* if colum >127 then do nothing  */
+    if(Xpos<128){
+        if(Xpos>63){                        // 64=<colum<=127?
+            Xpos = Xpos-64;          // shift 64 dot
+            cs = 1;
+        }
+        else
+            cs = 2;
+        page = (char)(7-Ypos/8);              // set page
+        lcd_Write(cs, 0xB8+page, 1);            
+        lcd_Write(cs, 0x40+Xpos, 1);          // set colum 
+        data = lcd_Read(cs);                  // get current data
+        lcd_Write(cs, 0x40+Xpos, 1);          // set colum
+        data = lcd_Read(cs);                  // get current data   
+        pos =1;                               // set bit position
+        count = (char)(7-Ypos%8);             // set bit
+        for(i=0; i<count; i++)                // caluculate 2^n
+            pos *= 2;
+        lcd_Write(cs, 0x40+Xpos, 1);          // back address
+        if(On==1)                             // set or reset bit
+            lcd_Write(cs, data | pos, 0);     // set 1
+        else
+            lcd_Write(cs, data & ~pos, 0);    // set 0
+    }
+}
+
+//Draw Straight line Function      
+#define abs(a)  (((a)>0) ? (a) : -(a))
+void SG12864A::lcd_Line(int x0, int y0, int x1, int y1){
+    int steep, t;
+    int deltax, deltay, error;
+    int x, y;
+    int ystep;
+
+    steep = (abs(y1 - y0) > abs(x1 - x0));
+
+    if(steep){
+        t = x0; x0 = y0; y0 = t;
+        t = x1; x1 = y1; y1 = t;
+    }
+    if(x0 > x1) {
+        t = x0; x0 = x1; x1 = t;
+        t = y0; y0 = y1; y1 = t;
+    }
+    deltax = x1 - x0;
+    deltay = abs(y1 - y0);
+    error = 0;
+    y = y0;
+
+    if(y0 < y1) ystep = 1; else ystep = -1;
+    for(x=x0; x<x1; x++) {
+        if(steep) lcd_Pixel(y,x,1); else lcd_Pixel(x,y,1);
+        error += deltay;
+        if((error << 1) >= deltax) {
+            y += ystep;
+            error -= deltax;
+        }
+    }
+}
+
+
+//Display Character Function
+void SG12864A::lcd_Char(char line, char colum, int letter){
+    char cs, i;
+    int pos;
+    
+    if(colum < 16){
+        if(colum >7){
+            pos = (colum-8)*8;
+            cs = 1;
+        }
+        else{
+            pos = colum*8;
+            cs = 2;
+        }
+        lcd_Write(cs, 0xB8+line,1);
+        lcd_Write(cs, 0x40+pos,1);
+        for(i=0; i<5; i++)
+            lcd_Write(cs,Font[letter-0x20][i],0);
+        lcd_Write(cs,0,0);
+        lcd_Write(cs,0,0);
+        lcd_Write(cs,0,0);
+     }
+}
+
+// Display Character Function2
+void SG12864A::lcd_Char1(char line, char colum, int letter){
+    char cs, i;
+    int pos;
+    
+    if(colum < 18){
+        if(colum > 8){
+            pos = (colum- 9) * 7;
+            cs = 1;
+        }
+        else{
+            pos = colum * 7;
+            cs = 2;
+        }
+        lcd_Write(cs, 0xB8+line, 1);        // set page
+        lcd_Write(cs, 0x40+pos, 1);         // set colum
+        for(i=0; i<5; i++)
+            lcd_Write(cs, Font[letter-0x20][i], 0);
+        lcd_Write(cs, 0, 0);
+        lcd_Write(cs, 0, 0);
+    }
+}
+
+// Display Char Srings Function
+void SG12864A::lcd_Str(char line, char colum, char *s){
+    while(*s)
+    SG12864A::lcd_Char1(line, colum++, *s++);
+}
+
+// Display Image Function
+void SG12864A::lcd_Image(char *ptr){
+    char cs, Xpos;
+    int page, colum;
+
+    for(page=0; page<8; page++){
+        for(colum=0; colum<128; colum++){
+            if(colum > 63){
+                Xpos=colum-64;
+                cs = 1;
+            }
+            else{
+                Xpos = colum;
+                cs = 2;
+            }
+            lcd_Write(cs, 0xB8+page, 1);
+            lcd_Write(cs, 0x40+Xpos, 1);
+            lcd_Write(cs, *ptr++, 0);
+        }
+    }
+}
+
+//Scroll Function
+void SG12864A::lcd_Scroll(int delay){
+    int i;
+    
+    for(i=0; i<64; i++){
+        lcd_Write(1, 0xC0+i,1);
+        lcd_Write(2, 0xC0+i,1);
+        wait_ms(delay);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SG12864A.h	Fri Jun 06 23:46:41 2014 +0000
@@ -0,0 +1,63 @@
+//
+// SG12864A Test Program
+// for TG-LPC11U35
+//
+
+#ifndef SG12864A_H
+#define SG12864A_H
+
+#include "mbed.h"
+
+#define DI  p5
+#define RW  p6
+#define E   p8
+#define DB0 p9
+#define DB1 p10
+#define DB2 p12
+#define DB3 p13
+#define DB4 p15
+#define DB5 p16
+#define DB6 p17
+#define DB7 p18
+#define CS1 p20
+#define CS2 p23
+#define RST p24
+
+#define ReflashRate 0.02
+
+
+class SG12864A {
+public:
+
+    SG12864A();
+    void lcd_Write(char cs, char code, char DIflag);
+    char lcd_Read(char cs);
+    char lcd_StatusRead(char cs);
+    void lcd_Init(void);
+    void lcd_Clear(char data);
+    void lcd_Pixel(int Xpos, int Ypos, char On);     
+    void lcd_Char(char line, char colum, int letter);
+    void lcd_Char1(char line, char colum, int letter);
+    void lcd_Str(char line, char colum, char *s);
+    void lcd_Line(int x0, int y0, int x1, int y1);
+    void lcd_Scroll(int delay);
+    void lcd_Image(char *ptr);
+
+private:
+    DigitalOut  DI_OUT;
+    DigitalOut  RW_OUT;
+    DigitalOut  E_OUT;
+    BusInOut    DB_OUT;
+    DigitalOut  CS1_OUT;
+    DigitalOut  CS2_OUT;
+    DigitalOut  RST_OUT;
+    Ticker      t;
+   
+};
+
+#endif  // SG12864A
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/font.h	Fri Jun 06 23:46:41 2014 +0000
@@ -0,0 +1,201 @@
+/****************************
+* Font Data 0x20 to 0xDF 192
+***********************************/
+const char Font[192][5] =
+{
+    { 0x00, 0x00, 0x00, 0x00, 0x00 }, // " " 0x20
+    { 0x00, 0x00, 0x4f, 0x00, 0x00 }, // !   0x21
+    { 0x00, 0x07, 0x00, 0x07, 0x00 }, // "   0x22
+    { 0x14, 0x7f, 0x14, 0x7f, 0x14 }, // #   0x23
+    { 0x24, 0x2a, 0x7f, 0x2a, 0x12 }, // $   0x24
+    { 0x23, 0x13, 0x08, 0x64, 0x62 }, // %   0x25
+    { 0x36, 0x49, 0x55, 0x22, 0x50 }, // &   0x26
+    { 0x00, 0x05, 0x03, 0x00, 0x00 }, // '   0x27
+    { 0x00, 0x1c, 0x22, 0x41, 0x00 }, // (   0x28
+    { 0x00, 0x41, 0x22, 0x1c, 0x00 }, // )   0x29
+    { 0x14, 0x08, 0x3e, 0x08, 0x14 }, // *   0x2A
+    { 0x08, 0x08, 0x3e, 0x08, 0x08 }, // +   0x2B
+    { 0x00, 0x50, 0x30, 0x00, 0x00 }, // ,   0x2C
+    { 0x08, 0x08, 0x08, 0x08, 0x08 }, // -   0x2D
+    { 0x00, 0x60, 0x60, 0x00, 0x00 }, // .   0x2E
+    { 0x20, 0x10, 0x08, 0x04, 0x02 }, // /   0x2F
+    { 0x3e, 0x51, 0x49, 0x45, 0x3e }, // 0   0x30
+    { 0x00, 0x42, 0x7f, 0x40, 0x00 }, // 1   0x31
+    { 0x42, 0x61, 0x51, 0x49, 0x46 }, // 2   0x32
+    { 0x21, 0x41, 0x45, 0x4b, 0x31 }, // 3   0x33
+    { 0x18, 0x14, 0x12, 0x7f, 0x10 }, // 4   0x34
+    { 0x27, 0x45, 0x45, 0x45, 0x39 }, // 5   0x35
+    { 0x3c, 0x4a, 0x49, 0x49, 0x30 }, // 6   0x36
+    { 0x01, 0x71, 0x09, 0x05, 0x03 }, // 7   0x37
+    { 0x36, 0x49, 0x49, 0x49, 0x36 }, // 8   0x38
+    { 0x06, 0x49, 0x49, 0x29, 0x1e }, // 9   0x39
+    { 0x00, 0x36, 0x36, 0x00, 0x00 }, // :   0x3A
+    { 0x00, 0x56, 0x36, 0x00, 0x00 }, // ;   0x3B
+    { 0x08, 0x14, 0x22, 0x41, 0x00 }, // <   0x3C
+    { 0x14, 0x14, 0x14, 0x14, 0x14 }, // =   0x3D
+    { 0x00, 0x41, 0x22, 0x14, 0x08 }, // >   0x3E
+    { 0x02, 0x01, 0x51, 0x09, 0x06 }, // ?   0x3F
+    { 0x32, 0x49, 0x79, 0x41, 0x3e }, // @   0x40
+    { 0x7e, 0x11, 0x11, 0x11, 0x7e }, // A   0x41
+    { 0x7f, 0x49, 0x49, 0x49, 0x36 }, // B   0x42
+    { 0x3e, 0x41, 0x41, 0x41, 0x22 }, // C   0x43
+    { 0x7f, 0x41, 0x41, 0x22, 0x1c }, // D   0x44
+    { 0x7f, 0x49, 0x49, 0x49, 0x41 }, // E   0x45
+    { 0x7f, 0x09, 0x09, 0x09, 0x01 }, // F   0x46
+    { 0x3e, 0x41, 0x49, 0x49, 0x7a }, // G   0x47
+    { 0x7f, 0x08, 0x08, 0x08, 0x7f }, // H   0x48
+    { 0x00, 0x41, 0x7f, 0x41, 0x00 }, // I   0x49
+    { 0x20, 0x40, 0x41, 0x3f, 0x01 }, // J   0x4A
+    { 0x7f, 0x08, 0x14, 0x22, 0x41 }, // K   0x4B
+    { 0x7f, 0x40, 0x40, 0x40, 0x40 }, // L   0x4C
+    { 0x7f, 0x02, 0x0c, 0x02, 0x7f }, // M   0x4D
+    { 0x7f, 0x04, 0x08, 0x10, 0x7f }, // N   0x4E
+    { 0x3e, 0x41, 0x41, 0x41, 0x3e }, // O   0x4F
+    { 0x7f, 0x09, 0x09, 0x09, 0x06 }, // P   0X50
+    { 0x3e, 0x41, 0x51, 0x21, 0x5e }, // Q   0X51
+    { 0x7f, 0x09, 0x19, 0x29, 0x46 }, // R   0X52
+    { 0x46, 0x49, 0x49, 0x49, 0x31 }, // S   0X53
+    { 0x01, 0x01, 0x7f, 0x01, 0x01 }, // T   0X54
+    { 0x3f, 0x40, 0x40, 0x40, 0x3f }, // U   0X55
+    { 0x1f, 0x20, 0x40, 0x20, 0x1f }, // V   0X56
+    { 0x3f, 0x40, 0x38, 0x40, 0x3f }, // W   0X57
+    { 0x63, 0x14, 0x08, 0x14, 0x63 }, // X   0X58
+    { 0x07, 0x08, 0x70, 0x08, 0x07 }, // Y   0X59
+    { 0x61, 0x51, 0x49, 0x45, 0x43 }, // Z   0X5A
+    { 0x00, 0x7f, 0x41, 0x41, 0x00 }, // [   0X5B
+    { 0x02, 0x04, 0x08, 0x10, 0x20 }, // "\" 0X5C
+    { 0x00, 0x41, 0x41, 0x7f, 0x00 }, // ]   0X5D
+    { 0x04, 0x02, 0x01, 0x02, 0x04 }, // ^   0X5E
+    { 0x40, 0x40, 0x40, 0x40, 0x40 }, // _   0X5F
+    { 0x00, 0x01, 0x02, 0x04, 0x00 }, // `   0X60
+    { 0x20, 0x54, 0x54, 0x54, 0x78 }, // a   0X61
+    { 0x7f, 0x48, 0x44, 0x44, 0x38 }, // b   0X62
+    { 0x38, 0x44, 0x44, 0x44, 0x20 }, // c   0X63
+    { 0x38, 0x44, 0x44, 0x48, 0x7f }, // d   0X64
+    { 0x38, 0x54, 0x54, 0x54, 0x18 }, // e   0X65
+    { 0x08, 0x7e, 0x09, 0x01, 0x02 }, // f   0X66
+    { 0x0c, 0x52, 0x52, 0x52, 0x3e }, // g   0X67
+    { 0x7f, 0x08, 0x04, 0x04, 0x78 }, // h   0X68
+    { 0x00, 0x44, 0x7d, 0x40, 0x00 }, // i   0X69
+    { 0x20, 0x40, 0x44, 0x3d, 0x00 }, // j   0X6A
+    { 0x7f, 0x10, 0x28, 0x44, 0x00 }, // k   0X6B
+    { 0x00, 0x41, 0x7f, 0x40, 0x00 }, // l   0X6C
+    { 0x7c, 0x04, 0x18, 0x04, 0x78 }, // m   0X6D
+    { 0x7c, 0x08, 0x04, 0x04, 0x78 }, // n   0X6E
+    { 0x38, 0x44, 0x44, 0x44, 0x38 }, // o   0X6F
+    { 0x7c, 0x14, 0x14, 0x14, 0x08 }, // p   0X70
+    { 0x08, 0x14, 0x14, 0x18, 0x7c }, // q   0X71
+    { 0x7c, 0x08, 0x04, 0x04, 0x08 }, // r   0X72
+    { 0x48, 0x54, 0x54, 0x54, 0x20 }, // s   0X73
+    { 0x04, 0x3f, 0x44, 0x40, 0x20 }, // t   0X74
+    { 0x3c, 0x40, 0x40, 0x20, 0x7c }, // u   0X75
+    { 0x1c, 0x20, 0x40, 0x20, 0x1c }, // v   0X76
+    { 0x3c, 0x40, 0x30, 0x40, 0x3c }, // w   0X77
+    { 0x44, 0x28, 0x10, 0x28, 0x44 }, // x   0X78
+    { 0x0c, 0x50, 0x50, 0x50, 0x3c }, // y   0X79
+    { 0x44, 0x64, 0x54, 0x4c, 0x44 }, // z   0X7A
+    { 0x00, 0x08, 0x36, 0x41, 0x00 }, // {   0X7B
+    { 0x00, 0x00, 0x7f, 0x00, 0x00 }, // |   0X7C
+    { 0x00, 0x41, 0x36, 0x08, 0x00 }, // }   0X7D
+    { 0x08, 0x08, 0x2a, 0x1c, 0x08 }, // ->  0X7E
+    { 0x08, 0x1c, 0x2a, 0x08, 0x08 }, // <-  0X7F
+    { 0x00, 0x00, 0x0f, 0x08, 0x08 }, //     0x80
+    { 0x08, 0x08, 0x0f, 0x00, 0x00 }, //     0x81         
+    { 0x2c, 0x32, 0x02, 0x32, 0x2c }, // ohm 0x82
+    { 0x44, 0x3c, 0x04, 0x7c, 0x44 }, // pi  0x83        
+    { 0x63, 0x55, 0x49, 0x41, 0x41 }, // siguma0x84
+    { 0x14, 0x14, 0x7c, 0x14, 0x12 }, // sec 0x85         
+    { 0x44, 0x3c, 0x14, 0x14, 0x74 }, // man 0x86
+    { 0x7c, 0x14, 0x1c, 0x14, 0x7c }, // en  0x87        
+    { 0x10, 0x10, 0x54, 0x10, 0x10 }, // waru0x88
+    { 0x7f, 0x7f, 0x7f, 0x7f, 0x7f }, //     0x89         
+    { 0x0f, 0x0f, 0x0f, 0x0f, 0x0f }, //     0x8A
+    { 0x00, 0x00, 0x00, 0x00, 0x00 }, //     0x8B        
+    { 0x00, 0x00, 0x00, 0x00, 0x00 }, //     0x8C
+    { 0x00, 0x00, 0x00, 0x00, 0x00 }, //     0x8D         
+    { 0x00, 0x00, 0x00, 0x00, 0x00 }, //     0x8E
+    { 0x00, 0x00, 0x00, 0x00, 0x00 }, //     0x8F        
+    { 0x00, 0x00, 0x00, 0x00, 0x00 }, //     0x90
+    { 0x00, 0x00, 0x00, 0x00, 0x00 }, //     0x91         
+    { 0x00, 0x00, 0x00, 0x00, 0x00 }, //     0x92
+    { 0x00, 0x00, 0x00, 0x00, 0x00 }, //     0x93        
+    { 0x00, 0x00, 0x00, 0x00, 0x00 }, //     0x94
+    { 0x00, 0x00, 0x00, 0x00, 0x00 }, //     0x95         
+    { 0x00, 0x00, 0x00, 0x00, 0x00 }, //     0x96
+    { 0x00, 0x00, 0x00, 0x00, 0x00 }, //     0x97        
+    { 0x00, 0x00, 0x00, 0x00, 0x00 }, //     0x98
+    { 0x00, 0x00, 0x00, 0x00, 0x00 }, //     0x99         
+    { 0x00, 0x00, 0x00, 0x00, 0x00 }, //     0x9A
+    { 0x00, 0x00, 0x00, 0x00, 0x00 }, //     0x9B        
+    { 0x00, 0x00, 0x00, 0x00, 0x00 }, //     0x9C
+    { 0x00, 0x00, 0x00, 0x00, 0x00 }, //     0x9D         
+    { 0x00, 0x00, 0x00, 0x00, 0x00 }, //     0x9E
+    { 0x00, 0x00, 0x00, 0x00, 0x00 }, //     0x9F
+    { 0x00, 0x00, 0x00, 0x00, 0x00 }, //     0xA0
+    { 0x70, 0x50, 0x70, 0x00, 0x00 }, //  .  0xA1         
+    { 0x00, 0x00, 0x0f, 0x01, 0x01 }, //  [  0xA2
+    { 0x40, 0x40, 0x78, 0x00, 0x00 }, //  ]  0xA3        
+    { 0x10, 0x20, 0x40, 0x00, 0x00 }, //  ,  0xA4
+    { 0x00, 0x18, 0x18, 0x00, 0x00 }, //  .  0xA5         
+    { 0x0a, 0x0a, 0x4a, 0x2a, 0x1e }, // wo  0xA6
+    { 0x04, 0x24, 0x34, 0x14, 0x0c }, // a   0xA7        
+    { 0x20, 0x10, 0x78, 0x04, 0x00 }, // i   0xA8
+    { 0x18, 0x08, 0x4c, 0x48, 0x38 }, // u   0xA9         
+    { 0x48, 0x48, 0x78, 0x48, 0x48 }, // e   0xAA
+    { 0x48, 0x28, 0x18, 0x7c, 0x08 }, // o   0xAB        
+    { 0x08, 0x7c, 0x08, 0x28, 0x18 }, // ya  0xAC
+    { 0x40, 0x48, 0x48, 0x78, 0x40 }, // yu  0xAD         
+    { 0x54, 0x54, 0x54, 0x7c, 0x00 }, // yo  0xAE
+    { 0x18, 0x00, 0x58, 0x40, 0x38 }, // tu  0xAF        
+    { 0x08, 0x08, 0x08, 0x08, 0x08 }, //  -  0xB0
+    { 0x01, 0x41, 0x3d, 0x09, 0x07 }, //  a  0xB1         
+    { 0x20, 0x10, 0x7c, 0x02, 0x01 }, //  i  0xB2
+    { 0x0e, 0x02, 0x43, 0x22, 0x1e }, //  u  0xB3        
+    { 0x42, 0x42, 0x7e, 0x42, 0x42 }, //  e  0xB4
+    { 0x22, 0x12, 0x0a, 0x7f, 0x02 }, //  o  0xB5         
+    { 0x42, 0x3f, 0x02, 0x42, 0x3e }, // ka  0xB6
+    { 0x0a, 0x0a, 0x7f, 0x0a, 0x0a }, // ki  0xB7        
+    { 0x08, 0x46, 0x42, 0x22, 0x1e }, // ku  0xB8
+    { 0x04, 0x03, 0x42, 0x3e, 0x04 }, // ke  0xB9         
+    { 0x42, 0x42, 0x42, 0x42, 0x7e }, // ko  0xBA
+    { 0x02, 0x4f, 0x22, 0x1f, 0x02 }, // sa  0xBB        
+    { 0x4a, 0x4a, 0x40, 0x20, 0x1c }, // si  0xBC
+    { 0x42, 0x22, 0x12, 0x2a, 0x46 }, // su  0xBD         
+    { 0x02, 0x3f, 0x42, 0x4a, 0x46 }, // se  0xBE
+    { 0x06, 0x48, 0x40, 0x20, 0x1e }, // so  0xBF
+    { 0x08, 0x46, 0x4a, 0x32, 0x1e }, // ta  0xC0
+    { 0x0a, 0x4a, 0x3e, 0x09, 0x08 }, // ti  0xC1         
+    { 0x0e, 0x00, 0x4e, 0x20, 0x1e }, // tu  0xC2
+    { 0x04, 0x45, 0x3d, 0x05, 0x04 }, // te  0xC3        
+    { 0x00, 0x7f, 0x08, 0x10, 0x00 }, // to  0xC4
+    { 0x44, 0x24, 0x1f, 0x04, 0x04 }, // na  0xC5         
+    { 0x40, 0x42, 0x42, 0x42, 0x40 }, // ni  0xC6
+    { 0x42, 0x2a, 0x12, 0x2a, 0x06 }, // nu  0xC7        
+    { 0x22, 0x12, 0x7b, 0x16, 0x22 }, // ne  0xC8
+    { 0x00, 0x40, 0x20, 0x1f, 0x00 }, // no  0xC9         
+    { 0x78, 0x00, 0x02, 0x04, 0x78 }, // ha  0xCA
+    { 0x3f, 0x44, 0x44, 0x44, 0x44 }, // hi  0xCB        
+    { 0x02, 0x42, 0x42, 0x22, 0x1e }, // hu  0xCC
+    { 0x04, 0x02, 0x04, 0x08, 0x30 }, // he  0xCD         
+    { 0x32, 0x02, 0x7f, 0x02, 0x32 }, // ho  0xCE
+    { 0x02, 0x12, 0x22, 0x52, 0x0e }, // ma  0xCF        
+    { 0x00, 0x2a, 0x2a, 0x2a, 0x40 }, // mi  0xD0
+    { 0x38, 0x24, 0x22, 0x20, 0x70 }, // mu  0xD1         
+    { 0x40, 0x28, 0x10, 0x28, 0x06 }, // me  0xD2
+    { 0x0a, 0x3e, 0x4a, 0x4a, 0x4a }, // mo  0xD3        
+    { 0x04, 0x7f, 0x04, 0x14, 0x0c }, // ya  0xD4
+    { 0x40, 0x42, 0x42, 0x7e, 0x40 }, // yu  0xD5         
+    { 0x4a, 0x4a, 0x4a, 0x4a, 0x7e }, // yo  0xD6
+    { 0x04, 0x05, 0x45, 0x25, 0x1c }, // ra  0xD7        
+    { 0x0f, 0x40, 0x20, 0x1f, 0x00 }, // ri  0xD8
+    { 0x7c, 0x00, 0x7e, 0x80, 0x30 }, // ru  0xD9         
+    { 0x7e, 0x40, 0x20, 0x10, 0x08 }, // re  0xDA
+    { 0x7e, 0x42, 0x42, 0x42, 0x7e }, // ro  0xDB        
+    { 0x0e, 0x02, 0x42, 0x22, 0x1e }, // wa  0xDC
+    { 0x42, 0x42, 0x40, 0x20, 0x18 }, // n   0xDD         
+    { 0x02, 0x04, 0x01, 0x02, 0x00 }, // "   0xDE
+    { 0x07, 0x05, 0x07, 0x00, 0x00 }  // .   0xDF
+                    
+};
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/imagedata.h	Fri Jun 06 23:46:41 2014 +0000
@@ -0,0 +1,67 @@
+char ImageData[1024]={
+    0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0x40,0x40,0xC0,0xF8,0x0C,0x04,0x06,0x02,0x02,
+    0x02,0x02,0x02,0x06,0x04,0x1C,0x06,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x06,
+    0x04,0x1C,0x18,0x0C,0x06,0x02,0x02,0x02,0x03,0x01,0x01,0x01,0x03,0x06,0x0C,0x08,
+    0x08,0x0C,0x02,0x02,0x03,0x01,0x01,0x03,0x02,0x02,0x06,0x0C,0x08,0x0C,0x04,0x86,
+    0x02,0x02,0x02,0x02,0x82,0x02,0x06,0x0C,0x0C,0x86,0x02,0x02,0x03,0x01,0x01,0x01,
+    0x03,0x02,0x06,0x0C,0x08,0x0C,0x06,0x02,0x02,0x82,0x02,0x83,0x03,0x02,0x02,0x0E,
+    0x08,0x0C,0x04,0x86,0x82,0x82,0x03,0x01,0x03,0x02,0x06,0x04,0x0C,0x0C,0x04,0x06,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x06,0x1C,0x10,0x10,0x18,0x08,0x18,0xF0,0x00,0x00,
+    0x00,0x00,0x18,0x7E,0xC3,0x81,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xE0,0x40,
+    0x20,0xC0,0x20,0x20,0xC0,0x00,0xFF,0x40,0x20,0x20,0x20,0x40,0x80,0x00,0x80,0x40,
+    0x20,0x20,0x20,0x40,0x80,0x00,0x80,0x40,0x20,0x20,0x20,0x40,0xFF,0x00,0x00,0x02,
+    0x02,0x02,0x02,0xC2,0x31,0x09,0x05,0x03,0x03,0x19,0x01,0x0D,0x00,0x00,0x40,0x40,
+    0xC1,0x00,0x04,0x04,0xFF,0x24,0xE4,0x08,0x96,0x95,0xD4,0xB4,0x94,0x00,0x00,0xFC,
+    0x03,0x00,0x00,0x00,0x24,0x24,0x24,0x24,0x24,0xFD,0x24,0x25,0x00,0x00,0x00,0x00,
+    0x00,0x10,0x10,0x10,0x10,0x08,0x09,0x09,0x09,0x10,0xE0,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x0C,0x0E,0x1B,0xF0,0x80,
+    0x00,0x00,0x00,0x7E,0xC3,0x81,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x00,
+    0x00,0x1F,0x00,0x00,0x1F,0x00,0x1F,0x08,0x10,0x10,0x10,0x08,0x07,0x00,0x07,0x09,
+    0x11,0x11,0x11,0x11,0x09,0x00,0x07,0x08,0x10,0x10,0x10,0x08,0x1F,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x03,0x0C,0x08,0x10,0x10,0x10,0x10,0x00,0x00,0x00,0x00,0x20,0x10,
+    0x0F,0x10,0x14,0x23,0x20,0x28,0x2F,0x20,0x20,0x28,0x2F,0x20,0x20,0x00,0x00,0x07,
+    0x18,0x00,0x00,0x00,0x0C,0x12,0x12,0x12,0x12,0x0F,0x04,0x08,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x08,0x08,0x06,0x01,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x19,0x18,0x00,0x00,0x00,0x18,0x98,0xFC,0x06,0x02,0x03,
+    0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x3D,0x23,0x20,0x20,0x20,0x20,0x20,0x20,
+    0x30,0x18,0x3C,0xC0,0x80,0x80,0x80,0x80,0x80,0xC0,0x40,0x60,0x30,0x70,0xC0,0x80,
+    0x80,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0xC0,0x70,0x60,0x40,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0xC0,0x40,0x60,0x38,0x30,0x40,0xC0,0x80,0x80,0x80,0xC0,0x40,0x40,
+    0x40,0x60,0x20,0x38,0x38,0x60,0xC0,0x80,0x80,0x80,0x80,0x80,0x40,0x40,0x60,0x20,
+    0x30,0x18,0x38,0x60,0x40,0x40,0x40,0x40,0x40,0x20,0x20,0x20,0x30,0x1C,0x1C,0x30,
+    0x20,0x60,0x40,0x40,0x40,0x60,0x20,0x20,0x30,0x1C,0x18,0x10,0x30,0x20,0x20,0x30,
+    0x10,0x18,0x06,0x04,0x0C,0x08,0x08,0x0C,0x04,0x06,0x04,0x06,0x03,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x18,0x08,0xF0,0x08,0x44,0x24,0x44,0x04,
+    0x04,0x44,0x24,0x44,0x08,0xF0,0x08,0x18,0xE0,0x00,0x00,0x00,0x50,0xE0,0xB0,0xE0,
+    0x51,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x38,
+    0x6C,0x38,0x54,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0xA0,0xC0,0x60,0xC0,0xA0,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x2A,0x1C,0x36,0x1C,0x2A,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x0E,0xF0,0x00,0x00,0x00,0x00,0x00,0xFC,0x0C,0x08,0x98,0x50,
+    0x50,0x90,0x10,0x10,0x10,0x10,0x90,0x50,0x50,0x90,0x18,0x0C,0xC4,0x3C,0x00,0x00,
+    0x00,0x00,0xC0,0x20,0xA0,0x20,0xC0,0x0F,0x10,0x20,0x1F,0x78,0x80,0x20,0x40,0x71,
+    0x40,0x40,0x20,0x80,0x78,0x1F,0x20,0x10,0x0F,0x00,0x00,0xF0,0x01,0x00,0x01,0x00,
+    0x01,0x00,0x20,0x20,0x20,0x20,0x00,0x00,0x20,0x40,0x00,0x00,0x00,0x80,0x00,0x00,
+    0x20,0x40,0x00,0x00,0x80,0x00,0x00,0x40,0x90,0x20,0x00,0x20,0x20,0x20,0x20,0xE0,
+    0x00,0x00,0x00,0xF0,0x40,0x42,0x41,0xC3,0x01,0x82,0x80,0xF0,0x80,0x80,0x40,0x40,
+    0x40,0xF0,0x40,0x40,0x40,0x40,0x00,0x40,0x20,0x90,0x00,0x80,0x80,0xF0,0x80,0x90,
+    0x20,0x20,0x20,0x20,0x00,0x00,0x0F,0xF0,0x00,0x00,0x1F,0x60,0x80,0x80,0x00,0x38,
+    0x44,0x5A,0x5A,0x42,0x5A,0x5A,0x42,0x44,0x38,0x00,0x80,0x80,0x60,0x1F,0x00,0x00,
+    0x00,0x00,0xFF,0x00,0xFF,0x01,0x0D,0x12,0x12,0x12,0xF2,0x02,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x71,0x49,0x45,0x23,0x12,0xFC,0x00,0x00,0x00,0xFF,0x01,0x02,0x04,0x00,
+    0x00,0x01,0x81,0x41,0x21,0x19,0x07,0x00,0x80,0x80,0x40,0x20,0x18,0x07,0x00,0x01,
+    0x82,0x80,0x40,0x30,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x40,0x30,0x0E,0x31,
+    0xC0,0x00,0x06,0x81,0x42,0x34,0x08,0x17,0x00,0x08,0x08,0xFF,0x04,0x04,0x02,0x8E,
+    0xB2,0x43,0x62,0x9A,0x06,0x00,0x00,0x02,0xFF,0x00,0x60,0x1C,0x00,0xFF,0x00,0x1C,
+    0x61,0x01,0xFF,0x01,0x00,0x00,0x00,0x00,0x0F,0x32,0x12,0x12,0xF2,0x02,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x31,0x49,0x49,0x49,0x41,0xC2,0x22,0x1C,0x00,0x00,0x00,
+    0x00,0x00,0x01,0x02,0x04,0x05,0x05,0x05,0x05,0x05,0x1F,0x20,0x40,0x40,0x20,0x10,
+    0x15,0x12,0x15,0x20,0x40,0x40,0x20,0x1F,0x00,0x00,0x40,0x20,0x10,0x20,0x40,0x20,
+    0x10,0x20,0x40,0x20,0x10,0x20,0x40,0x20,0x10,0x20,0x40,0x20,0x10,0x20,0x40,0x20,
+    0x10,0x20,0x40,0x20,0x10,0x20,0x40,0x20,0x10,0x20,0x40,0x20,0x10,0x20,0x40,0x20,
+    0x10,0x20,0x40,0x20,0x10,0x20,0x40,0x20,0x10,0x20,0x41,0x21,0x10,0x21,0x41,0x20,
+    0x10,0x20,0x40,0x20,0x11,0x21,0x40,0x20,0x11,0x20,0x40,0x20,0x10,0x21,0x40,0x20,
+    0x10,0x21,0x41,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x30,0x40,0x40,
+    0x40,0x25,0x12,0x15,0x10,0x20,0x40,0x40,0x40,0x20,0x1F,0x09,0x09,0x06,0x00,0x00,
+};
+