Go Down

Topic: noob: Shield w/ spfd5408 controller 240x320 - I don't know which library (Read 17187 times) previous topic - next topic

TMGeorge

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?=

floresta

Quote
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 --> http://arduino.cc/en/Guide/ArduinoLeonardo#toc1.

Then click on "show" in the yellow band after the first paragraph.

And then click on "Differences in pin capabilities".

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!


Don

CheapB

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)
https://github.com/adafruit/Touch-Screen-Library

MarkT

[ I won't respond to messages, use the forum please ]

CheapB

Item 261120303957 on Ebay as per OP

http://www.ebay.com/itm/2-6-TFT-LCD-Shield-Touch-Panel-Display-w-TF-Reader-Arduino-A121-/261120303957?pt=LH_DefaultDomain_0&hash=item3ccbfba355

floresta

Quote
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.


Don

CheapB

Just got the the link from the vendor. Have not tried it yet.
https://www.yousendit.com/download/WUJaVWR1K3huSlJFQmNUQw


TMGeorge

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
...



Code: [Select]

...
#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 {
public:
  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?

TMGeorge

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.

CheapB

This seems to work with 1.01
https://www.yousendit.com/dl?phi_action=app/orchestrateDownload&rurl=http%253A%252F%252Fwww.yousendit.com%252Ftransfer.php%253Faction%253Dbatch_download%2526batch_id%253DWUJZTkZwQk5qV0N5VmNUQw&s=19102&cid=tx-02002207340200000000

Updated with a permanent link:
https://docs.google.com/a/cxo-on-demand.com/file/d/0By0GEVVJbBtSZktxaEtJZGNlcGM/edit

TMGeorge

Hi,

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 :-(

TMGeorge

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:

Code: [Select]
  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!");
    return;
  }
  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.

CheapB

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

TMGeorge

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

:-(



robopet

Hello

I also have the same problem
The link that CheapB posted don't seem to work
My shield is also bought from ebay:  http://www.ebay.com/itm/New-2-6-TFT-LCD-Shield-Touch-Panel-Display-w-TF-Reader-Arduino-A121-/251176560883?pt=LH_DefaultDomain_0&hash=item3a7b4a28f3

Can someone post a file of the mod library?

A NOOB 4 NOW

Go Up