Project

General

Profile

RFM12B Board on ATMEGA2650 is not working

Added by Rob over 5 years ago

Hi,
I have no RF activity (Send nor receive) while using the RFM board on a Arduino ATMEGA 2560.
As example I am running the RF12Demo (12) between arduinos (ATMEGA or UNO) and a Jeenode (V6).
Everything is working fine with Arduino UNO and the JeeNode (not between the ATMEGA and the JeeNode)
I am using exactly the same RFM12 Board and connections between the ATMEGA and the UNO.
Frequency is settings is correct (433MHz) for the ATMEGA

I have check the ATMEGA SPI pins definition (50-MISO, 51-MOSI, 52- SCK, 53-SS) and IRQ 0 on PIN 2.
I did check the SPI interface of the ATMEGA and a Ethernet Shield without problem
I did a IRQ check of IRQ 0 which is also working fine.
It looks that there is no dialogue with the RFM Board (program hang while sending data)

Any Idea of what should be the problem or how I should check the SPI interface / dialogue with the RFM Board?

Thanks in advance
Robert


Replies (11)

RE: RFM12B Board on ATMEGA2650 is not working - Added by JohnO over 5 years ago

I’m not aware of anyone using a 2560, could you post some photographs of your setup. I take it that you have sorted out the 5v to 3v3 situation.

RE: RFM12B Board on ATMEGA2650 is not working - Added by Rob over 5 years ago

Hi,
The RFM board is connected to the 3v3 output of the Arduino.
The layout below shows the connexions

Robert


RE: RFM12B Board on ATMEGA2650 is not working - Added by JohnO over 5 years ago

Yes, and it looks as if your SPI is passed through the voltage divider as required.

RE: RFM12B Board on ATMEGA2650 is not working - Added by JohnO over 5 years ago

I can’t find the appropriate documentation of the board you are using but it looks a little odd in that you have.

10 - CS
11 - MOSI
12 - MISO
12 - CLK

The library needs to see:

PB0 - CS
PB1 - CLK
PB2 - MOSI
PB3 - MISO

I don’t expect that your board would have PB0 — PB3 out of order as your cabling suggests. Just a thought, could you do a LED test and pulse PB0 to PB3 to verify you have the corrected physical connection points?

RE: RFM12B Board on ATMEGA2650 is not working - Added by martynj over 5 years ago

@Rob,

Just to confirm, the LDO is absent and the six resistors are soldered in?

RE: RFM12B Board on ATMEGA2650 is not working - Added by Rob over 5 years ago

Yes this is correct the RFM is powered with 3v3 and the Atmega signals are adapted from 5v to 3v3 via the resistor.

Robert
On 20 Oct 2014, at 14:08, redmine@jeelabs.net wrote:

RE: RFM12B Board on ATMEGA2650 is not working - Added by Rob over 5 years ago

I will check at the documentation of the ATMEGA 256 to verify the pinout and pin functions. (and the option in the RFM12.cpp library, I will come back if I see any difference
NB:
As far as I understand, the pin numbering of the ATMEGA board is using the same basic scheme as the UNO.
On top of that the Ethernet shield (that uses the SPI I/F) is fully compatible with the ATMEGA and it is working on both boards.
Robert
On 20 Oct 2014, at 13:56, redmine@jeelabs.net wrote:

RE: RFM12B Board on ATMEGA2650 is not working - Added by JohnO over 5 years ago

The library wants to see:

#define SPI_SS      10    // PB2, pin 16
#define SPI_MOSI    11    // PB3, pin 17
#define SPI_MISO    12    // PB4, pin 18
#define SPI_SCK     13    // PB5, pin 19

for the Uno.

RE: RFM12B Board on ATMEGA2650 is not working - Added by Rob over 5 years ago

OK I see my mistake,

The RF12.ccp specifies:

#if defined(AVR_ATmega2560) || defined(AVR_ATmega1280)

#define RFM_IRQ 2
#define SS_DDR DDRB
#define SS_PORT PORTB
#define SS_BIT 0

#define SPI_SS 53 // PB0, pin 19
#define SPI_MOSI 51 // PB2, pin 21
#define SPI_MISO 50 // PB3, pin 22
#define SPI_SCK 52 // PB1, pin 20

On UNO pin 10.. 13 (SPI) are also connected to the ISCP connector which allows to plug the RFM Board on pins 10..13
On ATMEGA pin 50..53 (SPI) are only connected to the ISP, meaning that I have to connect the RFM Board on the ICSP or on pins 50..53.

The Ethernet shield is working on both modules because it connects to SPI with the ICSP connector and not via Pins 10..13

I will test a new configuration and update the drawing with the new configuration once it works

Thanks for your support
Robert

On 20 Oct 2014, at 17:25, redmine@jeelabs.net wrote:

RE: RFM12B Board on ATMEGA2650 is not working - Added by JohnO over 5 years ago

An excellent addition to our body of knowledge.

    (1-11/11)