Perhaps I'm just not meant to use LCD's.
I connected my new MOI-AL202C into my circuit tonight and I can't seem to write anything to it.
It powers up with my board and I get the Matrix Orbital splash screen and then the display ignores me.
The bottom of page 6 has an * on a paragraph that then goes on to talk about reading from the display. Under Table 3, the * seems to refer to read timing and sets out timing delays.
Are timing delays required when writing to the display? Currently I have none.
My code should be sending 50 as the address, FE as the command byte and then a hex value of a character or display function.
For example, I have set the following test code in place
Code: Select all
// Init LCD Module
set_AL202_I2C(MOI_address);
hello(MOI_address);
Code: Select all
void set_AL202_I2C(byte MOI_address)
{
Wire.beginTransmission(MOI_address); // Start I2C with Device Address
Serial.println("MOI_address : "); // 0x50
Serial.println(MOI_address, HEX);
Wire.send(MOI_command); // 0xFE
Serial.println("Command : ");
Serial.println(MOI_command, HEX);
Wire.send(MOI_I2C);
Serial.println("Set I2C "); // 160 Decimal
Serial.println(MOI_I2C, DEC);
Wire.send(MOI_2nd);
Serial.println("Val1 "); // 0
Serial.println(MOI_2nd, DEC);
Wire.endTransmission(); // Stop I2C transaction
//
delay(100);
}
void hello(byte MOI_address)
{
Wire.beginTransmission(MOI_address);
Wire.send(0x48);
Wire.send(0x45);
Wire.send(0x4C);
Wire.send(0x4C);
Wire.send(0x4F);
Wire.endTransmission();
//
}
The result I get is here:
Code: Select all
MOI_address :
50
Command :
FE
Set I2C
160
Val1
0
I would appreciate any and all suggestions (other than please give up and go back to using 7 segment displays driven through a MAX7219)
Also on this I2C bus is a DS1307 RTC which is running and keeping time quite nicely. That would indicate that my I2C connections are ok. If I crossed them when adding the display, the clock would not be working.
I have pullups (4.7K) to +5v on the SDA and SCL lines.
Thanks in advance
Tim Vukman