I have this right now.
But no luck with the screen.
first command i send is a 0x00
which should be acknowledged with a 0x75
i see i get a 0 back but when i disconnect the screen i also receive a 0
#define write_data_addr 0x0c //slave addresses with write data
#define read_data_addr 0x0d //slave addresses with write data
#define write_cmd_addr 0x0e //slave addresses with write command
#define read_cmd_addr 0x0f //slave addresses with read status
void LCD_CmdWrite(unsigned char cmd) {
Wire.beginTransmission(write_cmd_addr);
Serial.println(cmd,HEX);
Wire.write(cmd);
Wire.endTransmission();
}
//////////////SPI Write data or parameter
void LCD_DataWrite(unsigned char Data) {
Wire.beginTransmission(write_data_addr);
Serial.println(Data,HEX);
Wire.write(Data);
Wire.endTransmission();
}
///////////////Read data or parameter
unsigned char LCD_DataRead(void) {
unsigned char Data;
Wire.requestFrom(read_data_addr, 1);
while (Wire.available()) {
Data = Wire.read();
Serial.println(Data, HEX); }
return Data;
}
////////////////Write command and parameter
void Write_Dir(unsigned char Cmd, unsigned char Data) {
LCD_CmdWrite(Cmd);
LCD_DataWrite(Data);
}
///////////SPI Read status
unsigned char LCD_StatusRead(void) {
unsigned char Data;
Wire.requestFrom(read_data_addr, 1);
while (Wire.available()) {
Data = Wire.read();}
return Data;
}