I'm making an application and I need to communicate with my TV via HDMI CEC.
At first I'm testing an IC called TDA9950 from NXP. It is an HDMI CEC to I2C BUS converter.
I'm having difficulties setting up and starting communication.
Could someone help me giving an opinion analyzing my code sequence? I think it is necessary check the datasheet to check....
I'm try check in the serial monitor messages received.
#include <Wire.h>
void Read_TDA9950(){
Wire.beginTransmission(0x34); // TDA9950 ADDRESS 0x34
Wire.write(0x00); // Send WRITE "0"
Wire.write(0x07); // Register 0x07 - REG_CDR
Wire.endTransmission(false); // re-start
Wire.write(0xFF); // Send READ "1"
Wire.endTransmission();
Wire.requestFrom(0x34,7, true);
int a = Wire.read();
Serial.println(a);
}
void Config_TDA9950(){
Wire.beginTransmission(0x34);
Wire.write(0x00); // Send WRITE "0"
Wire.write(0x04); // Register 0x04 - REG_ACKH
Wire.write(0x00); // ACKH 00h
Wire.write(0x20); // ACKL 20h (5 HDMI 1.3a)
Wire.endTransmission();
Wire.beginTransmission(0x34);
Wire.write(0x00); // Send WRITE "0"
Wire.write(0x03); // Register 0x03 - REG_CCR
Wire.write(0x40); // Set TDA9950 ON
Wire.endTransmission();
delay(10);
}
void Reset_TDA9950(){
Wire.beginTransmission(0x34);
Wire.write(0x00); // Send WRITE "0"
Wire.write(0x03); // Register 0x03 - REG_CCR
Wire.write(0x80); // Reset TDA9950
Wire.endTransmission();
delay(10);
}
void setup() {
Wire.begin();
Serial.begin(9600);
pinMode(11,INPUT); // INT PIN FROM TDA9950
Config_TDA9950();
}
void loop() {
Read_TDA9950();
delay(500);
}
In the TV I can't show nothing in the serial port and de INT pin of TDA9950 never change to high.
Thanks all