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.
Diff: MCC0G42005A6W.cpp
- Revision:
- 1:3ea320ddd830
- Parent:
- 0:bf6598759869
diff -r bf6598759869 -r 3ea320ddd830 MCC0G42005A6W.cpp --- a/MCC0G42005A6W.cpp Mon Dec 07 20:58:00 2020 +0000 +++ b/MCC0G42005A6W.cpp Tue Apr 13 13:06:59 2021 +0000 @@ -10,12 +10,14 @@ LCD_COG::LCD_COG( PinName I2C_sda, PinName I2C_scl, const char *init_message ) : i2c_p( new I2C( I2C_sda, I2C_scl ) ), i2c( *i2c_p ), charsInLine( MaxCharsInALine ) { init( init_message ); + i2c.frequency(50000); } LCD_COG::LCD_COG( I2C &i2c_, const char *init_message ) : i2c_p( NULL ), i2c( i2c_ ), charsInLine( MaxCharsInALine ) { init( init_message ); + i2c.frequency(50000); } LCD_COG::~LCD_COG() @@ -52,7 +54,7 @@ for ( unsigned int i = 0; i < sizeof( init_seq0 ); i++ ) { lcd_command( init_seq0[ i ] ); - wait(30e-6);// wait(30e-6); + wait(30e-6);// // 30e-6 0.00003 30ns ? } set_CGRAM( 7, '\x1F' ); @@ -142,7 +144,7 @@ { /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// lcd_command( Comm_ClearDisplay ); - wait( 2e-3 ); + wait( 2e-3 ); // 2e-3 0.002 2ms curs[ 0 ] = 0; curs[ 1 ] = 0; curs[ 2 ] = 0;