Simple program to drive an I2C character display.
Dependencies: Skool_wkshp_lib2015 mbed
Revision 0:2e362289ef7e, committed 2015-10-02
- Comitter:
- lvagasi
- Date:
- Fri Oct 02 21:45:38 2015 +0000
- Commit message:
- Simple program to drive an I2C character LCD. Working.
Changed in this revision
diff -r 000000000000 -r 2e362289ef7e Skool_display.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Skool_display.cpp Fri Oct 02 21:45:38 2015 +0000 @@ -0,0 +1,24 @@ +#include "mbed.h" +#include "serial_lcd.h" +#include "pc_uart.h" + +extern Serial pc; // UART to communicate with PC +DigitalOut GLED(PB_5); + +int main() { + + GLED = 1; + + init_ser_lcd(); + write_ser_lcd(0x80, false); // set DDRAM addr to 0x00 + write_ser_text((char *)"ARM SKOOL",16); + write_ser_lcd(0xC0, false); // set DDRAM addr to 0x40, beginning of 2nd line + write_ser_text((char *)" Kijelzo teszt ", 16); + + wait(3.0); + + while (1) { + GLED = !GLED; + wait(1.0); + } +}
diff -r 000000000000 -r 2e362289ef7e Skool_wkshp_lib2015.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Skool_wkshp_lib2015.lib Fri Oct 02 21:45:38 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/lvagasi/code/Skool_wkshp_lib2015/#68d1a8c4970b
diff -r 000000000000 -r 2e362289ef7e mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Oct 02 21:45:38 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/34e6b704fe68 \ No newline at end of file