New ili9341 and t3.6 issues

Status
Not open for further replies.
Ok I soldered J1 and while it made the screen brighter I'm still getting the white screen. Or the screen goes white and still shows the graphics. I'm pretty sure it's the spi wiring but I can't understand why even when soldered I get the glitch.

Games can run from a few KB to 32 for black and white, and up to a single megabyte depending on how much programming and the run length of the game. If I can ever figure out how to use Spitft games can be much larger.

That's kind of a problem in itself as well. The loader would need to be able to open folders for the games that way bitmaps can be included included with out jamming a crapload of bitmaps in the root directory if that's where they are stored.
 
Bummer the J1 didn't do for you what it did for me - you can undo that perhaps. Sounds like something else not right - I followed the Store page wiring and with an ugly pic once posted hand wired to a perf board it worked. Then others with the Store linked OSH Purple board that worked better.

Could be the display - a pain it is all soldered to swap test a replacement.

I wonder if taking of the SD Bracket compromised anything - I suppose not as the SPI links are unique to that IIRC - though the power lines are shared internal to the PCB?
 
Again I would first do things like Double check the wiring.
That is:
What pins are you using? That is:
MISO:
MOSI:
SCK:
DC:
CS:

I would fill in the table. Then check what values you are passing to the library for each of these pins and make sure they match.

Again which library?

If you are using some semi standard pins, can you use the default driver like the Adafruit one, or the ILI9341_t3 one or ... If so can you load up a simple graphic test program. You may need to modify the IO pins going to it... Do you get any output?

I know I sound like broken record, but if it were me I would use a Logic Analyzer and verify the signals going to the display.. I actually have used all three of mine in the last couple of days.

It would be a shame to unsolder and the like only to find out you meant to hook up the SCLK to pin 13 put it was on 14 or...
 
Stages.......

I'm not worried about j1 being soldered since it makes the screen brighter with out using five volts input voltage. Wish I had known that tip a while back. I actually noted that I have every thing de-soldered and cleaned up. So I'm up for what ever battery of tests we can try. I don't think it has any thing to do with the SD card slot.

I keep the wiring color coded to make things easier to set up. I've checked and rechecked, I'm positive that the wiring was correct especially since it was putting out graphics at all. I don't think it would work at all if I switched pins with out changing the code.

Ok the library I'm using is SumoToys ili9341 library that I've adapted for gaming and speed by adding optimizations from different code. It's fully tested and had a sketch that I lost that was a demo for the buttons working with the graphics. I will post in a minute.

Just as a test of the screen I hooked up the ESP32 and loaded Kurts ili9341 library for esp32 from the updating spin to work with esp32 thread. And every thing works even if I wiggle the spi wire jumpers connected to the esp32. So then I loaded my ESP32 library that I adapted from Kurts code and still no problems.

The great news is that my esp32 works now.

I'm willing to try any test you can throw my way but I don't really know what a logic analyzer is? Is this a program or do I need some kind of special hardware. I'm waiting on a new battery for my multimeter but I managed to get some straight readings from it every other day or so.

Ok so in my multimeter tests... When I attach a 5v step up to the teensy3.6 the 3v outs push around 5.69v if I use the 3.7v lipo straight up the 3.3v outputs are a lil above 3.3v. I see know reason to use 5v so that's not really a problem.

Edit: I corrected some sentences above and included both the esp32 experimental library and my GameRIot grafx library. Ive been trying to add all the credits so if I'm missing one then please tell me or correct me. It's a real jungle of different code using different libraries for better speed.

Edit::::
Ok both my 2.8 inch and 2.4 inch seem to be stable using esp32.

Ok here are the wiring connections to the 2.8tft......




And here is a pic of the 2.4tft wiring connections........



I have not added the shrink tube yet to the 2.4 wires. I did how ever solder the J1 on on the 2.4 as well.

Edit::
I guess the first thing i should do try those spi tests from the updating spin thread. Soon as i get woken up good tomorrow ill run those and paste the results.

Maybe i should add a lil flux to the board and retouch the spi pins like i did with pin 12. It could be that when i splay the pins away from each other to prevent shorting and im actually turning the pins in thier via holes.
 

Attachments

  • GamerRIot-master.zip
    236.3 KB · Views: 100
  • ESP.zip
    936.7 KB · Views: 147
Last edited:
Again could not tell much from your pictures as not sure what the 2.4" display is? I have their 2.2" which does not have touch and their 2.8" one which does... And I don't see a picture now that shows the Teensy side, that I can verify which pins are connected to your displays.

Last night when I read your post you were asking what a Logic Analyzer is. It is typically it is a test hardware. Mine are from Saleae: https://www.saleae.com/
For other types of tests you might want to use an Oscilloscope, which at times I wish I had... Note: there is a sketch to turn a Teensy into a Logic Analyzer which can be used for some things... I have not tried it too much but you can gather some information from it.

Example usages: Yesterday I was testing out adding Async SPI support to the Teensy 2.0. Took me a second to figure out which pins are SPI on it... Then hooked up analyzer and verified that things looked right. Example screen shots. First one shows a complete screen update, you can see that the CS pin is properly asserted through the complete update, plus the DC pin is asserted for the first several bytes:
screenshot.jpg

Then if you zoom into the start update, you can see the actual bytes that were output. I added a couple of timing annotations showing some timings. Like the time to output one byte (1us) which shows then 1mhz, which if you multiply by 8 you will get 8mhz which is the SPI speed I asked for. You see a second annotation showing time between byte outputs of 7.2us so using this method where each byte is output by an Interrupt handler you are actually getting a throughput of about 1.1mhz which is pretty bad!...
screenshot2.jpg

Now back on subject... So the displays work. So again I suggest that run some simple test...

Sorry I am somewhat lazy here and dig through your current code, at least until you narrow down the issues. Like still don't have clue if we are talking hardware wiring issue or software issue.

Example run an extract of the touch paint program from the ili9341_t3 library, that maybe does just:
Code:
#include <ILI9341_t3.h>
#define TFT_DC  9
#define TFT_CS 10
#define TFT_RST 7
#define TFT_SCK 13
#define TFT_MISO 12
#define TFT_MOSI 11

ILI9341_t3 tft = ILI9341_t3(TFT_CS, TFT_DC, TFT_RST, TFT_MOSI, TFT_SCK, TFT_MISO);

// Size of the color selection boxes and the paintbrush size
#define BOXSIZE 40
#define PENRADIUS 3
int oldcolor, currentcolor;

void setup(void) {
  while (!Serial && (millis() <= 1000));

  Serial.begin(9600);
  Serial.println(F("Touch Paint!"));

  tft.begin();
  tft.fillScreen(ILI9341_BLACK);

  // make the color selection boxes
  tft.fillRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_RED);
  tft.fillRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, ILI9341_YELLOW);
  tft.fillRect(BOXSIZE * 2, 0, BOXSIZE, BOXSIZE, ILI9341_GREEN);
  tft.fillRect(BOXSIZE * 3, 0, BOXSIZE, BOXSIZE, ILI9341_CYAN);
  tft.fillRect(BOXSIZE * 4, 0, BOXSIZE, BOXSIZE, ILI9341_BLUE);
  tft.fillRect(BOXSIZE * 5, 0, BOXSIZE, BOXSIZE, ILI9341_MAGENTA);

  // select the current color 'red'
  tft.drawRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
  currentcolor = ILI9341_RED;
}


void loop()
{
    delay(250);
}
Warning simple cut and paste and line deletions... So maybe something wrong here, plus you would need to set the appropriate values for the TFT_... values.

Does this show the simple touch paint screen? If not double check wiring and settings... If it does work (again this is using ili9341_t3 library), and your code does not. Then again double check your wring versus what you are passing into your TFT setup... And/Or - modify the above test to use your library and see if it outputs to the screen... If it does and your program does not, well then again verify the values passed in to the constructor and init.

Also double check that you are not trying to use the same IO pins for something else in your program. I have run into times when something does not work, as I had some other debug code that was toggling IO pins... This hit me awhile ago when I was trying out SPI1 on pins 0, 1 and I had debug code in my program that used these pins... I caught some of these by checking the code. Other times I have tried printing out the actual current configuration of what should be the SPI pins...
Something like: Serial.println(CORE_PIN13_CONFIG, HEX);
And then verify for example that pin 13 is actually set to SPI mode (i.e. pin mode 2)... But this takes understanding of how that stuff works...
 
The TFT is an ili9341 with touch pins and ad card holder I got from over seas.

I ran a couple different libraries from the pjrc store page for the ili9341 2.8 and uploaded the graphics tests and still I get the problem. I also ran one of the spi tests (from page 2 updating spin to work with esp32) and it says I'm using the right pins. The GameRIot library I finished in January and was working with my first teensy just fine. But I accidentally crossed the negative and positive and killed it. It was a bad day.

But if do the same thing with a couple different libraries and compile to the esp32 I can sit there and turn it off and on and even wiggle it around.

Still working on trying the other tests you listed in that thread. The one in post 48 is giving me problems. Says it has a problem with rebuff.
 
All right guys I think I fixed the problem.

While I was trying to get everything set up to fully run tests I went ahead and re-flux'd the spi and all the power pins and prayed gravity would hold true. I think it worked. About fifteen minutes ago moved my gaming library back to arduino and compiles the graphics test and all seems to be good. I can even jiggle the un-soldered wires and no glitching.

So what did I learn? Always flux when soldering pins to a board.
 
Last edited:
Is there some kind of low voltage cutoff? I'm noticing that as the battery drains to a certain point every thing runs but at a lil slower pace and the screen it self starts to lose contrast. It would be nice if there was some way to cut the system off so it doesn't go so low.
 
Any body know where i can find decent wiring? The dupont wire jumpers ive been using wont solder when splicing. It just burns the wires and the solder falls to the table. I need thick wire as well.
 
Status
Not open for further replies.
Back
Top