1

I trying to make a project to write and i2c display from a renault megane vehicle. There is many people showing it but there is no code that i can use.

So i buy a cheap analyzer and i can clearly see what radio says to display.

Now i try to do it with arduino... but there is something wrong... i can just read a sequence of "01000110" thats i think that is begin transmission ... but what i write with "Wire.write" is not sending or something... Im so frustrating ... if anyone can tell me why im not receiving more data than 01000110 will be awesome. I will give 2 screens to let us know more.

This is the sniff from the radio

Display i2c data

This is the sniff from my code

Arduino i2c data

As you can see only the 01000110 bits is same for both, but there is no more data...

This is my arduino code

    #include <Wire.h>
int _mrq = 2;
void setup() {
  pinMode(_mrq, OUTPUT);
  digitalWrite(_mrq, HIGH);

  Wire.begin();
  Wire.setClock(7140);
  Wire.beginTransmission(0x23);
  delay(500);
  digitalWrite(_mrq, LOW);
  sendInit(0x01, 0x01);
  digitalWrite(_mrq, HIGH);
  delay(100);
  digitalWrite(_mrq, LOW);
  sendInit(0x01, 0x10);
  digitalWrite(_mrq, HIGH);
  Wire.endTransmission();
}

void loop() {
  delay(500);
  Wire.beginTransmission(0x23);
  digitalWrite(_mrq, LOW);
  sendInit(0x01, 0x01);
  Wire.write(0x0c);
  Wire.write(0x90);
  Wire.write(0x7e);
  Wire.write(0x72);
  Wire.write(0x01);
  Wire.write(0x20);
  Wire.write(0x4c);
  Wire.write(0x4f);
  Wire.write(0x53);
  Wire.write(0x34);
  Wire.write(0x30);
  Wire.write(0x20);
  Wire.write(0x20);
  sendInit(0x01, 0x11);
  digitalWrite(_mrq, HIGH);
  Wire.endTransmission();
  delay(1);
}

void sendInit(int a, int b)
{
  delay(20);
  Wire.write(a);
  delay(100);
  Wire.write(b);
  delay(20);
}
10
  • so, what is your question? – jsotola Mar 21 '20 at 21:56
  • The NAK that you're getting is stopping any further communication. Either whatever you're sending to doesn't like what you're sending, or it's wired up wrong. – Majenko Mar 21 '20 at 22:02
  • Please tell us, how everything is wired up. Also: What voltage levels do the Atmega2560 and the I2C display use? – chrisl Mar 21 '20 at 23:31
  • @chrisl I have 3 cables, PIN 2 is MRQ that is a stuff that use radio / display, and pin 20 and 21 (SDA/SCL) display uses 12v but sda/scl is digital and works from 0 to 5. – Javilico Mar 22 '20 at 8:02
  • 1
    yep, i added a 500 microseconds after and before endTransmission – Javilico Mar 23 '20 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.