[SOLVED] Problem with Spark Core + TFT 2.2 w/SD

Hello!
I am testing my spark core with a TFT 2.2 (this model: http://goo.gl/6QTokm). I am using the library ILI9340 prepared for Spark (https://github.com/lgramatikov/Adafruit_ILI9340), and connected the pins following the instructions:

TFT -> SPARK
MISO -> A4
LED -> 3V3
SCK -> A3
MOSI -> A5
D/C -> A0
RST -> A1
CS -> A2
GND -> GND
VCC -> 3V3

and using the example that lgramatikov has on the library, but I am always getting the same result: white screen. Can anybody help me?

Thanks!

Looking at the library I found this mixup

Adafruit_ILI9340.h

Adafruit_ILI9340(uint8_t CS, uint8_t RS, uint8_t RST);

Adafruit_ILI9340.cpp

Adafruit_ILI9340::Adafruit_ILI9340(uint8_t cs, uint8_t dc, uint8_t rst) : Adafruit_GFX(ILI9340_TFTWIDTH, ILI9340_TFTHEIGHT) {
	_cs = cs;
	_dc = dc;
	_rst = rst;
	_mosi = _sclk = 0;
}

but in glimmer.ino RST & C/D seem to be swapped around

Adafruit_ILI9340 tft = Adafruit_ILI9340(A2, A1, A0);

Your pinning

One other thing. If your board is like a similar Adafruit one, where the SPI lines are shared between the TFT and the SD slot, you should not use A2 (SPI SS) on the Core, but use two "untied" pins - one as CS for the TFT and another as CS for the SD.

1 Like

Hi ScruffR!
Thanks for your help. I had this mixed also in the wires plugged to the core, but after fixing it, the white screen still appears, without any other clue.

I tried also with the library ILI9341, which is even in the spark cloud repository, having the same results: white screen. I think that maybe is something. Only for being sure, all the pins of the spark core have 3,3 v, right?

thanks!

3.3V for all Core pins is correct. On the link you posted I couldn’t find any indication if this board needs 3.3V or 5V.

With my Adafruit TFT board I had the white screen effect when inserting an SD card, causing the voltage to slightly drop for a very short time.
So it could be that 3.3V or the current via 3V3 is not enough.
How are you powering your setup? From a USB port or a wall wart?

If you can confirm that the board is 5V tolerant, try connecting Vcc to the Cores Vin instead of 3V3.

1 Like

@albertuslm, I have the same display board with an ILI9341. The board can be powered with 5V as there is a regulator onboard. The LED can be powered off 5V also but with a current limiting resistor like a 220 ohm to start with (otherwise you will burn out the LEDs).

ALL signals have to be 3.3v max. Start with the display only, then add the SD. :smile:

1 Like

Many thanks ScruffR and peekay123, and thanks peekay for doing the adaptation to Spark core of this library!

As you, peekay, are using it and have the same model as I have, please, could you explain me the disposal of the pins you are using? Sorry, but I am totally lost, having always the white screen.

I am starting only with the display, hehehehe, i am neubie with Arduino / Spark / iOT :frowning:

Thanks!

@albertuslm, here is my pinout:

LCD         Spark
Vcc         Vin
GND         GND
CS          A2
RST         A0
D/C         A1
MOSI        A5
SCK         A3
LED         to Vin via 220ohm resitor
MISO        A4

I am watching work as I type this! :slight_smile:

2 Likes

@peekay123, thanks!! you are awesome, it works!!!

2 Likes

please help!, i had the same probem with my screen ILI9340, i tried to fix it follow this topic but having always the white screen,. any one can help me?

What code are you running?

1 Like

And what display shield/breakout are you using?

1 Like

oh, thanks so much, it works.!!! but i don’t know why :smile:

Must be the united mental powers of @peekay123 and me :wink:

1 Like