Join makers around the world sharing their projects! Watch the show-and-tell LIVE right now!
0

TFT Featherwing weird behavior
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

TFT Featherwing weird behavior

by flounder on Thu Jun 27, 2019 2:32 am

I plugged my ESP32 Feather (#3405) into my TFT Featherwing (#3215) and it didn't work at all with the example graphicstest program. I saw the backlight on, but nothing happened. So, the first thing I did was RTFM, where I discovered that the 8266 and ESP32 have different pin assignments. So I changed
Code: Select all | TOGGLE FULL SIZE
// For the Adafruit shield, these are the default.
#define TFT_DC 9
#define TFT_CS 10

to
Code: Select all | TOGGLE FULL SIZE
// For the Adafruit shield, these are the default.
#if defined(ARDUINO_FEATHER_ESP32)
#define TFT_CS 15
#define TFT_DC 33
#else
#define TFT_DC 9
#define TFT_CS 10
#endif

(I didn't add other special cases, because I only needed the ESP32)

So Indeed, it sort-of-worked. But it printed out the text in Hebrew or Arabic, because all the letters ran right to left.
IMG_7734 (1).jpg
IMG_7734 (1).jpg (848.11 KiB) Viewed 368 times

Then I added a loop to run the complete set of tests in every orientation.

For example, I added a few lines in setup:
Code: Select all | TOGGLE FULL SIZE
  Serial.print("Self Diagnostic: 0x"); Serial.println(x, HEX); // existing line to  show placement of insertion
 
for(uint8_t rot = 0; rot < 4; ++rot)
  { /* do each rotation */
   tft.setRotation(rot);
  Serial.println(F("=========================================================")); 
  Serial.println(F("Benchmark                Time (microseconds)"));
  delay(10);
  Serial.print(F("Screen rotation          "));
  Serial.println(rot);
  /... the rest of the tests, unmodified
  } /* do each rotation */

and
The serial port output was
Code: Select all | TOGGLE FULL SIZE
ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:928
ho 0 tail 12 room 4
load:0x40078000,len:8424
ho 0 tail 12 room 4
load:0x40080400,len:5868
entry 0x4008069c
ILI9341 Test!
Display Power Mode: 0xCA
MADCTL Mode: 0x24
Pixel Format: 0x2
Image Format: 0xC0
Self Diagnostic: 0xE0
=========================================================
Benchmark                Time (microseconds)
Screen rotation          0
Screen fill              195296
Text                     28448
Lines                    271162
Horiz/Vert Lines         17613
Rectangles (outline)     11678
Rectangles (filled)      405701
Circles (filled)         77164
Circles (outline)        119287
Triangles (outline)      59417
Triangles (filled)       154594
Rounded rects (outline)  43055
Rounded rects (filled)   412693
=========================================================
Benchmark                Time (microseconds)
Screen rotation          1
Screen fill              195237
Text                     28185
Lines                    271157
Horiz/Vert Lines         17613
Rectangles (outline)     11642
Rectangles (filled)      405703
Circles (filled)         77164
Circles (outline)        119257
Triangles (outline)      59413
Triangles (filled)       154525
Rounded rects (outline)  43025
Rounded rects (filled)   412693
=========================================================
Benchmark                Time (microseconds)
Screen rotation          2
Screen fill              195237
Text                     28257
Lines                    271139
Horiz/Vert Lines         17602
Rectangles (outline)     11642
Rectangles (filled)      405703
Circles (filled)         77145
Circles (outline)        119264
Triangles (outline)      59413
Triangles (filled)       154525
Rounded rects (outline)  43025
Rounded rects (filled)   412693
=========================================================
Benchmark                Time (microseconds)
Screen rotation          3
Screen fill              195237
Text                     28249
Lines                    271157
Horiz/Vert Lines         17613
Rectangles (outline)     11642
Rectangles (filled)      405693
Circles (filled)         77164
Circles (outline)        119258
Triangles (outline)      59413
Triangles (filled)       154522
Rounded rects (outline)  43025
Rounded rects (filled)   412693
Done!

For all rotations other than 0, the screen was blank, as shown:
IMG_7735.jpg
IMG_7735.jpg (689.6 KiB) Viewed 368 times
. I held it in my hand and watched as the letters came out reversed during Rotation 0, and then watched as rotation 1 blanked the screen and nothing more was seen. Next, I tried iterating over the rotation range 0..10, and used rot % 4. When it went back to rotation 0, the screen remained blank. So I tried starting the loop at 1, range 1..10. This time, rotation 1 and rotation 2 displayed, then the screen went blank. Not black, but blank.

I can send the whole modified graphicstest, but the unmodified graphicstest should demonstrate the problem. i would substitute another Feather, but it is 2:30am and I'm falling asleep in my keyboard. So at this point I don't know if I have a bad graphics display, a bad Feather, or I have overlooked something. Suggestions would be appreciated.
joe
Last edited by flounder on Tue Jul 09, 2019 4:00 am, edited 1 time in total.

flounder
 
Posts: 372
Joined: Wed Sep 18, 2013 9:10 pm
Location: Pittsburgh PA

Re: TFT Featherwnjg weird behavior

by adafruit_support_carter on Thu Jun 27, 2019 2:56 pm

Make sure to run "graphicstest_featherwing":
https://learn.adafruit.com/adafruit-2-4 ... s-test-3-9
and not "graphicstest".

It should not require any modification.

adafruit_support_carter
 
Posts: 14478
Joined: Tue Nov 29, 2016 2:45 pm

Re: TFT Featherwnjg weird behavior

by flounder on Thu Jun 27, 2019 7:53 pm

Interesting. When I went through the examples, this was the only one I found. Unfortunately I will not get back to this until next week...I’m out of town until Sunday evening.

flounder
 
Posts: 372
Joined: Wed Sep 18, 2013 9:10 pm
Location: Pittsburgh PA

Re: TFT Featherwnjg weird behavior

by flounder on Sun Jul 07, 2019 12:35 am

I now have gotten back to this project.

The featherwing_graphicstest solves the compilation problem, but it doesn't solve the remaining problems.

For example, the text still comes out reversed, as shown here:
Groop.jpg
an extract of a phoyo taken my my iPhone
Groop.jpg (291.8 KiB) Viewed 284 times


I did a video of the operation, and it seems that the screen goes all white during the "filled triangle" test. The picture below shows three frames from that video. In the left image, it has started to draw the filled triangles. In the middle image, we see some triangles drawn, and it is starting to wipe out the image. In the last frame, the entire screen has gone white. Nothing after this is visible; once the screen changes to white, it stays there and nothing more will draw. Hitting the "reset" button allows things to be drawn. At least to the same failure point. The background of these photos is the serial port output.
bad triangles.png
Three frames snipped from a video recording done with an iPhone
bad triangles.png (713.64 KiB) Viewed 284 times

Now the questions remain: how do I get the text to come out right-way-around, and how do I deal with the test failing and leaving the screen white.

Again, I am using the HUZZAH32 Feather (#3405) with the TFT Featherwing (#3315)

flounder
 
Posts: 372
Joined: Wed Sep 18, 2013 9:10 pm
Location: Pittsburgh PA

Re: TFT Featherwing weird behavior

by adafruit_support_carter on Tue Jul 09, 2019 1:29 pm

Again, I am using the HUZZAH32 Feather (#3405) with the TFT Featherwing (#3315)

I just connected these two up and ran the graphictest_featherwing example without any modifications. It ran fine here. So I can't recreated this issue.

Check and make sure you have the latest versions of all libraries.

adafruit_support_carter
 
Posts: 14478
Joined: Tue Nov 29, 2016 2:45 pm

Re: TFT Featherwing weird behavior

by flounder on Wed Jul 10, 2019 12:39 am

Before I started, I spent a a couple hours downloading library updates, until there were no updatable libraries left. I did this on my laptop, and I'm at my desktop right now, so I can't give you the exact versions; I will do that later.

I could send you the physical objects.
joe

flounder
 
Posts: 372
Joined: Wed Sep 18, 2013 9:10 pm
Location: Pittsburgh PA

Re: TFT Featherwing weird behavior

by flounder on Wed Jul 10, 2019 2:52 pm

Arduino IDE; 1.8.9
ILI9341: 1.5.1
GFX :1.5.6
Joe

flounder
 
Posts: 372
Joined: Wed Sep 18, 2013 9:10 pm
Location: Pittsburgh PA

Re: TFT Featherwing weird behavior

by adafruit_support_carter on Wed Jul 10, 2019 3:11 pm

Totally odd. Exact same versions I'm running. And I think we're using the same hardware. So not sure what's different between our setups.

It looks like you have you stuff in some kind of case. Can you remove the hardware and post photos of the bare boards - the Feather ESP32 and the TFT FeatherWing.

adafruit_support_carter
 
Posts: 14478
Joined: Tue Nov 29, 2016 2:45 pm

Re: TFT Featherwing weird behavior

by kennethm4 on Sat Jul 20, 2019 12:29 pm

I can also confirm this with the Huzzah 8266. Happens only if computer (Win10 64 bit) is turned off. On restart text is reversed but I reset the display it runs normal. Using the same version libs and board manager was downgraded as recomended in other post here/

Is there a way to keep usb ports powered when computer is off?

Thanks

Ken

kennethm4
 
Posts: 47
Joined: Mon Dec 02, 2013 5:02 pm

Re: TFT Featherwing weird behavior

by adafruit_support_carter on Mon Jul 22, 2019 1:26 pm

Can you post specific steps needed to re-create this issue.

adafruit_support_carter
 
Posts: 14478
Joined: Tue Nov 29, 2016 2:45 pm

Re: TFT Featherwing weird behavior

by kennethm4 on Tue Jul 23, 2019 2:06 pm

Hi all I have to do is power computer off. After the 8266 runs down its LIPO battery I restart computer and my display starts from right to left. reboot and displays correctly. In my progran I do use a rotate 3 commabd just for how I have it set up.

kennethm4
 
Posts: 47
Joined: Mon Dec 02, 2013 5:02 pm

Re: TFT Featherwing weird behavior

by flounder on Tue Dec 10, 2019 4:36 am

All I have to do is compile and download the graphicstest module (the new one I was told about). The computer remains on, the USB cable remains connected. I am now downloading the lastest GFX library (1.6.1). There is no change in the behavior; it is still failing. I'm not sure what is gained by taking the boards out of the case, so for now here's a shot from the back of the case.
joe
Attachments
ESP32+TFT.png
ESP32+TFT.png (415.91 KiB) Viewed 78 times

flounder
 
Posts: 372
Joined: Wed Sep 18, 2013 9:10 pm
Location: Pittsburgh PA

Re: TFT Featherwing weird behavior

by flounder on Tue Dec 10, 2019 5:31 am

I have stared at the GFX code for about an hour. Lacking an ability to do on-chip debugging, I cannot ascertain why the text comes out reversed. If you want to try this, I will happily send you the two parts and you can see if it fails with these parts.
joe

flounder
 
Posts: 372
Joined: Wed Sep 18, 2013 9:10 pm
Location: Pittsburgh PA

Re: TFT Featherwing weird behavior

by adafruit_support_carter on Tue Dec 10, 2019 2:04 pm

What exact example are you running? The colors look off. Also, this (1) is not in the code:
https://github.com/adafruit/Adafruit_IL ... g.ino#L170
gfx_test.jpg
gfx_test.jpg (23.81 KiB) Viewed 62 times


[EDIT] Maybe also check this tab. It doesn't look fully inserted.
tab.jpg
tab.jpg (47.5 KiB) Viewed 60 times

adafruit_support_carter
 
Posts: 14478
Joined: Tue Nov 29, 2016 2:45 pm

Re: TFT Featherwing weird behavior

by flounder on Wed Dec 11, 2019 11:56 pm

Wow! Good catch on that connector. I pushed it together (just used a pair of pliers to force the two pieces together) and lo! the text comes out correctly!

However, the GFX failure where it goes blank after trying to draw the triangles remains.
Joe

flounder
 
Posts: 372
Joined: Wed Sep 18, 2013 9:10 pm
Location: Pittsburgh PA

Please be positive and constructive with your questions and comments.