Open Smart TFT

Hallo Gemeinde,

um ein kleines Projekt zu realisieren möchte ich gern ein TFT-Display verwenden:

http://www.dx.com/p/open-smart-3-0-240-400-tft-lcd-shield-breakout-module-for-arduino-447145#.WOYmzGekKM8

Es gibt dazu die libs: Adafruit_GFX.h und MCUFRIEND_kbv.h
Das Beispiel läuft soweit. Allerdings habe ich an einer Seite einen ca. 5mm breiten weißen Streifen.
Habe bisher leider dazu keine Lösung finden können.
Der Treiber wird im Testsketch als 0x9326 identifiziert.

Bisher habe ich das Board an einem Uno R3 und an einem Nano probiert.

Kann mir jemand einen Tipp dazu geben?

Gruß und Dank

Hannes

Hallo,
neue oder alte Library?
!!!NOTE:

DO NOT! DO NOT! DO NOT update directly from the Arduino IDE.

You should know that the library you update directly from the Arduino IDE is not provided by us.
Maybe it is written by somebody else.
Please follow me: and do not update from Arduino IDE
Please download the new library from the google driver. TFT LCD Shield 3.2" w/ Touch Screen - Google Drive
All the four libraries in the folder of "Arduino library" must be put in the derectory of ../Arduino-1.xx/libraries, and then restart the IDE.
We have test the four examples in the derectory of D:\arduino-1.6.5-r2\libraries\MCUFRIEND_kbv\examples.

Gruß und Spaß
Andreas

Hallo Andreas,

hab aufgeräumt und nur noch die Bibliotheken aus dem Link benutzt. IDE neu gestartet, leider mit gleichem Ergebnis.
Es gibt ja ein 3" und ein 3,2" Display. Muss ich das vielleicht noch irgendwo anpassen?

Danke und Gruß

Hannes

Hallo,
dann solltest Du in Deinem LibraryOrdner zwei Ordner haben.

Adafruit_GFX
MCUFRIEND_kbv

Wenn Du keine Fehlermeldungen hast, könnte es ein VerdrahtungsFehler sein.
Diesen Streifen kenne ich nur beim Resetten oder Sketch laden.
Gruß und Spaß
Andreas

Hallo Andreas,

neben den von Dir genannten Ordnern gibt es noch: "LM75" (ist für einen optionalen Temp-Sensor) und "TouchScreen"
Fehlermeldungen gibt es keine.
Die Verdrahtung hab ich mehrfach geprüft und an 2 verschiedenen Arduinos probiert.

Schade, werde mich wohl nach einem anderen Display umschauen müssen.

Gruß und Dank

Hannes

SkobyMobil:
Hallo,
neue oder alte Library?
!!!NOTE:

DO NOT! DO NOT! DO NOT update directly from the Arduino IDE.

You should know that the library you update directly from the Arduino IDE is not provided by us.
Maybe it is written by somebody else.
Please follow me: and do not update from Arduino IDE
Please download the new library from the google driver. TFT LCD Shield 3.2" w/ Touch Screen - Google Drive
All the four libraries in the folder of "Arduino library" must be put in the derectory of ../Arduino-1.xx/libraries, and then restart the IDE.
We have test the four examples in the derectory of D:\arduino-1.6.5-r2\libraries\MCUFRIEND_kbv\examples.

Gruß und Spaß
Andreas

Hello,

I encountered a color display problem

the colors were inverted

I was able to solve this problem by reversing the data

From "write16(color);"
To "write16(color^0xFFFF);"

MCUFRIEND_kbv.cpp 3 times:

void MCUFRIEND_kbv::pushColors(uint16_t * block, int16_t n, bool first)
{
    uint16_t color;
    CS_ACTIVE;
    if (first) {
        WriteCmd(_MW);
    }
    CD_DATA;
    while (n-- > 0) {
        color = *block++;
        write16(color^0xFFFF);
    }
    CS_IDLE;
}

void MCUFRIEND_kbv::pushColors(uint8_t * block, int16_t n, bool first)
{
    uint16_t color;
    uint8_t h, l;
    CS_ACTIVE;
    if (first) {
        WriteCmd(_MW);
    }
    CD_DATA;
    while (n-- > 0) {
        h = (*block++);
        l = (*block++);
        color = h << 8 | l;
        write16(color^0xFFFF);
    }
    CS_IDLE;
}

void MCUFRIEND_kbv::pushColors(const uint8_t * block, int16_t n, bool first)
{
    uint16_t color;
    uint8_t h, l;
    CS_ACTIVE;
    if (first) {
        WriteCmd(_MW);
    }
    CD_DATA;
    while (n-- > 0) {
        l = pgm_read_byte(block++);
        h = pgm_read_byte(block++);
        color = h << 8 | l;
        write16(color^0xFFFF);
    }
    CS_IDLE;
}

Model of my 3.2" LCD:
https://pt.aliexpress.com/store/product/3-2-TFT-LCD-Display-module-Touch-Screen-Shield-board-onboard-temperature-sensor-w-Touch-Pen/1199788_32755473754.html

I would like to compile for the arduino due, the example that loads the bmp images stored on the sd card,

But an error is occurring:

showBMP_kbv_as7:122: error: 'SPCR' was not declared in this scope

SPCR = spi_save;
exit status 1
'SPCR' was not declared in this scope

How can i do to convert this code to operate with the arduino due?

Because the Mega arduino is very slow, and the Arduino Due will be able to achieve better performance of this display that seems to be very good.

Thank you!

rtek1000:
Hello,

I encountered a color display problem

the colors were inverted

I was able to solve this problem by reversing the data

From "write16(color);"
To "write16(color^0xFFFF);"

MCUFRIEND_kbv.cpp 3 times:

void MCUFRIEND_kbv::pushColors(uint16_t * block, int16_t n, bool first)

{
    uint16_t color;
    CS_ACTIVE;
    if (first) {
        WriteCmd(_MW);
    }
    CD_DATA;
    while (n-- > 0) {
        color = *block++;
        write16(color^0xFFFF);
    }
    CS_IDLE;
}

void MCUFRIEND_kbv::pushColors(uint8_t * block, int16_t n, bool first)
{
    uint16_t color;
    uint8_t h, l;
    CS_ACTIVE;
    if (first) {
        WriteCmd(_MW);
    }
    CD_DATA;
    while (n-- > 0) {
        h = (*block++);
        l = (*block++);
        color = h << 8 | l;
        write16(color^0xFFFF);
    }
    CS_IDLE;
}

void MCUFRIEND_kbv::pushColors(const uint8_t * block, int16_t n, bool first)
{
    uint16_t color;
    uint8_t h, l;
    CS_ACTIVE;
    if (first) {
        WriteCmd(_MW);
    }
    CD_DATA;
    while (n-- > 0) {
        l = pgm_read_byte(block++);
        h = pgm_read_byte(block++);
        color = h << 8 | l;
        write16(color^0xFFFF);
    }
    CS_IDLE;
}




Model of my 3.2" LCD:
https://pt.aliexpress.com/store/product/3-2-TFT-LCD-Display-module-Touch-Screen-Shield-board-onboard-temperature-sensor-w-Touch-Pen/1199788_32755473754.html

I would like to compile for the arduino due, the example that loads the bmp images stored on the sd card,

But an error is occurring:
How can i do to convert this code to operate with the arduino due?

Because the Mega arduino is very slow, and the Arduino Due will be able to achieve better performance of this display that seems to be very good.

Thank you!

Sorry, my lcd driver is the ILI9327,

And your link library is already fixed, the data is already being reversed:

TFT LCD Shield 3.2" w/ Touch Screen - Google Drive

But still can not be compiled for Arduino Due

"#include <avr/io.h>" and "'SPCR' was not declared in this scope"

Thank you again!

Hello,

I did not find a simple way to calibrate the reference value to read the resistive touch screen, the 3.2 Inch Smart Open screen with the ILI9327 controller, so I decided to set up an approximation routine with at least 2 passes, the value becomes acceptable.

uint16_t TS_LEFT = 1095; // L
uint16_t TS_RT = 252; // R
uint16_t TS_TOP = 955; // T
uint16_t TS_BOT = 135; // B

// is controller wired for Landscape ? or are we oriented in Landscape?
if (SwapXY != (Orientation & 1)) SWAP(tp.x, tp.y);

xpos = map(tp.x, TS_LEFT, TS_RT, 0, tft.width());
ypos = map(tp.y, TS_TOP, TS_BOT, 0, tft.height());

If someone is interested, it only works with the orientation value 0, the value will not be saved, it will only be displayed on the screen and will be sent through the serial port. But could be implemented eeprom memory to store the value.

Calibration.zip (2.78 KB)

Hast Du mit dem Händler gesprochen? Könnte theoretisch auch ein kaputtes Display sein.
Grüße Uwe