Hello. I have peculiar problem with SPI lcd ILI9341. When using hardware SPI, screen goes white, but when I use "software" SPI screen works well (very slow but works). I tried examples from Adafruit library and Ucglib library, in both cases it's the same: "hardware configuration" white screen, "software configuration" example works well.
This doesn't bother me much, problem is that the LCD has touch panel which I can't make it work. All examples, for touch panel, are for harware SPI, I tried some examples but didn't work . Driver for touch panel is Xpt2046.
Can anyone have idea if touch panel could work on "software SPI" and how to connect touch panel to arduino, and of course example program would be great.
first part of program that works OK "software SPI", Ada example:
/***************************************************
This is our GFX example for the Adafruit ILI9341 Breakout and Shield
----> http://www.adafruit.com/products/1651
Check out the links above for our tutorials and wiring diagrams
These displays use SPI to communicate, 4 or 5 pins are required to
interface (RST is optional)
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried/Ladyada for Adafruit Industries.
MIT license, all text above must be included in any redistribution
****************************************************/
#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
// For the Adafruit shield, these are the default.
#define TFT_DC 9
#define TFT_CS 10
#define TFT_MOSI 11
#define TFT_CLK 13
#define TFT_RST 8
#define TFT_MISO 12
// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
//Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
// If using the breakout, change pins as desired
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_CLK, TFT_RST, TFT_MISO);
I'm using:
clone arduino uno,
2,8" LCD (https://www.aliexpress.com/item/4001143078353.html?spm=a2g0s.9042311.0.0.27424c4dtXcG2i)
CD4050BE
pictures added. adafruit's serial monitor outputs. wiring, programs. photo of lcd.
excuse my mistakes in writing, english is not my native language