noob: Shield w/ spfd5408 controller 240x320 - I don't know which library

So without much thinking I order two of those 261120303957 @ebay.

I always wanted to have a Display, this is already on a shield, has touch screen and an SD slot. So without much thinking I ordered it because it looked safe.

Problem now is that there are no libs linked on the ebay page and after googling for its controller it doesn't find much. Except few AVR projects.

The seller hasn't answered yet (12h). I give him some thime but I am also eager to see it working.

So could anyone help me out?

thx n rgds tmg

ps: the auction says that it's not compatible with Leonardo. I thought leonardo is just an normal arduino which can do HID. So I would have expected that the shield pin layout is the same. Did I miss something?=

I would have expected that the shield pin layout is the same. Did I miss something?

You could go to the "Guide to the Arduino Leonardo" at -->

Then click on "[u]show[/u]" in the yellow band after the first paragraph.

And then click on [u]"Differences in pin capabilities"[/u].

This will tell you:

The Leonardo has some slight differences in the capabilities and assignments of various pins (especially for SPI and TWI). These are detailed on the hardware page.

The specific information you need is probably somewhere on that page .

Easy - wasn't it!


I am in the same boat (except using an UNO) - None of the libraries I have tried works with this shield - hoping the seller can provide a lib or some sample code.
The touch screen seems to be working with (or at least provide data from)

Which shield? Where's the link?

Item 261120303957 on Ebay as per OP

Item 261120303957 on Ebay as per OP

That will probably be a useless link in a few weeks making this forum thread less valuable for people looking for answers in the future.

If someone who has one of these shields can supply a part number and/or a link to the datasheet that would be much more helpful.


Just got the the link from the vendor. Have not tried it yet.

just checked my eMail and i got the same link.

So now I am quickly copying the 3 subs of the lib dir in the lib dir of my arduino-1.0.1.

I when I try both test PDEs I get an error in TFTLCD.h:

In file included from graphicstest_pde.cpp:1:
TFTLCD.h:64: error: expected class-name before ‘{’ token
TFTLCD.h:66: error: expected `)’ before ‘cs’
TFTLCD.h:68: error: ‘uint16_t’ does not name a type
TFTLCD.h:71: error: ‘uint16_t’ has not been declared

#define TFTLCD_PANEL_IF_CTRL5		0x97
#define TFTLCD_PANEL_IF_CTRL6		0x98

#define TFTLCD_DELAYCMD                 0xFF

#define swap(a, b) { int16_t t = a; a = b; b = t; }
//  <- this is line 64
class TFTLCD : public Print {
  TFTLCD(uint8_t cs, uint8_t cd, uint8_t wr, uint8_t rd, uint8_t reset);

  uint16_t Color565(uint8_t r, uint8_t g, uint8_t b);

I also wonder why the copies of the lib-h-files are in the pde folder. Shouldn’t it be sufficient if they are in the lib folder?

update: seems like the compiler can't figure out what/where Print is in 1.0.1.

I got it working in 1.0. But I had to make three changes. 1st deleting the h files in the PDE dir 2nd converting "void TFTLCD::write(uint8_t c)" to "size_t TFTLCD::write(uint8_t c)" in TFTLCD.cpp and .h 3rd exchange #include "WProgram.h" to #include "Arduino.h" in TFTLCD.h

Haven't checked SD slot yet

I also noticed that the Display is only fixed on one side on the shield. So it's a little loose and this is noticable when I use the touchscreen. But i think this can be easily fixed with clue or double sided tape.

This seems to work with 1.01

Updated with a permanent link:


thx for the link.

have you checked the SD yet? I couldn’t get it running.

I guess I have to delete the original SD and replace it with the one from the package. I get some of the same errors as above but I can’t fix all :frowning:

as said I couldn't use the SD lib from the package/shield in Arduino 1.x

I installed the Arduino 1.0.2. If I upload the SD-File-example it cannot initialize the SD card. If I exchange the lcd shield w/ the ethernet/microSD shield the the SD-File-example works. So my microSD at least has the correct format

I compared the Arduino 1.0.2 SD lib with the one from the LCD shield.

The lib in 1.0.2 just seems updated (Arduino.h, size_t instead of void ...) and some new functions (multiple files ..).

I would have expected maybe different Pinout but Sd2PinMap.h. It's the same except a section teensy/leonardo - this shouldn't matter.

the following seems to fail:

  Serial.print("Initializing SD card...");
  // On the Ethernet Shield, CS is pin 4. It's set as an output by default.
  // Note that even if it's not used as the CS pin, the hardware SS pin 
  // (10 on most Arduino boards, 53 on the Mega) must be left as an output 
  // or the SD library functions will not work. 
  pinMode(10, OUTPUT);

  if (!SD.begin(4)) {
    Serial.println("initialization failed!");
  Serial.println("initialization done.");

How I said this works with the ethernet shield. But on the lcd shield pin 4 is connected tio the lcd and not to the sd card ...

ps: i have two lcd shields and two different arduinos. On one the graphic demo seems to go white screen after a while. Somewhere on google I read about a Problem with another LCD that mabe the backlight takes to much power and the CPU goes crazy. So Arduino should not just be powered with USB.

I have not had a chance to test the SD card. Did it work with the .23 version?

Hi the TFT didn't work with .23. The Ethernet shield did.

What I am curious about is the CS (chip select) pin 4. It makes sense with the ethernet shield as only the ethernet or the SD chip can be activice at one time. But with the TFT shield this should not be a problem as they do not shar the ISP/ICSP. But calling SD.begin() or SD.begin(10) instead of SD.begin(4) didn't help



I also have the same problem The link that CheapB posted don't seem to work My shield is also bought from ebay:

Can someone post a file of the mod library?

The code I posted is working with your shield except for the sd card. It is the exactly same shield I have from the same seller. What kind of problems do you have?

Shield displaying only white Can't display anything else I have tried downloading a lot of libraries and changing the code Still trying to mod the code My shield lcd controller: spfd5408

Does anyone have a library that works with it?

As I said I have this shield working with the library i posted and it worked for other people as well. Can you post your code?

Hi that link to the library has expired, could you please upload it again. I'm in the same boat....


let me know if this works