New UTFT Libray with Arduino ARM spport

I found this this morning: NEW UTFT 2.0 Library.
Released about 10:00 AM PST 1/21/2013, Has support for Arduino, Arduino ARM and ChipKit Uno and Max32.
Partial release notes:
2.0 21 Jan 2013 - added support for Arduino Due and Arduino Leonardo
added support for the "AquaLEDSource All in One Super Screw Shield" on chipKit Max32
added support for more display modules
fixed a bug in printNumF()
optimized drawLine()
optimized 16bit data transfer
optimized some 8bit data transfer
added option to use pre-defined RGB565 values with setColor(), setBackColor() and fillScr()
added functions getColor(), getBackColor(), getFont(), getFontXsize() and getFontYsize()
added 16 VGA standard colors as pre-defined color literal
rearranged the manual to keep related functions grouped together

Bob

Nice, hopefully we'll have a flood of Due based graphical apps soon. Indie games are the best, ones on an Arduino would be even better.

Hi .

I have examples for you

Arduino DUE + 5" SSD1963 LCD 800 x 480
Speed on the OLD UTFT(mod for due) VS NEW UTFT lib

OLD ONE

NEW ONE !

This is It !

It appears the new video is set to private.

Sorry,my phone does this by default

Now it's ok

Would say the new one is faster.

Faster ?
This is a rocket ! :slight_smile:

Sorry,my phone does this by default

Now it's ok

Cheers, looks good. I'm curious to know weather there is a significant difference between the 320x240 and 800x480 screens, probably more to do with the MPU rather than the display driver IC.

kamil_szczepan:
Hi .

I have examples for you

Arduino DUE + 5" SSD1963 LCD 800 x 480
Speed on the OLD UTFT(mod for due) VS NEW UTFT lib

OLD ONE
http://www.youtube.com/watch?v=u4U6vxT_m9k

NEW ONE !
- YouTube

This is It !

That looks an improvement on the original hardware & UTFT library.

However - I'm curious how you got round the way the fonts are stored. In normal Atmel processors the data for fonts or bitmaps is stored in flash, using pgmspace.h
No longer applicable to M3Cortex CPUs....

Are they being parked in regular RAM now? If so - how? normal but large arrays?

Good to see Henning burning the midnight oil :slight_smile:

Graeme

Where can this library be downloaded?

I found a copy here in RAR format.

http://henningkarlsen.com/electronics/download.php?f=UTFT.rar

http://www.henningkarlsen.com/electronics/library.php?id=51

{stupid error snipped}

bad code ,, mea culpa
??

I am trying to get a SainSmart 3.2" 320x240 TFT LCD (it uses the SSD1289 controller) working with the Due board. I have downloaded the latest UTFT library from Henning Karlsen (dated 1/20/13) and it compiles and loads onto my Due without error. However, nothing on the display. This led me to check the shield (supplied by SainSmart) which was apparently designed for the Mega board. I "buzzed" out the pins from the display connector through to the Due pin assignments on the SainSmart shield and the shield appears to be way off. I had presumed (mistakenly) that, based upon the Arduino concept, the pinouts for a Due board would be the same for the Mega board (by function). So, does anyone know of a shield that can be used without too much modification to connect this display to the Due? Does anyone have the pin assignment on the Due board needed to run the SSD1289 controller? Does anyone know if the Due board is set up to use 8080 or 6800 timing? Does anyone know what pins on the Due are used for external data lines D0-D15 and for the control lines of WR, RD, CS, and D/C (8080 timing) or E, CS, R/W, D/C (6800 timing) required by the SSD1289? It appears from the software library that pins 32, 38, 39, 40, and 41 are used as the control signals (the statement myGLCD(TST01_32, 38, 39, 40, 41)), but I can't find a correlation to any of the control timing signals (WR, RD, CS, E, etc.).

I presume that I am going to have the same questions about the touch controller on the SainSmart display and also the SD drive, so info on the Due pins used for those would also be very helpful.

I have a suggestion: would it be possible to have a single web location where all of this type of information is centrally posted for the Due board? I did find the pinout diagram at robgray.com/temp/Due-pinout and this is what enabled me to do the testing of the SainSmart shield (excellent work on this diagram -- thanks!). I certainly would post whatever I learn and also to help pay for this if needed (I would be happy to donate USD$100+ to a fund). I have 20 years of background running an electronics (automation) company and I know how much time/effort can be saved for everyone by some organizational tools.

Thank you! Patrick

Here is the modified UTFT library with a newly routed shield for DUE,
all Data pins are routed to PORTC and all command pins are routed to PORTD
only 4 instructions are needed per write strobe.

Filling the screen 800x480 once will take 212ms
Filling the screen 800x480 with an image directly reading from SPI flash using 42Mhz speed with DMA will take 312ms

This should be the maximum ability of DUE as i think should be the mostly optimized.
Of course, any chance to make it faster will be appreciated. ]:smiley:

The library is here
http://coldtears.lin3.siteonlinetest.com/files/Arduino_DUE_TFT_library.zip

Very nice.

I'm not up with the due yet ( ordered and waiting ), the two ports A & C, I'm assuming are 32-bits wide. If this is the case, does this mean there is around 40 unused pins?

If so are they usable, I'm thinking along the lines of 'probably not' without changing the single write to a mask of bits. Maybe the due has someway of dealing with this.

I'm just wondering as there only appears to be a few port B and D pins left without A & C.

There is a typo, all command lines are routed to PORTD ( PD0-PD3)
and data lines are routed to PORTC

The pins left for use will probably be those on horizontal headers on DUE (just like MEGA2560) where they are not occupied by the shield. Should be around 4x8=32pins left unused

Rather than just refer to a port, can you reference the actual pin numbers (IC and board connection) used for D0-D15 of a display and WR, RD, CS, E, D/C used for LCD control? Also, does the code employ 8080 or 6800 timing? I have a new shield on order, but I would still like the pin numbers so that I can start looking at the code and understand the hardware. Also, if you have the pinout for the touch screen and the SD drive, that will be next.

Thanks!

The data pins are routed to PC1-8 (lower 8 bit) and PC12-19 (higher 8 bit), so you probably need to shift your lower 8 bit to the right<<1, and higher 8 bit to the right <<12, and then you can strobe the WR pin. So you will need 3 arduino command for one WR strobe.
Like this:
REG_PIOC_CODR=0xFF1FE;
REG_PIOC_SODR=(VL<<1) & 0x1FE;
REG_PIOC_SODR=(VH<<12) & 0xFF000;
pulse_WR();

For the 4 command pins, they are routed to PD1-4. This should be straight forward.
This is possible because the creator of DUE has made perfect routing of these lines to the 2x20 header.

SD Card will be directly connected to the SPI interface on the 6pin header in the center of the DUE board(DUE only has SPI access on this 6pin header).

Schematic is http://coldtears.lin3.siteonlinetest.com/files/CTE_DUE_shield.zip ]:slight_smile:

coldtears:
The data pins are routed to PC1-8 (lower 8 bit) and PC12-19 (higher 8 bit), so you probably need to shift your lower 8 bit to the right<<1, and higher 8 bit to the right <<12, and then you can strobe the WR pin. So you will need 3 arduino command for one WR strobe.
Like this:
REG_PIOC_CODR=0xFF1FE;
REG_PIOC_SODR=(VL<<1) & 0x1FE;
REG_PIOC_SODR=(VH<<12) & 0xFF000;
pulse_WR();

For the 4 command pins, they are routed to PD1-4. This should be straight forward.
This is possible because the creator of DUE has made perfect routing of these lines to the 2x20 header.

SD Card will be directly connected to the SPI interface on the 6pin header in the center of the DUE board(DUE only has SPI access on this 6pin header).

Schematic is http://coldtears.lin3.siteonlinetest.com/files/CTE_DUE_shield.zip ]:slight_smile:

This is very useful thanks.

Do you have a key to the values of the other components on the board?