I have been working on and off for the past couple of days to connect to an RFM12 and an SD Card via SPI from an ATmega328P for a data logger application I am building.
Does anyone have something like this working?
The ATmega328P is running at 3.3V and 8mhz. The RFM12 is setup to use pin 16 for SS and the SD Card is setup to use pin 13 for SS. The other SPI pins are connected to both devices.
I pretty quickly reached the point where I could successfully communicate to either of the devices in a program with both of them connected to the ATmega328P. However, integrating the two sets of code together so I can communicate to both of them in the same program has been slow going.
The first issue was that I was using pin 14 for SS on the SD Card and for some reason it was getting set high and low if the RFM12 was initialized in software. This would cause the SD Card to seize MISO and not let go. Moving to pin 13 has fixed this.
The second issue that I addressed was that the SD Card needs a byte sent by the ATmega328P after de-asserting SS before it releases MISO.
Now I think I am to the point where I have to figure out how to handle the interrupts the RFM12 is generating.
More to follow...