Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

programming CC1101 with Aurdino uno

Status
Not open for further replies.

aleenahina@gmail.com

Newbie level 3
Newbie level 3
Joined
Feb 13, 2014
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
31
hey,
i m trying to transmit and receive data using two cc1101 chips. i have configured one of them as transmitter while other as a receiver. but i m not being able to access the registers of either the transmitter or the receiver.

the code is attached along with the header files,

can someone guide plx?
 

Attachments

  • ELECHOUSE_CC1101.zip
    8.1 KB · Views: 60

If your have provided 5V supply to module then it is damaged. You have to provide 3.3V and if you interface it with microcontroller and micro is 5V type then you need voltage translator. If your arduino is powered with 3.3V then you can interface the module directly.
 

Hoc do you connect two CC1101 chips to a single SPI bus? There must be separate SS lines and also separate GDO0 inputs handled in the code.
 

If your have provided 5V supply to module then it is damaged. You have to provide 3.3V and if you interface it with microcontroller and micro is 5V type then you need voltage translator. If your arduino is powered with 3.3V then you can interface the module directly.



I have connected it with aurdino and powered aurdino using USB port. cc1101 is connected to the 3.3V pin of aurdino

- - - Updated - - -

Hoc do you connect two CC1101 chips to a single SPI bus? There must be separate SS lines and also separate GDO0 inputs handled in the code.

I have two aurdinos not 1... so i have conected one with the transmitter and other with the receiver....
 

You are postng the code provided with the Elechouse CC1101 modules. How do you determine that you don't acces the CC1101 registers? Are the modules connected to Arduino as expected by the software?
 

yeah i checked it........ besides there is another issue to begin with

i wrote this command
digitalWrite(SS_PIN,LOW);
delay (1000);
Serial.println (SS_PIN); // i get 10 in ascii

and if i connect led, it glows where as i thnk it shouldn't

and then if i write high to the same pin, it still returns me 10 in ascii

any idea???
 

I'm not familiar with Arduino libraries, but I guess SS_PIN is just a pin number. You are printing the pin number, not reading the pin state.

I also presume, Arduino has more effective debugging methods available, e.g. running code in single step and check it's operation?
 

i m trying to read the value of the configuration register FREQ0

here is the code


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
#include <ELECHOUSE_CC1101.h>
byte s;
void setup ()
{
Serial.begin (9600);
ELECHOUSE_cc1101.Init();
s= ELECHOUSE_cc1101.SpiReadReg(CC1101_FREQ0);
Serial.println(s);
}
void loop ()
{}





but this returns me 0 everytime........ where as i set its value as 0x62... can some 1 help plxxx?????
 
Last edited by a moderator:

Is this your code?


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <ELECHOUSE_CC1101.h>
 
byte s;
 
void setup () {
 
    Serial.begin(9600);
 
    ELECHOUSE_cc1101.SpiInit();
 
    s = ELECHOUSE_cc1101.SpiReadReg(CC1101_FREQ0);
 
    Serial.println(s);
 
}
 
void loop () {
 
}




Where are SPI pin defines? Where is SpiMode() function call?


Did you check this file?
 

Attachments

  • ardunio radio.zip
    6.6 KB · Views: 62
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top