My TDA7318 audio mixer chip still makes some trouble: It seems to ignore all commands I send to it. On pages 9–11 of the datasheet, eight different commands are described, one byte per command. A command of “N bytes” + a stop byte at the end must be sent to the chip, but there is no mention of how much N must be:
The device seems not to have the usual registers. Here is an overview of the corresponding commands:
Now here is my question: Do I have to send all eight command bytes to the chip every time I’d like to change something?i2cShareEditFollowClose 3Flagedited 41 mins agotlfong013,80733 gold badges88 silver badges2222 bronze badgesasked yesterdayNeppomuk36733 silver badges1212 bronze badges
- 2The Pi is irrelevant to this question. – joan yesterday
- The TDA is controlled by the Pi’s I²C port. – Neppomuk yesterday
- 1The answer will be the same regardless of the type of computer or microprocessor connected to the I2C device, i.e. the question is a general one, not Pi specific. – joan yesterday
- OK, where shall I repost the question then? – Neppomuk yesterday
Rpi I2C audio mixer TDA7318 communication problem: Should all command bytes sent each time?
The short answer is NO. You only need to send the command bytes needed.
- TDA7318 uses standard I2C to interface with Rpi. The only constraint is that the highest I2C bus speed is 100kHz.
- Datasheet Page 5 of datasheet specifies the following:2.1 VIL Input Low Voltage = max 1 V2.2 VIH Input High Voltage = min 3 VRpi GPIO High is usually above 3V, Low below 1V, so no 3V3 to 5V0 logical level converter is required.WARNING: Datasheet specifies that pull up resistor must be used for SCL and SDA wires. It is important not to connect pullup resistors to 5V, or 6~9V Vcc, otherwise the Rpi GPIO pins might be latched up and fried. The correct way is to pull up 3V3 (Rpi 3V3 rail, external 3V3 PSU, or 3V3 divided down from 5~9V).
- The interface protocol (Page 9 of datasheet) comprises:a. A start condition (s)b. A chip address byte, …c. A sequence of data (N-bytes + acknowledge)d. A stop condition (P)
- These are the command bytes you can send:4.1 Speaker ATT RR4.2 Speaker ATT LF4.3 Speaker ATT RF4.4 Audio switch4.5 Bass control4.6 Treble control
- In other words, you can send a least 1 command, at most 6 commands at a time.
Appendix A – TDA7318 I2C Protocol