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:c136b753b83c, committed 2019-02-28
- Comitter:
- stoma
- Date:
- Thu Feb 28 09:25:18 2019 +0000
- Parent:
- 2:bc4583ce560e
- Commit message:
- change for ST7032, Sitronix LCD controller.
Changed in this revision
| I2CLCD.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/I2CLCD.cpp Sun Feb 27 14:28:40 2011 +0000
+++ b/I2CLCD.cpp Thu Feb 28 09:25:18 2019 +0000
@@ -84,17 +84,25 @@
lcd_cfg(p_config);
wait_ms(500);
- lcd_out(0x30, 0);
+ lcd_out(0x38, 0); // 8bit bus mode, 2-line display mode
wait_ms(5);
- lcd_out(0x30, 0);
+ lcd_out(0x39, 0); // extention instruction selected.
+ wait_ms(2);
+ lcd_out(0x14, 0); // int. OSC freq. set
wait_ms(2);
- lcd_out(0x30, 0);
+ lcd_out(0x73, 0); // Contrast set
+ wait_ms(2);
+ lcd_out(0x56, 0); // Power/ICON/Contrast control
+ wait_ms(2);
+ lcd_out(0x6c, 0); // Follower control
+ wait_ms(300);
- lcd_out(0x38, 0); // func
- lcd_out(0x10, 0); // shift
- lcd_out(0x0c, 0); // display
- lcd_out(0x06, 0); // entry mode
- cls();
+ lcd_out(0x38, 0); // 8bit bus mode, 2-line display mode
+ wait_ms(5);
+ lcd_out(0x01, 0); // clear display
+ wait_ms(1);
+ lcd_out(0x0c, 0); // Display on/off control
+
}
void I2CLCD::cls() {