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.
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.
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.
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!
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.