nRF + LiquidCrystal ISSUE

Hey guys,
I am working on an embedded device for a school assignment and I am using an Uno board to receive commands from 6 buttons (4 options, "erase" and "send"). This project requires me to use a nRF24L01 to send the array of user inputs to another arduino and also to display the options and messages to the user through a 16x2 Liquid Crystal display.

I have tested separately the program to just get the inputs, build the array and display the user interface through the liquid crystal that works fine, also I have another program that sends an array which I am able to receive successfully in the other arduino.

The problem appears when I integrate both features in a single program. The Liquid Crystal simply doesn't work no matter what I do!

Attached are the two programs. I really hope you guys can give me a hand! Cheers.

_20170707_SmartWaiter_ver5.ino (3.55 KB)

_20171014_Client_Tx_ver2.ino (2.75 KB)

#include <RF24.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

The arduino/radio communications are over the SPI bus. Pins 11 and 12 are are the MOSI and MISO pins for that bus on the Uno.. Put the lcd on two different pins.

but they already are!

I am using 11 and 12 for the Liquid Crystal and the ICSP 1 and 5 for the nRF.

It still doesn't work! :<

Take a look at the Uno schematic ICSP 1 and 3 are tied to MOSI and MISO. Pin 5 goes to reset, so I think you must have meant pin 3. Pins 11 and 12 also the MOSI and MISO lines and are connected to ICSP 1 and 3.

sorg:
It still doesn't work! :<

Post your revised program and also post a photo of a pencil drawing showing all the connections.

...R

Maybe I have some misconcept about ISP comm protocol. I need to use all peripherals attached to the same MISO and MOSI, right?

I made it on Paint, sorry for the bad quality.

I am really annoyed it's not working. I have a short deadline on this!

Image from Reply #6 so we don't have to download it. See this Image Guide

...R

The pins in the ICSP header are the same, electrically, as pins 11, 12 so you can't use 11 and 12 for anything else.

...R

On the Mega you wouldn't have the same problem as the SPI pins on the ICSP header are pins 50..53
on that board, not 10..13.

Guys, thanks for your help.

In fact my issues were:

I was using the same MISO and MOSI pins for both LiquidCrystal and nRF (because ICSP MISO and MOSI are internally connected to digital pins 13 and 12)

Also, my LiquidCrystal is not operating on ISP mode, so different pins are needed indeed. I've changed the Display pins 13 as 12 to 10 and 9 and now this part of my project works!

Thank you

Sorg

sorg:
I've changed the Display pins 13 as 12 to 10 and 9 and now this part of my project works!

For the future be aware that Pin 10 on an Uno also has special significance for SPI. It does not have to be used as part of the SPI process but it must be set as OUTPUT if the Uno is to act as an SPI master.

Using Pin 10 to write data to the display is fine.

...R