FM-Transmitter using wire-library issue

Hello,

I'm currently working on a project which will modulate MP3-audio etc. into the RF-band. In a second step i'll add RDS-information. The purpose is to send audio-files to a closed ranged radio, so MP3-players can play music in a car etc. The IC I've chosen is the SN761633 and is programmable through I2C, so I'll need the wire-library.

In the datasheet I found this table which describes the settings that can be adjusted using I2C.

I figured the first line(adress) should be in the begintranmission, followed by Wire.send commando, which will send all my configuration bytes to the Transmitter.

Wire.beginTransmission('11000110');
        Wire.send(data1);  //   byte data1 = '00101001';
        Wire.send(data2);  //  byte data2=  '01101010';
        Wire.send(data3); //   byte data3=  '01101110';
        Wire.send(data4); //   byte data4=  '00001110'; 
        Wire.send(data5); //  byte data5=  '01001110';
        Wire.endTransmission();

The IC is configured using the application circuit suggested in the datasheet and I added 2 pull-up resistors to the I2C-lines.

Now the thing is I can't get it too work and I checked and double-checked the datasheet if there're aren't any loopholes I have to take care off. The software runs fine, but the data somehow does not reach the transmitter.

Any help would be very much appreciated.

My code:

#include <LiquidCrystal.h>
#include <Wire.h>

int TransmissionOK;
int entrance=A0;
int check;
int startup;
int yet;

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup()
{
  Wire.begin();
}

void loop()
{
  byte data1 = '00101001';
  byte data2=  '01101010';
  byte data3=  '01101110';
  byte data4=  '00001110'; 
  byte data5=  '01001110';
  
  if(startup==0){
   lcd.clear();
   lcd.begin(16,2);
   lcd.print("TransmissionStart");
   startup=1;}
 
  TransmissionOK=digitalRead(entrance);
  if(TransmissionOK==1 & yet==0){  
        Wire.beginTransmission('11000110');
        Wire.send(data1);
        Wire.send(data2);
        Wire.send(data3);
        Wire.send(data4);
        Wire.send(data5);
        Wire.endTransmission();
        check=1;
        yet=1;
        }
   if(check==1){
   lcd.clear();   
   lcd.begin(16,2);
   lcd.print("Current frequency");
   check=0;
   }   
}

The address you should use is 0x63 not as you are doing 0xC6. This is because that table shows the least significant bit of the address as the read / write bit. In the wire library there are different commands for read and write so this bit is not included in the address.

Thanks for the quick reply. I changed the code and still not working though. I checked the print design again and everything should be connected and soldered fine. So I'm guessing there is still something wrong with the transmission of the bytes. That's because I changed one of the bytes, so the pilot OUT would be active, but I don't meassure anything with a scope.

When I try to capture the datastream with a scope, it only sends one byte, that I don't recognise in my programming.

Thanks in advance.

What is this stange way of initializing a variable :

byte data1 = '00101001';

byte data1 = B00101001; !!!!!!!!!!!!!!!!

http://arduino.cc/en/Reference/Byte

I suppose that byte data1='00101001'; wille just assign '0' (the first byte) to data1....

Thank you!I can meassure a signal now on the atenna with the right frequency. I still have an issue putting the audio on it, but i'm pleased that I can communicate between the arduino and tranmitter.

This:

if(TransmissionOK==1 & yet==0)

may work, but I suspect you meant:

if(TransmissionOK==1 && yet==0)