SOFT-SPI on Arduino Nano
-
My goal is to connect an LCD to Arduino Nano. I'm using Arduino Nano because of it's small size. Since SPI port is used by NRF24 module, is it possible to enable SOFT-SPI on arduino nano and connect the LCD to it?
-
@foad62 - what kind of LCD is it?
I used i2c instead to connect my LCD to avoid conflict with SPI and it worked great. (Sorry, dont know the answer to your qustion about soft-spi).
-
It is 1.8" TFT LCD (TFT-LCD-ST7735).
I'm not sure if it supports I2C connection!
-
-
You could try sharing the SPI bus.. In most cases it will work, only W5100 ethernet module is special, in that way it doesn't tri-state the MISO line when it's not deselected with the normal CS line..
Just pick a separate pin for CS for the display, than the one for the NRF module, and configure your TFT library accordingly.
-
@foad62 I don't know if it helps but you can modify the default pins MySensors expects the NRF chip to be connected to. Here is an example, works on my Nano with MySensors 2.0:
#define MY_RADIO_NRF24 #define MY_SOFTSPI #define MY_RF24_CE_PIN 11 #define MY_RF24_CS_PIN 6 #define MY_SOFT_SPI_SCK_PIN 10 #define MY_SOFT_SPI_MISO_PIN 9 #define MY_SOFT_SPI_MOSI_PIN 7 #include <SPI.h> #include <MySensors.h>
In my case I didn't try connecting another SPI device, I just moved the pins for easier NRF soldering on a perfboard.
-
@tbowmo
Thank you. I'll give it a try.
Suggested Topics
-
Arduino Celebrates 10 years (Malmö/Sweden)
Announcements • 29 Mar 2014, 17:08 • hek 29 Mar 2014, 17:08 -
(SOLVED) Sensebender Gateway and HomeAssistant: where does the battery level come from?
Development • 6 Jan 2024, 19:27 • pikim 6 Jan 2024, 19:27 -
LAN8720A - will mysensors work with this module
Development • 13 Nov 2024, 17:06 • Marcin 15 Nov 2024, 10:59 -
MQTT GW on ESP8266 supporting SSL/TLS?
Development • 4 Jun 2024, 10:21 • bgunnarb 27 Jun 2024, 13:53 -
MYSController with MQTT Gateway (via Node Red)
Development • 11 Aug 2024, 22:35 • slt1 11 Aug 2024, 22:35 -
Gateways
Development • 6 Feb 2024, 01:16 • OldSurferDude 6 Feb 2024, 14:22