I2C - working with TDA7314 - newbie questions

Hello!
I'm trying to get my communication with TDA7314 (digital voulme/bass/treble control) and Arduino working.
I've connected it as described on the playground page.
Since the chip does not send any data, the only way to check if it is working is to get sound through the chip :slight_smile:

And I'm stuck.

Here what I use:

#include <Wire.h>

void setup()
{
  Wire.begin(); // join i2c bus (address optional for master)
  Wire.beginTransmission(B1001000); // 10010000 in datasheet, so I took last zero off for wire library
  Wire.send(B00100100);    // sets volume to -45dB
   Wire.endTransmission();    // stop transmitting

}
void loop()
{

}

So, here are my questions:

  1. Should it be enough? I mean the code above.
  2. What are LSB and MSB bites? Do I have to use them here? If so - how?
  3. Is there any way to check if chips are communicating? So I can exclude wiring/addressing problem.

Datasheet for TDA chip:
http://www.datasheetcatalog.org/datasheet/stmicroelectronics/1487.pdf

Thanks in advance!

Leonti

So, here are my questions:

  1. Should it be enough? I mean the code above.
  2. What are LSB and MSB bites? Do I have to use them here? If so - how?
  3. Is there any way to check if chips are communicating? So I can exclude wiring/addressing problem.

1, Probably not. The data sheet list 8 sequential bytes of control registers and most likely all of them should be written in order, so all the configuration set-up is accomplished.

2, As used in that data sheet MSB and LSB mean most significant bit and least significant bit. In each the 8 registers each bit has some meaning for the chip's configuration and you need to read the 8 register tables to figure out which bits need to be set or reset.

  1. In most I2C devices you can read back the registers and see if the value is the same as you wrote to it. If they match then all is good from a software point. Still lots of room for wiring errors or wrong component values, etc.

Unfortunately that data sheet does not show any programming examples or suggestions, just defines the registers and what the bits in each control. Perhaps if you google around you might find some application data sheets or other help for the chip number.

Good luck
Lefty

Thank for your answer! It helped to clarify some things for me.

My problem was my way of testing - I connected headphones to the audio output of the chip and it was too much for it, so that is why i wasn't getting any sound. Now it works.

Leonti