Hey Jerome,
My name is Vidya . I am also trying to get my CC1101 to work wiht the arduino . I am alos using the ELECHOUSE libraries and trying carrier frequency of 432MHZ but i am not sure if it si writing into the register at all . I see two of my leds blinkinf which is tge red and the yellow led . I am using a SmartRF studio . The code i am using for transmitting is
#include <ELECHOUSE_CC1101_2560.h>
#define size 61
byte TX_buffer[size]={0};
byte i;
void setup()
{
Serial.begin(9600);
ELECHOUSE_cc1101.SpiInit();
ELECHOUSE_cc1101.Init();
for(i=0;i<size;i++)
{
TX_buffer[i]=i;
}
}
void loop()
{
ELECHOUSE_cc1101.SendData(TX_buffer,size);
//Serial.println(" Transmitting Data");
delay(1);
}
The register settings are :
SpiWriteReg(CC1101_FSCTRL1, 0x0B);
SpiWriteReg(CC1101_FSCTRL0, 0x00);
SpiWriteReg(CC1101_FREQ2, 0x10);
SpiWriteReg(CC1101_FREQ1, 0xA7);
SpiWriteReg(CC1101_FREQ0, 0x62);
SpiWriteReg(CC1101_MDMCFG4, 0x2D);
SpiWriteReg(CC1101_MDMCFG3, 0x3B);
SpiWriteReg(CC1101_MDMCFG2, 0x73);
SpiWriteReg(CC1101_MDMCFG1, 0x22);
SpiWriteReg(CC1101_MDMCFG0, 0xF8);
SpiWriteReg(CC1101_CHANNR, 0x00);
SpiWriteReg(CC1101_DEVIATN, 0x00);
SpiWriteReg(CC1101_FREND1, 0xB6);
SpiWriteReg(CC1101_FREND0, 0x10);
SpiWriteReg(CC1101_MCSM0 , 0x18);
SpiWriteReg(CC1101_FOCCFG, 0x1D);
SpiWriteReg(CC1101_BSCFG, 0x1C);
SpiWriteReg(CC1101_AGCCTRL2, 0xC7);
SpiWriteReg(CC1101_AGCCTRL1, 0x00);
SpiWriteReg(CC1101_AGCCTRL0, 0xB2);
SpiWriteReg(CC1101_FSCAL3, 0xEA);
SpiWriteReg(CC1101_FSCAL2, 0x0A);
SpiWriteReg(CC1101_FSCAL1, 0x00);
SpiWriteReg(CC1101_FSCAL0, 0x11);
SpiWriteReg(CC1101_FSTEST, 0x59);
SpiWriteReg(CC1101_TEST2, 0x88);
SpiWriteReg(CC1101_TEST1, 0x31);
SpiWriteReg(CC1101_TEST0, 0x0B);
SpiWriteReg(CC1101_IOCFG2, 0x0B); //serial clock.synchronous to the data in synchronous serial mode
SpiWriteReg(CC1101_IOCFG0, 0x06); //asserts when sync word has been sent/received, and de-asserts at the end of the packet
SpiWriteReg(CC1101_PKTCTRL1, 0x04); //two status bytes will be appended to the payload of the packet,including RSSI LQI and CRC OK
//No address check
SpiWriteReg(CC1101_PKTCTRL0, 0x05); //whitening off;CRC Enable£»variable length packets, packet length configured by the first byte after sync word
SpiWriteReg(CC1101_ADDR, 0x00); //address used for packet filtration.
SpiWriteReg(CC1101_PKTLEN, 0x3D); //61 bytes max length
}
IS there any address required for the transmitter and the receiver side ? please do help out i really want to get it to wokr . This is for a project for the ADler planeterium Chicago where I am a volunteer