9 years ago.

Seeed Arch Max - Seeed 2.8" TFT Touch V2 Shield not working

Hi mbed friends,

I've got a Seeed Arch Max with Arduino headers. It has an STM32F407VGT6 MCU. However I can't get the Seeed 2.8" TFT Touch V2 working on it. It remains black. But on the Seeed Arch Pro it works fine, but it has an NXP LPC1768 MCU. I think the pronlem is the MCU used. Did anybody got it working on the Arch Max?

#include "mbed.h"
#include "SPI_TFT_ILI9341.h"
#include "FT6206.h"

#include "Arial12x12.h"

#define PIN_XP          A3
#define PIN_XM          A1
#define PIN_YP          A2
#define PIN_YM          A0
#define PIN_SCLK        D13
#define PIN_MISO        D12
#define PIN_MOSI        D11
#define PIN_CS_TFT      D10  // chip select pin
#define PIN_DC_TFT      D9   // data/command select pin.
#define PIN_RESET_TFT   D8
//#define PIN_BL_TFT      D7
#define PIN_CS_SD       D4

#define PIN_SCL_FT6206  D15
#define PIN_SDA_FT6206  D14
#define PIN_INT_FT6206  D7

#define PORTRAIT        0
#define LANDSCAPE       1

SPI_TFT_ILI9341 TFT(PIN_MOSI, PIN_MISO, PIN_SCLK, PIN_CS_TFT, PIN_RESET_TFT, PIN_DC_TFT, "TFT"); // mosi, miso, sclk, cs, reset, dc 
FT6206 FT6206(PIN_SDA_FT6206, PIN_SCL_FT6206, PIN_INT_FT6206); // sda, scl, int

int main()
{
    //Configure the display driver
    TFT.claim(stdout);
    TFT.background(Black);
    TFT.foreground(White);
    TFT.set_orientation(LANDSCAPE);
    TFT.cls();

    //Print a welcome message
    TFT.set_font((unsigned char*) Arial12x12);
    TFT.locate(0,0);
    TFT.printf("Hello mbed!\n");

    FT6206.init();
    int X1 = 0, Y1 = 0, X2 = 0, Y2 = 0;
    while(1) {
        TS_Point p;
        if (FT6206.getTouchPoint(p)) {
            X1 = X2;
            Y1 = Y2;
            X2 = p.x;
            Y2 = p.y;
            TFT.locate(0,12);
            printf("Touch %3d %3d\n", p.x, p.y);
            if ((X1 > 0) && (Y1 > 0) && (X2 > 0) && (Y2 > 0)) {
                TFT.line(X1, Y1, X2, Y2, RGB(255,128,255));
            }
        }
    }
}

Kind regards, Jack.

1 Answer

9 years ago.

Hi,
Although I don't know if the TFT is similar one with Adafruit 2.8" TFT touch v2
in your code there is

//#define PIN_BL_TFT      D7

May be, you'd like to uncomment that line and define D7 as GPIO and make it high.
Or removing back-light jumper of the TFT board, which will make the backlight always on.

moto

Accepted Answer

Hi Motoo,

that's good thinking, the backlight remains of anyway. I tried to turn it on, but no luck.

Thanks to you, I actually found the problem. The PIN '5V' doesn't measure 5V. So I wonder why they call it '5V'. Also on J2, the 5V line pads do not have 5V. I have two of these boards, both are flawed. The test pad 5V does actually measure 5V, after wiring that to the 5V pin, the display works.

The display works (very) slow on this Arch Max. It takes at least 4 seconds to clear the screen. On the Arch Pro, is is maybe 0.1 Sec. Erik Olieman was of great help trying to find the root cause and pointed out that STM introduced a bug in the new mbed library, where the SPI frequency can't be adjusted for the Arch Max and is 330kHz only. Using this older mbed source fixes the issue: https://developer.mbed.org/users/Sissors/code/mbed-src2/ Many thanks, Erik!!!

posted by Jack Berkhout 12 May 2015