Go Down

Topic: www.mcufriend.com working in arduino uno and arduino mega (Read 98681 times) previous topic - next topic

buhosoft

Jan 16, 2015, 12:13 pm Last Edit: Feb 07, 2015, 01:01 pm by buhosoft Reason: Last UPDATE
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 (https://github.com/adafruit/SD).
You must extract the library in the default path in program files and overwrite the original sd library files.

Sorry my broken English:


dmarkey

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.

felixLU

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)

buhosoft

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


dmarkey

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.

b8el018

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

Thanks

buhosoft

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.

buhosoft

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.

buhosoft

update sketch cuadros for Arduino Mega without mirror and Arduino Uno

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

zombpj

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

Code: [Select]

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

felixLU

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.


b8el018

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

buhosoft

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

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

buhosoft

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.

Go Up