Project

General

Profile

Resolved: RFM69CW and DS3234 RTC

Added by zooto68 over 4 years ago

Does anybody know any reason why I am unable to get an RFM69CW to work with an DS3234 RTC IC?

As soon as I connect the DS3234 to the SPI bus I get “Radio is absent” messages in RFM12_Demo.

The IC is connected correctly and i’ve checked all connections.

Thanks,

Mike


Replies (7)

RE: RFM69CW and DS3234 RTC - Added by JohnO over 4 years ago

“Radio is absent” means that the library didn’t get the correct responses when configuring the radio card. Have you made arrangements to toggle the chip select pins of the two devices? I’m guessing a lot of work would be required on the library to support sharing the SPI with the radio - I’m not sure it would be an appealing approach. Could you use software SPI on some other pins or an i2c RTC?

RE: RFM69CW and DS3234 RTC - Added by jcw over 4 years ago

Multiple devices on the same SPI bus need different chip select pins, and in the case of the RFM?? radio’s also some careful interrupt handling.
Please describe how all the pins are connected.

-jcw

RE: RFM69CW and DS3234 RTC - Added by zooto68 over 4 years ago

OK i’ve fixed that issue. The radio needed 3.3v and teh DS3234 breakout needed 5v.

However, I am now experiencing corrupted communication between the two and corrupted serial output in the Serial Monitor too.

Are you saying the two SPI devices probably wouldn’t work together?

I was under the impression SPI devices could share a bus?

Mike

RE: RFM69CW and DS3234 RTC - Added by jcw over 4 years ago

Yes, you can share SCLK, MISO, and MOSI. Can’t share the chip select.

The radio’s use interrupts. That means they’ll grab the SPI bus and use it whenever an interrupt comes in. One way to use the same bus with another device is to disable interrupts as long as you’re using that SPI bus.

RE: RFM69CW and DS3234 RTC - Added by zooto68 over 4 years ago

Yeah I was using pins 10 for the radio and pin 8 for the RTC.

It looks like the interrupts are disrupting the comms over SPI to the RTC.

I’ll use an DS1307 instead as it uses I2C.

RE: RFM69CW and DS3234 RTC - Added by zooto68 over 4 years ago

Unless it is easy to disable/re-enable the interrupts?

RE: RFM69CW and DS3234 RTC - Added by martynj over 4 years ago

Easy - yes. Getting it right - no.
Since the traffic bandwidth to the RTC is likely small, using I2C seems a simpler match.

    (1-7/7)