This program is for SG12864A(128 x 64 mono-LCD display) with Starboard Orange. Many of source code is referred from below website(in Japanese). (http://www.picfun.com/PIC24H/app24H01.html) Connection between SG12864A and mbed: (these connection are defined in SG12864A.h) pin1(VSS) pin2(VDD) : 5V pin3(V0) : pin4(DI) : p23 pin5(RW): p22 pin6(E): p21 pin7(DB0):p20 pin8(DB1):p19 pin9(DB2):p14 pin10(DB3):p13 pin11(DB4):p12 pin12(DB5):p11 pin13(DB6):p10 pin14(DB7):p9 pin15(CS1):p17 pin16(CS2):p16 pin17(RST):p15 pin18:VOUT pin19:LED Anode pin20:LED Cathode Note: lcd_Line function is not correct(maybe)... Other function is correctly working.

Dependencies:   mbed

Revision:
0:d0cd5139479f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SG12864A.h	Sun Jan 09 11:44:15 2011 +0000
@@ -0,0 +1,75 @@
+//
+// SG12864A Test Program
+//
+//
+
+#ifndef SG12864A_H
+#define SG12864A_H
+
+#include "mbed.h"
+
+#define DI p23
+#define RW p22
+#define E  p21
+#define DB0 p20
+#define DB1 p19
+#define DB2 p14
+#define DB3 p13
+#define DB4 p12
+#define DB5 p11
+#define DB6 p10
+#define DB7 p9
+#define CS1 p17
+#define CS2 p16
+#define RST p15
+
+#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);
+    //void Delay200n(void);
+    //void Delay1u(int time);
+    //void Delay1m(int time);
+
+private:
+    DigitalOut  DI_OUT;
+    DigitalOut  RW_OUT;
+    DigitalOut  E_OUT;
+    BusInOut      DB_OUT;
+    //BusOut DB_OUT;
+    DigitalOut  CS1_OUT;
+    DigitalOut  CS2_OUT;
+    DigitalOut  RST_OUT;
+    Ticker      t;
+
+    /** Displaying
+     *  
+     *  This function will be called by Ticker which set by this class' constructor. 
+     *  It displays just one layer by single call. 
+     */
+
+   // void display( void );
+    
+};
+
+#endif  // SG12864A
+
+
+
+
+