マイコンと電子工作 No5 P48のプログラムです。

Dependencies:   TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
jksoft
Date:
Fri Jun 03 11:08:49 2011 +0000
Commit message:

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	Fri Jun 03 11:08:49 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/TextLCD/#44f34c09bd37
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Jun 03 11:08:49 2011 +0000
@@ -0,0 +1,19 @@
+#include "mbed.h"
+#include "TextLCD.h"    // ライブラリのヘッダ・ファイルをインクルード
+
+// ライブラリを定義 使用するピンを指定する
+TextLCD lcd(p24, p26, p27, p28, p29, p30);  // rs, e, d4-d7
+
+int main() {
+    int count = 0;
+    
+    lcd.printf("Hello World!¥n");           // 文字列を表示する
+    lcd.printf("count = ");
+    
+    while(1) {
+        lcd.locate(8,1);                    // 表示位置を指定する
+        lcd.printf("%04d",count);           // countの値を表示する
+        count++;                            // countをインクリメント
+        wait(1.0);                          // 1秒ウエイト
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Jun 03 11:08:49 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9a9732ce53a1