I've narrowed this problem down to a SCK - pin 13 problem and logic level conversion. I thought I'd run it by the brain trust to see if someone recognizes the problem.
I have one of the HopeRF 915Mhz modules (3.3V) that I'm trying to interface to an Uno. But I'm running into odd problems running SCK through a logic level converter. Here's what I've found:
1) If you hook this up to an Arduino (I've tried an Uno and a Ruggeduino) directly, it will work perfectly (of course, at 5V you'll cook the RFM module pretty quickly.)
2) If you hook this up to a Nano, at 3.3V, it will also work perfectly.
3) Of course, you need to logic-level shift the Arduino outputs for the Uno. You can skip level-shifting the INT and MISO lines, since the Arduino will handle 3.3V as a logical high.
4) Here comes the oddness. I've tried three different bi-directional logic level converters (different break-outs, not just three of the same design) as well as a set of voltage dividers. I can get things to work with the logic-level converters for SS and MOSI, but not SCK. But I can get things to work well with SCK on the voltage divider.
5) Thinking this may be some really odd power problem, I hooked the RFM to its own external power. That improved the signal considerably, but did nothing to solve the SCK problem.
6) Thinking I need to slow down the clock, I added the spi.begintransaction code to the original library. I think it probably is slowing the clock when I turn down the clock speed parameter, but it still only works on the voltage divider.
I totally don't get the SCK problem. The logic level converters should be much faster than the voltage divider, so it shouldn't be a signal timing issue.
One interesting note - the voltage coming out of my divider is actually a little high - 3.5V, and the voltage I'm reading at the logic converters is around 2.8V.
Thanks for any ideas!
[Mods - this is a new topic that I also posted to the most-relevant looking old post. I'm not sure if this is a general SPI problem I've never seen before or something specific to these radio modules.]