Go Down

Topic: TFT library compatible with Due? (Read 12542 times) previous topic - next topic

Dimdim

I'm sorry, there seems to be a mixup.. I was replying to a post that now appears to be gone (it was regarding a shield that simplified wiring a TFT to a MEGA). :(


I'm sorry, there seems to be a mixup.. I was replying to a post that now appears to be gone (it was regarding a shield that simplified wiring a TFT to a MEGA). :(


Ah, no problem :)

Markus_L811


I'm sorry, there seems to be a mixup.. I was replying to a post that now appears to be gone (it was regarding a shield that simplified wiring a TFT to a MEGA). :(

Yes that was me, my post and I killed the post in hurry klicked the wrong button.

I found this Shield http://imall.iteadstudio.com/development-platform/arduino/shields/im120417024.html that works with Boards with 3.3V or 5V so it would make it easy to use an TFT with the UTFT Lib and dimdim's modifications. So you have the tft and the touch function together.

alvesjc

#18
Dec 14, 2012, 01:23 am Last Edit: Dec 14, 2012, 01:44 am by alvesjc Reason: 1
Hi.

Speaking about speed in UTFT, would be nice to do some comparison.

We have two distinct situations.

With ITDB32WD I get 32s, with ITDB32WC my friend get 29,5s

Here is our code running in the ITDB32WC

http://youtu.be/-hWRFVth1iQ


By the way, how do I set the youtube link to directly display the movie here?
www.aqualedsource.com

alvesjc


I am curious what I would need to modify in the library to get my 8 Bit LCD running properly.


Hi.

I've included code for 8 bit mode.

Replace (doing backup of your current file) the HW_ARM.h file in your library with the one attached with your IDE closed.

I don't have a display to test it, but should work, try it! ;)

Regards,

Joao
www.aqualedsource.com



I am curious what I would need to modify in the library to get my 8 Bit LCD running properly.


Hi.

I've included code for 8 bit mode.

Replace (doing backup of your current file) the HW_ARM.h file in your library with the one attached with your IDE closed.

I don't have a display to test it, but should work, try it! ;)

Regards,

Joao


Thank you, I will give this a try and let you know how it goes.



I am curious what I would need to modify in the library to get my 8 Bit LCD running properly.


Hi.

I've included code for 8 bit mode.

Replace (doing backup of your current file) the HW_ARM.h file in your library with the one attached with your IDE closed.

I don't have a display to test it, but should work, try it! ;)

Regards,

Joao


Ok, replaced the file and modified the demo code with this:

UTFT myGLCD(ITDB28,59,58,57,56);

Where 59-56 are the Due hardware pins corresponding to RST,CS,WR,RS

Unfortunately this did not work and I am still left with only a backlight on my LCD.

alvesjc

Hummm, ok.

I don't understand why then, it should work, I'm using the same pins as in 16bit mode for the high port.

Without one to test, I can't move forward, sorry.

Regards,

Joao
www.aqualedsource.com

Markus_L811


One more thing.. Henning's utouch library (support for touch screen) works out of the box on due..

So now we have initial support for touchscreens with sd slots for due.

Henning's utouch library works without any changes.

Markus_L811

#24
Dec 19, 2012, 09:03 am Last Edit: Dec 19, 2012, 09:36 am by Markus_L811 Reason: 1

I wired it up according to UTFT's documentation, adapting it to the specific TFT. It was not difficult. I should point out that it is an ITDB32WD compatible display that I got off of ebay, and not an ITead original.

The display works natively with 3.3V logic (I had to use resistors to use it with the older Arduinos) so it is actually easier to interface to the Due than to older Arduinos.


Did someone has an benchmark from the lib between oldone on mega how fast is it?

I try to convert the UFT Clock from Henning Karlsen to work with the Due http://henningkarlsen.com/electronics/p_utft_analog_clock.php. But my Calender is blinking the clock is working proper.

pYro_65

Did someone has an benchmark from the lib between oldone on mega how fast is it?


I don't use the UTFT library, but I have a sainsmart TFT shield with a mega using an SSD1289. I'm interested to see how it compares to the Due implementation.

An easy, but important test is clearing the screen. To be able to present games flicker free, the clear operation needs to be one of the fastest.
I have achieved a rate of 51fps for a clear screen operation on a mega 2560, this is in a loop clearing to a random colour.

It will be interesting to see how well the Due performs in this basic operation.

thatdude624



I don't use the UTFT library, but I have a sainsmart TFT shield with a mega using an SSD1289.
I have achieved a rate of 51fps for a clear screen operation on a mega 2560, this is in a loop clearing to a random colour.

then what Library are you using? I also have a Mega and a TFT display, but it takes about a second to clear the screen! I would love to have it run faster!

also, I hope this gets noticed by the creator of the UTFT library, who wants to port it to the Due but can't because he doesn't yet own one. I guess this would make porting a whole lot easier.

Markus_L811


Yeah, the library should be cleaned up.. It's a bit messy.. But this is a great starting point for everyone needing a display for due..

Here's one more thing, when using samples (or doing your own) - you need to change bitmap definitions a bit to make it work.. For example, tux.c in UTFT_Rotate_Bitmap example:

Code: [Select]

// Generated by  : ImageConverter 565 v1.0
// Generated from: tux.png
// Time generated: 11.10.2010 22:51:32
// Size          : 2 048 Bytes

//#include <avr/pgmspace.h>

const unsigned int tux[0x400] = {
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xE73C, 0x9CD3, 0x9CF3, 0xA514,   // 0x0010 (16)


it should start like this..
comment out #include <avr/pgmspace.h>
and change variable definition to:
const unsigned int varname[size] = {


Seems not working for me only geht an white screen

Markus_L811


Yes, but you need to get itdb02_32s display and mega shield for it from iteadstudio.com, these sources are compatible with that display and propably only with that display, other than 16bit modes are removed and this library only supports arduino due as I replaced and removed code, instead of just making it compatible with due along others. But here's a library, examples work "as is" with mega pins chosen on utft init..

Oh, one more thing.. You need to apply this patch:
https://github.com/cmaglie/Arduino/commit/74dea07f2c7e977bacf5c61f7e8502609b285dbb


Now it works, sorry missed the patch.

Happy X-Mas

pYro_65


then what Library are you using? I also have a Mega and a TFT display, but it takes about a second to clear the screen! I would love to have it run faster!


I'm having a go at building my own driver, the mainstream libraries are too slow for games and interactivity. They all suffer a similar overhead with respect to being portable between uC's and compatible with multiple devices. Whereas I've targeted my code directly to the 2560 and the display. I'll post the code on the forums eventually.

Go Up