[SOLVED] ILI9431 problem
lapgoch Sat Feb 24, 2018 2:39 am
I am looking for some help.
I have an existing sketch that works ok.
The sketch is used to unlock a door with a rfid card.
It uses a Maple Mini with an ENC28J60 and MFRC522 on the SPI bus.
I would like to add a ILI9431 tft display to show some door entry messages.
When I add the tft display to the same SPI bus and run a basic tft sketch only , the tft display works ok.
When I add the same basic tft sketch to my door lock sketch and run the total sketch I have problems.
The problem is that the ENC28J60 and MFRC522 still work ok , but very slowly.
The ILI9431 tft display only updates one pixel at a time incredibly slowly.
Does anyone know why the ILI9431 is conflicting with the ENC28J60 / MFRC522.
Here is the tft sketch
// tft screen setup
#define CS_TFT PA8
#define DC_TFT PB12
#define RST_TFT PA1
#include <Adafruit_GFX_AS.h>
#include <Adafruit_ILI9341_STM.h>
Adafruit_ILI9341_STM tft = Adafruit_ILI9341_STM(CS_TFT, DC_TFT, RST_TFT);
void setup() {
tft.begin();
tft.setRotation(1);
}
void loop() {
tftDisplay();
}
void tftDisplay() {
tft.setTextSize(1);
tft.fillScreen(ILI9341_BLACK);
tft.setTextColor(ILI9341_RED);
tft.drawString("01234",0,0,7);
tft.drawString("56789",0,120,7);
delay(1000);
tft.setTextSize(2);
tft.fillScreen(ILI9341_BLACK);
tft.setTextColor(ILI9341_YELLOW);
tft.drawString("1234",0,0,7);
tft.drawString("Lapgoch",50,140,4);
delay(1000);
}
