TFT library compatible with Due?

Me and alvesjc already ported UTFT from Henning Karlsen last month and send it to him as his the original author so he can do what feels like with that DUE version of UTFT library.

Anyway the basic info regarding the ports to change is on this post again from alvesjc:

Dimdim:
I have tried amolinero's version of the UTFT library with my ITDB32WD display with great results, as you can see in the attachment.

Tomorrow I will also try it with my own code and see if everything also runs OK.

How did you wire it up?

Did it work proper with 3.3V Logic?

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.

Here's a little video of it in action:

Hello Folks,
I have the ITDB28 (2.8" with Touchscreen, Uno Shield pin layout). Here is the product link if anyone is curious:
http://imall.iteadstudio.com/im120417020.html

I would like to use it with my Due, unfortunately the Due modifications I have run across only work with the 16bit models. Could anyone give me some pointers for getting it running in 8 bit mode?

Much appreciated!

This should work just fine, it's just that the level converters will be redundant since the Due's logic is already 3.3V. It should be OK though.

Dimdim:
This should work just fine, it's just that the level converters will be redundant since the Due's logic is already 3.3V. It should be OK though.

Oh, I'm not worried about the board's electrical compatibility, its just that the current Due modifications to the UTFT Library only work with the 16 bit models of LCD. I am curious what I would need to modify in the library to get my 8 Bit LCD running properly.

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

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

Ah, no problem :slight_smile:

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

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.

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

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

liquidice007:
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! :wink:

Regards,

Joao

HW_ARM.h (5.91 KB)

alvesjc:

liquidice007:
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! :wink:

Regards,

Joao

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

alvesjc:

liquidice007:
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! :wink:

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.

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

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

Dimdim:
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 Electronics - Henning Karlsen. But my Calender is blinking the clock is working proper.

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

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

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

// 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 = {
[/quote]

Seems not working for me only geht an white screen

jake1981:
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:
portOutputRegister is now writeable. · cmaglie/Arduino@74dea07 · GitHub

Now it works, sorry missed the patch.

Happy X-Mas