Go Down

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


Dec 06, 2012, 09:54 am Last Edit: Dec 07, 2012, 03:18 pm by jake1981 Reason: 1
I have also got UTFT_tinyFat ported, although - it uses sdfat instead of tinyfat because I was interested in higher speeds provided by DMA and.. Well, actually.. Code was already complete, so I decided to use it..

In HW_AVR_defines.h you need to make one change:
#define bitmapdatatype uint16_t*

instead of unsigned int*

--- Updates ---

My UTFT now ships with picojpeg and comes with function that can load and display a jpeg file from SD..

I will put it here later.. It's not good implementation.. But works..


I started using amolinero's version of UTFT, tested it and it works with my ITDB02-3.2S display on itdb02 mega shield.
Haven't checked out amolinero's sources yet, so cannot say anything about it. Didn't notice significant speed ups, but I was drawing a jpeg on screen, so there's propably other reasons for slowliness..

Here's my UTFT_tinyFat - actually, it should be UTFT_SDFAT.. Get SDFAT from this forum/sdfat site (version that supports due).. And tweak the spi speed up..

To get it working, it needs to be connected to icsp header, so you need header spacers and some 2x3 icd connectors with ribbon cable (cut out cs pin and connect it to pin 52)..

image files folder is missing from my package, grab it from original utft_tinyfat package..

Here's a sample code for displaying jpeg..

Code: [Select]

#include <SdFat.h>
#include <UTFT.h>
#include <UTFT_tinyFAT.h>
#include <picojpeg.h>
#include <UTFT_picojpeg.h>

// SD chip select pin
const uint8_t chipSelect = SS;

UTFTtf myGLCD(ITDB32S, 38, 39, 40, 41);   // Remember to change the model parameter to suit your display module!

// file system
SdFat sd;

void setup()
  while (!Serial){}  // wait for Leonardo

  if (!sd.begin(chipSelect, SPI_FULL_SPEED)) sd.initErrorHalt();

  loadJpeg(myGLCD, "image15.jpg");

void loop()

display's image15.jpg from root of SD.. Check out picojpeg - it doesn't support all jpegs..
And my routine isn't foolproof - there's not that much checking so beware to disappoint :)

Or improve it..


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.


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.


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:
Check all my projects based on Atmel/Arduino -> www.aqualed-light.com

Go Up