4-bit Mode LCD 20x2

Dependencies:   TextLCD mbed

Committer:
umairaftab
Date:
Wed Mar 19 02:26:56 2014 +0000
Revision:
0:157f39f309fa
LCD 20x2 Working;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
umairaftab 0:157f39f309fa 1 // Hello World! for the TextLCD
umairaftab 0:157f39f309fa 2
umairaftab 0:157f39f309fa 3 #include "mbed.h"
umairaftab 0:157f39f309fa 4 #include "TextLCD.h"
umairaftab 0:157f39f309fa 5
umairaftab 0:157f39f309fa 6 Serial pc(USBTX, USBRX); // tx, rx
umairaftab 0:157f39f309fa 7
umairaftab 0:157f39f309fa 8
umairaftab 0:157f39f309fa 9 TextLCD lcd(PTA1, PTA2, PTD4, PTA12, PTA4, PTA5, TextLCD::LCD20x2); // rs, e, d4-d7 ok
umairaftab 0:157f39f309fa 10
umairaftab 0:157f39f309fa 11
umairaftab 0:157f39f309fa 12
umairaftab 0:157f39f309fa 13 int main() {
umairaftab 0:157f39f309fa 14
umairaftab 0:157f39f309fa 15
umairaftab 0:157f39f309fa 16
umairaftab 0:157f39f309fa 17 // Show cursor as blinking character
umairaftab 0:157f39f309fa 18 lcd.setCursor(TextLCD::CurOff_BlkOn);
umairaftab 0:157f39f309fa 19 lcd.printf("Hello Plamen");
umairaftab 0:157f39f309fa 20 lcd.locate(0,1);
umairaftab 0:157f39f309fa 21 lcd.printf("Its Working Now");
umairaftab 0:157f39f309fa 22
umairaftab 0:157f39f309fa 23 }
umairaftab 0:157f39f309fa 24