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.
Revision 1:5c7a96a6003b, committed 2019-06-05
- Comitter:
- mathsmurfff
- Date:
- Wed Jun 05 11:09:14 2019 +0000
- Parent:
- 0:6beb6f498640
- Commit message:
- change I2CTextLCD for LCD Chinese model PCF8574 address 0x7E
Changed in this revision
--- a/TextLCD.cpp Mon Aug 09 14:17:02 2010 +0000 +++ b/TextLCD.cpp Wed Jun 05 11:09:14 2019 +0000 @@ -120,6 +120,8 @@ } void TextLCD::writeNibble(int data, bool rs) { + data<<=4; + data|=8; if (rs) { data = data | RS_ON; // set rs bit }
--- a/TextLCD.h Mon Aug 09 14:17:02 2010 +0000 +++ b/TextLCD.h Wed Jun 05 11:09:14 2019 +0000 @@ -25,8 +25,8 @@ #include "mbed.h" -#define E_ON 0x10 -#define RS_ON 0x80 +#define E_ON 0x4 +#define RS_ON 0x1 /** A TextLCD interface for driving 4-bit HD44780-based LCDs * @@ -61,7 +61,7 @@ * @param d0-d3 Data lines * @param type Sets the panel size/addressing mode (default = LCD16x2) */ - TextLCD(PinName sda, PinName scl, int i2cAddress = 0x40, LCDType type = LCD16x2); + TextLCD(PinName sda, PinName scl, int i2cAddress = 0x7e, LCDType type = LCD16x2); #if DOXYGEN_ONLY /** Write a character to the LCD
--- a/main.cpp Mon Aug 09 14:17:02 2010 +0000 +++ b/main.cpp Wed Jun 05 11:09:14 2019 +0000 @@ -1,8 +1,13 @@ #include "mbed.h" #include "TextLCD.h" -TextLCD lcd(p9, p10); +TextLCD lcd(D14, D15, 0x7e); -int main() { - lcd.printf("Hi mbed World!\n"); +int main() +{ + while(1) { + lcd.printf("Hi mbed World!\n"); + wait_ms(50); + } } +
--- a/mbed.bld Mon Aug 09 14:17:02 2010 +0000 +++ b/mbed.bld Wed Jun 05 11:09:14 2019 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/9114680c05da +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file