Go Down

Topic: (RFM01 receiver and RFM02 transmiter) vs RFM12B (Read 2912 times) previous topic - next topic

MacXPablo

Hello!

Researching a bit I've realised that RFM12B is very popular between arduino fans ;) There is even a library for it.

However, it is more difficult to find a project with a just transmitter and a receiver as RFM01 and RFM02.
I have found this library for these two components

With this library, can I have them working without configuring anything else? I mean, installing the library is enough? (using an ATmega328)

Does it worth it using this library instead of the one for RFM12B that is more popular just for saving some euros? (I suppose 2 RFM12B are more expensive than the other option)

Thank you!

johnwasser

The RFM12B is a Transceiver (send and receive)

The RFM01 and RFM02 are Receiver and Transmitter, respectively.

I guess if you want bi-directional communication you would be better off with RFM12B at each end instead of both RFM01 and RFM02 at both ends.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

MacXPablo

Yes I know it. My dilemma is that I would like to use a library in C and it seems that the library for the transceiver is more popular and therefore probably more reliable.

I only want one-direction communication and I know using a transceiver is not coherent, but that library....

MacXPablo

#3
Dec 07, 2012, 08:13 pm Last Edit: Dec 07, 2012, 08:14 pm by MacXPablo Reason: 1
I am trying to understand the library for the RFM01&02

I would like to understand this:
Code: [Select]

#define SDI 0 // SDI,  -> RF02   Atmega PB0 Arduino 8
#define SCK 1 // SCK,  -> RF02   Atmega PB1 Arduino 9
#define CS 2 // nSEL, -> RF02   Atmega PB2 Arduino 10
#define IRQ 4 // nIRQ, <- RF02   Atmega PB4 Arduino 12
//------------------// FSK: Pullupto VCC


Why these connections? I mean, for example, the SCK from RF02 is connected to Arduino (with Atmega168) pin 9. This pin is PB1(OC1A/PCINT1). The datasheet says this about this pin:

Quote
OC1A/PCINT1 - Port B, Bit 1
OC1A, Output Compare Match output: The PB1 pin can serve as an external output for the Timer/Counter1 Compare Match A. The PB1 pin has to be configured as an output (DDB1 set (one)) to serve this function. The OC1A
pin is also the output pin for the PWM mode timer function.
PCINT1: Pin Change Interrupt source 1. The PB1 pin can serve as an external interrupt source.



Acording to this image:

Where is the logic?

And in the datasheet of atmega you find this:
http://s2.subirimagenes.com/otros/8169302spi-pin.jpg


johnwasser


Code: [Select]

#define SDI 0 // SDI,  -> RF02   Atmega PB0 Arduino 8
#define SCK 1 // SCK,  -> RF02   Atmega PB1 Arduino 9
#define CS 2 // nSEL, -> RF02   Atmega PB2 Arduino 10
#define IRQ 4 // nIRQ, <- RF02   Atmega PB4 Arduino 12

Where is the logic?


If the pin spacing is 0.1 inch (2.54 mm) the logic is that you can plug the radio right into the Arduino pins:
Code: [Select]

#define SDI 0 // SDI,  -> RF02   Atmega PB0 Arduino 8
#define SCK 1 // SCK,  -> RF02   Atmega PB1 Arduino 9
#define CS 2 // nSEL, -> RF02   Atmega PB2 Arduino 10
//                     3      //                                        Arduino 11
#define IRQ 4 // nIRQ, <- RF02   Atmega PB4 Arduino 12
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

MacXPablo

#5
Dec 08, 2012, 06:11 pm Last Edit: Dec 08, 2012, 06:13 pm by MacXPablo Reason: 1
So, it doesn't matter that the atmega has a pin with the funcion SCK? You can choose other pin and do by software your own "clock" signal?

Edited:
Ok, I've realised that I am mixing everthing. The SCK pin is for SPI (Serial Peripherical Interface) and in this library they do not use SPI...am I correct?


Go Up