test

Dependencies:   TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
dgu
Date:
Wed Jan 11 13:59:59 2017 +0000
Commit message:
Test

Changed in this revision

TextLCD.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/TextLCD.lib	Wed Jan 11 13:59:59 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/TextLCD/#308d188a2d3a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Jan 11 13:59:59 2017 +0000
@@ -0,0 +1,32 @@
+#include "mbed.h"
+#include "TextLCD.h"
+SPI sw(p5, p6, p7);
+DigitalOut cs(p8); 
+TextLCD lcd(p15, p16, p17, p18, p19, p20, TextLCD::LCD20x4); // rs, e, d4-d7
+
+
+int main() {
+  cs=0;
+  sw.format(16,0); 
+  sw.frequency(1000000); 
+  lcd.printf("Hello World!\n");
+  while (1) {
+      sw.write(0x0000); 
+      cs = 1;
+      cs=0;
+      wait(1);
+      sw.write(0x5555); 
+      cs = 1;
+      cs=0;
+      wait(1);
+      sw.write(0xAAAA); 
+      cs = 1;
+      cs=0;
+      wait(1);
+      sw.write(0xFFFF); 
+      cs = 1;
+      cs=0;
+      wait(1);
+   }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Jan 11 13:59:59 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/99b5ccf27215
\ No newline at end of file