Extended TextLCD: uses Bus or Port output for added performance, with display/cursor control, with LCDType as a class, with character generator programming capability.
main.cpp
- Committer:
- osmeest
- Date:
- 2011-02-05
- Revision:
- 1:c360c4648b08
File content as of revision 1:c360c4648b08:
// Hello World! for the TextLCD #include "ext_text_lcd/TextLCD.h" #include <sstream> #include <iostream> #include <iomanip> using namespace std; using namespace ext_text_lcd; //TextLCD lcd(p28, p27, p26, p25, p24, p23, TextLCD::LCD20x2); // rs, e, d4-d7 TextLCD lcd(p28, p27, Port2, 0, TextLCD::LCD20x2); // rs, e, d4-d7 int main() { lcd.setDisplayControl(TextLCD::DisplayOn, TextLCD::CursorOn, TextLCD::BlinkingCursor); lcd.locate(0,0); lcd.printf("(0,0)"); lcd.locate(0,1); lcd.printf("(0,1)"); lcd.locate(14,0); lcd.printf("(19,0)"); lcd.locate(14,1); lcd.printf("(19,1)"); while (1) { lcd.locate(0,0); wait(2); lcd.locate(0,1); wait(2); lcd.locate(19,0); wait(2); lcd.locate(19,1); wait(2); } }