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;
}
}