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 3:e87183be497b, committed 2022-11-18
- Comitter:
- silviosz
- Date:
- Fri Nov 18 13:51:29 2022 +0000
- Parent:
- 2:74d01fef184a
- Child:
- 4:ac48711f123b
- Commit message:
- Teste 2022-11-17 LCD 20x4 I2C (baseado no codigo de 2022-05-11)
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed May 11 10:42:37 2022 +0000
+++ b/main.cpp Fri Nov 18 13:51:29 2022 +0000
@@ -19,7 +19,7 @@
//TextLCD lcd(p15, p16, p17, p18, p19, p20); // RS, E, D4-D7, LCDType=LCD16x2, BL=NC, E2=NC, LCDTCtrl=HD44780
//I2C Portexpander PCF8574
-TextLCD_I2C lcd(&i2c_lcd, 0x7e, TextLCD::LCD20x4); // I2C bus, PCF8574 Slaveaddress, LCD Type Original = 0x42, Usando I2C scanner = 0x3F
+TextLCD_I2C lcd(&i2c_lcd, 0xbf, TextLCD::LCD20x4); // I2C bus, PCF8574 Slaveaddress, LCD Type Original = 0x42, Usando I2C scanner = 0x3F
//TextLCD_I2C lcd(&i2c_lcd, 0x7e, TextLCD::LCD16x2, TextLCD::WS0010); // I2C bus, PCF8574 addr, LCD Type, Ctrl Type
//I2C Portexpander MCP23008
@@ -49,7 +49,7 @@
int main() {
pc.printf("LCD Test. Columns=%d, Rows=%d\n\r", lcd.columns(), lcd.rows());
- for (int row=0; row<lcd.rows(); row++) {
+ for (int row=0; row<lcd.rows(); row++) {
int col=0;
pc.printf("MemAddr(Col=%d, Row=%d)=0x%02X\n\r", col, row, lcd.getAddress(col, row));
@@ -67,6 +67,8 @@
// Show cursor as blinking character
lcd.setCursor(TextLCD::CurOff_BlkOn);
lcd.setBacklight(TextLCD::LightOn);
+ //lcd.setUDC(0, (char *) udc_AC); // Show |>
+
// Set and show user defined characters. A maximum of 8 UDCs are supported by the HD44780.
// They are defined by a 5x7 bitpattern.