NXP PCF8576 + GH08172_test program

Dependencies:   PCF8576 mbed

Files at this revision

API Documentation at this revision

Comitter:
MACRUM
Date:
Mon Mar 28 12:42:32 2016 +0000
Commit message:
Initial commit

Changed in this revision

PCF8576.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 32964eaccde0 PCF8576.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PCF8576.lib	Mon Mar 28 12:42:32 2016 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/MACRUM/code/PCF8576/#e62c6477b73b
diff -r 000000000000 -r 32964eaccde0 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Mar 28 12:42:32 2016 +0000
@@ -0,0 +1,36 @@
+/*
+ * PCF8576 + GH08172 LCD test program
+ */
+
+#include "mbed.h"
+#include "PCF8576.h"
+
+PCF8576 lcd(D14, D15);
+Ticker flipper;
+
+void blink()
+{
+    static uint32_t cnt = 0;
+    const uint32_t ptn[5] = {0, 1, 3, 7, 0xF};
+
+    if (cnt > 4) {
+        cnt = 0;
+    }
+    lcd.icon(ptn[cnt++]);
+}
+
+int main()
+{
+    char buf[6];    
+    flipper.attach(&blink, 0.4);
+
+    lcd.print("mbed");
+    wait(5);
+
+    int cnt = 0;
+    while(1) {
+        sprintf(buf, "%6d", cnt++);
+        lcd.print(buf);
+        wait(0.1);
+    }
+}
diff -r 000000000000 -r 32964eaccde0 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Mar 28 12:42:32 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/c0f6e94411f5
\ No newline at end of file