uC32 Doesn't recognize any TFT / LCD Screens

VHDL-BPA
Posts: 11
Joined: Tue Dec 27, 2016 7:19 pm

uC32 Doesn't recognize any TFT / LCD Screens

Post by VHDL-BPA » Tue Dec 27, 2016 7:26 pm

I recently bought two uC32 microcontrollers, so I could avoid having to use arduinos.

I have tried messing around with the libraries for a while now, and I can get most basic programs running on the uC32 without any problems at all.

However, none of my different TFT screens are working at all. When I run the TFTProber program, no screens are recognized, even ones like the ILI9341, ILI9340c, and HX8357D. Any time I run the program it says reset ok, could not identify screen, and sends back all FFFFFFFs. Same data, same results, any screen.

I have verified that these screens are working with other microcontrollers and an FPGA, what am I doing wrong?

Please help me!

-VHDL

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: uC32 Doesn't recognize any TFT / LCD Screens

Post by majenko » Tue Dec 27, 2016 8:13 pm

Do you have links to the screens you are using? Not all interfaces support TFT probing (many SPI ones don't).
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

VHDL-BPA
Posts: 11
Joined: Tue Dec 27, 2016 7:19 pm

Re: uC32 Doesn't recognize any TFT / LCD Screens

Post by VHDL-BPA » Tue Dec 27, 2016 8:34 pm

https://learn.adafruit.com/adafruit-3-5 ... t/overview

https://www.adafruit.com/product/2478

https://www.adafruit.com/product/1770

http://www.elecfreaks.com/store/24-tft- ... p-785.html

These are the screens I am using.

I was trying to say also, the reason I used the probe program was because I wanted a way to troubleshoot this problem. No program that I write or example code that I use seems to do anything at all on any of my screens.

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: uC32 Doesn't recognize any TFT / LCD Screens

Post by majenko » Tue Dec 27, 2016 10:42 pm

Unfortunately I haven't actually used any of those specific screens. I only have one ILI9341 and IIRC (I can't put my hands on it right now) it works in 16-bit mode. I am not 100% sure if I got the 8-bit mode tested or not.

There is not currently any support for SPI for the ILI9341 either.

I need to go digging through my boxes to find the right screens to check with...
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

VHDL-BPA
Posts: 11
Joined: Tue Dec 27, 2016 7:19 pm

Re: uC32 Doesn't recognize any TFT / LCD Screens

Post by VHDL-BPA » Wed Dec 28, 2016 6:55 pm

That would be awesome!

I also think part of my problem is that I am not very good at C/C++. How exactly do I write the starting and calling code for these custom screens with uC32 libraries? Every time I tried something it would give me a compile error and say I am not calling the function correctly (I know I am not). For the HX8357 for example, how would I call it?

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: uC32 Doesn't recognize any TFT / LCD Screens

Post by majenko » Wed Dec 28, 2016 8:47 pm

The HX8347D driver has an example with it that shows you how to use it. Define a DSPI object for the port you have it connected to, and pass that along with the C/D and CS pins to the constructor.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

VHDL-BPA
Posts: 11
Joined: Tue Dec 27, 2016 7:19 pm

Re: uC32 Doesn't recognize any TFT / LCD Screens

Post by VHDL-BPA » Thu Dec 29, 2016 4:49 am

It still isn't working. I get about 30-40 lines of errors each try. Here is what I wrote so far, to try to interface with the HX8357:

#include <HX8357.h>
#include <DisplayCore.h>
#include <DSPI.h>
#include <TFT.h>

DSPI0 spi;
TFTDSPI mySpi(&spi, 7, 10);
HX8357 tft(&mySpi);

void setup()
{
Serial.begin(115200);
pinMode(9, OUTPUT);
digitalWrite(9, HIGH);
tft.initializeDevice();

tft.fillScreen(Color::Black);
tft.setTextColor(Color::Red);
}

void loop()
{
tft.setCursor(10, 10);
tft.print(millis());
}

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: uC32 Doesn't recognize any TFT / LCD Screens

Post by majenko » Thu Dec 29, 2016 11:52 am

Ummm... why do you have `#include <TFT.h>`? That library is ancient, cannot work with DisplayCore, and in short should not be used or installed by anyone. Delete it.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

VHDL-BPA
Posts: 11
Joined: Tue Dec 27, 2016 7:19 pm

Re: uC32 Doesn't recognize any TFT / LCD Screens

Post by VHDL-BPA » Thu Dec 29, 2016 8:36 pm

Okay, I don't quite understand how this works. I simply want to call the functions that initialize the screen and use the standard SPI pins.

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: uC32 Doesn't recognize any TFT / LCD Screens

Post by majenko » Thu Dec 29, 2016 9:40 pm

You delete the TFT library that you installed, and remove the #include <TFT.h> from your code. Then try it and see what happens.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

Post Reply