www.mcufriend.com working in arduino uno and arduino mega

This week i have worked hard, and I have the solution for this 2.8" TFT touch panel buyed in ebay:
http://www.ebay.es/itm/351206859044?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649.

I attach the Arduino Uno version and Arduino Mega version library.

This is the final version, I have refurbished the example sketches, and now work fine with Arduino UNO and Arduino MEGA, including the SD card reader.

I include a new version of SD library developed by ADAFRUIT (GitHub - adafruit/SD: fixes & updates to the Arduino SD library - totally in progress. works but in beta).
You must extract the library in the default path in program files and overwrite the original sd library files.

Sorry my broken English:

Front.jpg

Back.jpg

MCUFried TFT Display UNO y MEGA libraries.zip (476 KB)

buhosoft:
This week i have worked hard, and I have the solution for this 2.8" TFT touch panel buyed in ebay:
http://www.ebay.es/itm/351206859044?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649.

I attach the Arduino Uno version and Arduino Mega version library.

Sorry my broken English:

Thank you! I have got something out of my display on my Mega.

The only issue is some strange lines on my display, any ideas how to fix? I'll post pictures.

Dear buhosoft, after creation some example from your code, here is a one problem.
I have readed value from incrementation buttons (graphically created Increment and Decrement btns) and after printing it to display, this was overlapped to unidentifiable signs.

What does this mean ? How do I display correct clear numbers ? (f.e. at this moment if I increment a value from 18.0 to 18.5, there is displayed last digit zero together with 5)

I'm electronic teacher, and I have four display shield, two work fine and two have strage white line in the bottom side.

buhosoft:
I'm electronic teacher, and I have four display shield, two work fine and two have strage white line in the bottom side.

I see, are they faulty?

If you don't fill the screen with black it seems OK.

Thank you very much, after ages of looking through threads I've finally found a solution. I'll share this to all the other threads I looked on :slight_smile:

Thanks

dmarkey:
I see, are they faulty?

If you don't fill the screen with black it seems OK.

Yes the displays are cheap and quality poor.

Bobo:
Dear buhosoft, after creation some example from your code, here is a one problem.
I have readed value from incrementation buttons (graphically created Increment and Decrement btns) and after printing it to display, this was overlapped to unidentifiable signs.

What does this mean ? How do I display correct clear numbers ? (f.e. at this moment if I increment a value from 18.0 to 18.5, there is displayed last digit zero together with 5)

Use the new library and test the example:cuadros.

update sketch cuadros for Arduino Mega without mirror and Arduino Uno

#if defined AVR_ATmega2560
tft.setRotation(4);
#endif

Cuadros.ino (7.16 KB)

Hello! I'd like to add some comments regarding this display.
I got it from DX last week, like others. After fiddling couple of long unsuccesful evenings with this display showing only white screen on different boards (clones - Duemilanove, Uno, Mega1280), sometimes this white screen seemed to blink - actually white lines were alternating odds/evens, I noticed, that some days ago one buyer left review for this particular screen model in the same auction ID, which I bought, saying that it is ILI9341 chip in LCD and he succesfully used Adafruit's TFTLCD library.
But still I couldnt get it to work with this library using LCD controller auto-detection.
In my case auto detection started to work, when I uncommented in Adafruit_TFTLCD.cpp file lines 878 to 883 (the first FOR cycle in "uint16_t Adafruit_TFTLCD::readID(void)" function) - then it auto-detected chip and started to work.
Also display works if I forcefully assign ID of this particular display e.g. 0x9341. I guessed, that this LCD controller needed some kind of "push" for reading full memory - strange.
My guess, that this display from "mcufriend" lacks some filtering capacitors on power lines from arduino board, hence artifacts like those lines on half of display and unstable detection on some copies. My display shows such lines, when I power 'duinos from exrternal battery or power supply, but works without artifacts from USB. I'll try to add some later and see if it changes something.

Note: disconnecting touch panel does not affect those white lines, although touch panel uses some data pins from duino - tried that.

Also there is free unpopulated connector labeled CON1 but without pinout markings. It turns out it is only 3.3v tolerant pinout and here I give You what I found out using multimeter (GND and 3.3V pins You can find easily with multimeter)

Look from bottom side as You can read shield name and website name (like in OP photo up):

|<- edge of board

LCD_D7 o o LCD_D6
LCD_D5 o o LCD_D4
LCD_D3 o o LCD_D2
LCD_D1 o o LCD_D0
LDC_WR o o LCD_RD
LCD_CS o o LCD_RS
 SD_SS o o SD_SCK
 SD_DO o o SD_DI
   3v3 o o GND

Onboard 3.3v stabilizer U1 is only for SD card LCD

Hope this helps someone.

My latest program based on Buhosoft files added here before, is running.
At this moment I have created simple start program (only design display) for room thermostat which is communicated via I2C.
Here you have a code as an example. Libraries used for it is based on mentioned Buhosoft files.

Sorry for hard designed code. At this moment is in progress.

I would like add icons from SD card instead of menu text. But I don't know how do I link a SD card this MCUfriend module to Ard. MEGA. If you have an idea and functional code, please help me with. Thanks.

Mega_thermostat_I2C.ino (8.35 KB)

Can anyone help me out here? It's to do with the programming as I followed this thread tog get mine to work.

http://forum.arduino.cc/index.php?topic=294603.0

b8el018:
Can anyone help me out here? It's to do with the programming as I followed this thread tog get mine to work.

TFTLCD if statements - Displays - Arduino Forum

The resistive sensor use 0 to 1023 int to red x and y coordinates you must remap this coordinates to 320 or 240 pixel TFT.

Dear buhosoft,

Thank you for your advice but...

Did you update the libraries attached to this thread?

Because now I have loaded them it doesn't work, I have also updated my IDE to 1.0.6.

I tried the old libraries and they, the ones that used to work, now don't work either.

The location of my libraries is : My Documents/Arduino/libraries

There are no errors and I definitely uncommented the shield line

I can't think what's different, sorry this is slightly off-topic, I just really want to get this to work.

Thanks

b8el018:
Dear buhosoft,

Thank you for your advice but...

Did you update the libraries attached to this thread?

Because now I have loaded them it doesn't work, I have also updated my IDE to 1.0.6.

I tried the old libraries and they, the ones that used to work, now don't work either.

The location of my libraries is : My Documents/Arduino/libraries

There are no errors and I definitely uncommented the shield line

I can't think what's different, sorry this is slightly off-topic, I just really want to get this to work.

Thanks

Yes I updated the library to only one library for Arduino Mega and Arduino Uno, I use enviroment variable to select the correct header file.

buhosoft:
Yes I updated the library to only one library for Arduino Mega and Arduino Uno, I use enviroment variable to select the correct header file.

Can you explain what I must do to setup new libraries for my Uno Shield?

Thanks

One method to remove Arduino libraries is to:
find where your personal sketches are stored, do this by looking at preferences under the files tab in the Arduino IDE
open your personal sketches folder and select the libraries folder within it
choose (highlight) the library you want to delete and press the delete key.
restart the Arduino IDE.

I hope this helps. I did this on a Windows Vista machine to get rid of all the libraries that did not work with this 2.8 inch display.

Please note this will remove the library and hence it cannot work with other sketches you may have written and want to keep working.

http://forum.arduino.cc/index.php?topic=292777.0

This week i have worked hard, and I have the solution for this 2.8" TFT touch panel buyed in ebay:
http://www.ebay.es/itm/121416820943?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649

I attach the Arduino Uno version and Arduino Mega version library.

This is the final version, I have refurbished the example sketches, and now work fine with Arduino UNO and Arduino MEGA, including the SD card reader in Arduino MEGA.

I include a new version of SD library developed by ADAFRUIT (GitHub - adafruit/SD: fixes & updates to the Arduino SD library - totally in progress. works but in beta).
You must extract the library in the default path in program files and overwrite the original sd library files.

I include a new S6D0154 TFT library developed by ishidoriyan (GitHub - samuraijap/TFTLCD-Library: Arduino library for 8-bit TFT LCDs such as ILI9325, ILI9328, etc byMCUFRIEND ).

Sorry my broken English:

MCUFried S6D0154 TFT Display UNO y MEGA libraries.zip (594 KB)

24-tft-lcd-displey-shield-front.jpg

24-tft-lcd-displey-shield-back.jpg

You are awesome. Thank you so much! You saved me a lot of work.