driver demo for univision oled dispaly

Dependencies:   4spi_oled_ssd1305 mbed

Files at this revision

API Documentation at this revision

Comitter:
pegcjs
Date:
Tue Jan 29 10:14:49 2013 +0000
Commit message:
formatted for prettiness

Changed in this revision

4spi_oled_ssd1305.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
diff -r 000000000000 -r 5dbcd390fda7 4spi_oled_ssd1305.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/4spi_oled_ssd1305.lib	Tue Jan 29 10:14:49 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/pegcjs/code/4spi_oled_ssd1305/#6d2aded0cf41
diff -r 000000000000 -r 5dbcd390fda7 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Jan 29 10:14:49 2013 +0000
@@ -0,0 +1,75 @@
+#include "mbed.h"
+#include "4spi_oled_ssd1305.h"
+
+/* re writtten to cope with teh ssd1306 driven oled UG-2864HSWEG01 from univision
+wiring for test circuit
+OLED pins -FUNCTION-------MBED PINns
+1 ----3.3V--- Vout (p40)
+2 ----0.0V--- GND (p1)
+3 ----------- GND (p1)
+4 ----------- GND (p1)
+5 ----------- GND (p1)
+6 ----------- GND (p1)
+7 ----------- GND (p1)
+8 ----------- N/C
+9 ----D1---- mosi (p5)
+10 ---D0------sck(p7)
+11 ----------- GND (p1)
+12 ----------- GND (p1)
+13 ---DC------ p10
+14 ---RES----- p9
+15 ---CS------ p8
+*/
+
+
+
+DigitalOut myled(LED1);
+
+// Create object and load font
+//SPKDisplay( mosiPin, clkPin,  csPin,  dcPin, resPin, Serial *debugSerial)
+SPKDisplay screen(p5, p7, p8, p10, p9);
+int main()
+{
+    char msg[22];
+    sprintf(msg,"                      ");
+//           01234567890abcdefghij
+
+    int i=0;
+    while(1==1) {
+        myled=1;
+        // nice logo output
+        screen.welcome();
+        wait(3);
+
+        wait(2);
+        for(i=0; i<5; i++) {
+            myled=0;
+            screen.inverse();
+            wait(1);
+            screen.normal();
+            myled=1;
+            wait(1);
+        }
+
+        screen.fontdemo();
+        myled=0;
+        wait(5);
+        screen.clearBuffer();
+        screen.sendBuffer();
+        myled=1;
+        wait(0.5);
+        myled=0;
+        wait(0.5);
+
+        for(i=0; i<8; i++) {
+            sprintf(msg,"HELLO WORLD %d",i);
+            screen.textToBuffer(msg, i);
+            screen.sendBuffer();
+            screen.clearBuffer();
+            myled=1;
+            wait(1);
+        }
+    }
+
+
+}
\ No newline at end of file
diff -r 000000000000 -r 5dbcd390fda7 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Jan 29 10:14:49 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/0954ebd79f59
\ No newline at end of file