
Driver for a Text LCD using a PCF8574 over I2C
Dependencies: mbed
Fork of I2CTextLCD by
main.cpp@3:846b36e1f4d5, 2016-01-19 (annotated)
- Committer:
- mijimy
- Date:
- Tue Jan 19 07:50:15 2016 +0000
- Revision:
- 3:846b36e1f4d5
- Parent:
- 2:628a00fec43c
i2c pcf8574t lcd 20x4 .. remove crash after certain cycle
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
romilly | 0:6beb6f498640 | 1 | #include "mbed.h" |
romilly | 0:6beb6f498640 | 2 | #include "TextLCD.h" |
romilly | 0:6beb6f498640 | 3 | |
mijimy | 2:628a00fec43c | 4 | TextLCD lcd(p9,p10); |
romilly | 0:6beb6f498640 | 5 | |
mijimy | 2:628a00fec43c | 6 | int main() |
mijimy | 2:628a00fec43c | 7 | { int count=0; |
mijimy | 2:628a00fec43c | 8 | lcd.printf("Hi mbed World!"); |
mijimy | 2:628a00fec43c | 9 | wait(5); |
mijimy | 2:628a00fec43c | 10 | lcd.cls(); |
mijimy | 2:628a00fec43c | 11 | lcd.locate(4,2); |
mijimy | 2:628a00fec43c | 12 | lcd.printf("count:"); |
mijimy | 2:628a00fec43c | 13 | while(1) |
mijimy | 3:846b36e1f4d5 | 14 | { for(count=0;count<100;count+=1) |
mijimy | 2:628a00fec43c | 15 | { lcd.locate(11,2); |
mijimy | 2:628a00fec43c | 16 | lcd.printf(" %d ",count); |
mijimy | 2:628a00fec43c | 17 | wait(0.5); |
mijimy | 2:628a00fec43c | 18 | } |
mijimy | 2:628a00fec43c | 19 | |
mijimy | 2:628a00fec43c | 20 | } |
romilly | 0:6beb6f498640 | 21 | } |