The RadioHead driver, and probably also LowPowerLab's driver (independent software suites), the interrupt service routine (ISR) for the radio uses the SPI port. The ISR makes the assumption that it can use the SPI port at any time. When your LCD is using the SPI port, it can get interrupted by the radio's ISR and now we have a mess. The radio's ISR runs at the end of a transmitted or received packet.
The LCD software can disable interrupts while using the SPI port - that's brute force.
The LCD software can set the external interrupt mask bit for the radio's IRQ bit, while the LCD is using the SPI.
The LCD software can force the radio into its idle state (not receiving or transmitting cannot interrupt) - use the SPI port, then reenable the radio with a call to available()
ALso, there's an issue if the LCD and the radio want the SPI to be in different configurations, such as SPI clock frequency. Each device might initialize SPI at startup but do so differently.
This overall issue of SPI port-sharing, in the Arduino community, is known issue that arises because people develop drivers without think of SPI port sharing.
Paul at PJRC.com (teensy 3) has a library to manage SPI port sharing. But SPI-based devices have to use that library instead of the generic SPI library. The new library "SPI Transactions" is availble but slow to be adopted. It brings problems, too, such as: If some SPI-based device uses SPI Transactions to "own the SPI port" for a while, real-time devices like the data radios can on occasion miss an incoming message - if the port is "Hogged" too long. This happens at low SPI clock frequencies and/or large SPI transfer loops such as in an SD card.
So the 3 hacks, above, are all I can suggest.
This presumes that you do have a conflict with the radio's ISR as described above. If the LCD driver is already disabling interrupts while using the SPI, every time, everywhere, then there could be an issue with the two devices wanting the SPI bit rate or byte format to differ, and they don't reestablish the SPI port prior to each use. RadioHead only configures once.
This message was edited 1 time. Last update was at 07/11/2014 21:55:52