Dongbing Gu
/
ext_blinky
test
Revision 0:61c1b97ace71, committed 2017-01-11
- Comitter:
- dgu
- Date:
- Wed Jan 11 13:59:59 2017 +0000
- Commit message:
- Test
Changed in this revision
diff -r 000000000000 -r 61c1b97ace71 TextLCD.lib --- /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
diff -r 000000000000 -r 61c1b97ace71 main.cpp --- /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); + } +} +
diff -r 000000000000 -r 61c1b97ace71 mbed.bld --- /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