Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
00001 #include "mbed.h" 00002 #include "TextLCD.h" 00003 SPI sw(p5, p6, p7); 00004 DigitalOut cs(p8); 00005 TextLCD lcd(p15, p16, p17, p18, p19, p20, TextLCD::LCD20x4); // rs, e, d4-d7 00006 00007 00008 int main() { 00009 cs=0; 00010 sw.format(16,0); 00011 sw.frequency(1000000); 00012 lcd.printf("Hello World!\n"); 00013 while (1) { 00014 sw.write(0x0000); 00015 cs = 1; 00016 cs=0; 00017 wait(1); 00018 sw.write(0x5555); 00019 cs = 1; 00020 cs=0; 00021 wait(1); 00022 sw.write(0xAAAA); 00023 cs = 1; 00024 cs=0; 00025 wait(1); 00026 sw.write(0xFFFF); 00027 cs = 1; 00028 cs=0; 00029 wait(1); 00030 } 00031 } 00032
Generated on Mon Jul 18 2022 23:41:19 by
1.7.2