(RFM01 receiver and RFM02 transmiter) vs RFM12B

Hello!

Researching a bit I've realised that RFM12B is very popular between arduino fans :wink: 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!

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.

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....

I am trying to understand the library for the RFM01&02

I would like to understand this:

#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:

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

MacXPablo:

#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:

#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

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?