chipKIT® Development Platform

Inspired by Arduino™

TFTv2 library

Created Fri, 20 Nov 2015 22:03:54 +0000 by jbcard


jbcard

Fri, 20 Nov 2015 22:03:54 +0000

I try to write the FTFv2 library of energia platform to fubarinoSD. My problem is the instructions in original library.

#define portOutputRegister(x) (regtype)portBASERegister(x)
#define cbi_macro(reg, mask) GPIOPinWrite(reg, mask, 0)
#define sbi_macro(reg, mask) GPIOPinWrite(reg, mask, mask)

error message : ILI9341_energia_master\FastDigitalWrite.cpp:34:15: error: 'portBASERegister' was not declared in this scope C:\mpide-0023-windows-20140821.\hardware\pic32\libraries\ILI9341_energia_master\FastDigitalWrite.cpp:41:5: error: 'GPIOPinWrite' was not declared in this scope

Have you an equivalent for fubarino ?

jbcard


majenko

Sat, 21 Nov 2015 00:06:34 +0000

The energia library is specific to energia boards - it would take quite a bit of work to port it.

What exactly are you trying to do at the moment?


jbcard

Sat, 21 Nov 2015 20:05:47 +0000

TFTv2 uses fast writing routines with Fast DigitalWrite.ccp but with PIC is not really useful. I'll see how not to use it at first. The TFTv2 library at [url]https://github.com/Seeed-Studio/TFT_Touch_Shield_V2/blob/d75bf1245597653304e100d14b90f4f55d4de80c/TFTv2.h[/url] done my response.

jbcard


majenko

Sat, 21 Nov 2015 20:46:18 +0000

What screen are you working with? It may be supported by DisplayCore (http://displaycore.org) and that sometimes (depending on screen) can use the PMP connection for blisteringly fast IO to the displays - faster even that can be achieved with direct port manipulation.


jbcard

Sat, 21 Nov 2015 21:02:21 +0000

The screen is QVGA 2.2 TFT SPI 240*320.


jbcard

Sat, 21 Nov 2015 21:05:46 +0000

With ILI9341 processor


majenko

Sat, 21 Nov 2015 21:34:25 +0000

If it's SPI then no amount of fast direct port IO is going to speed things up - it'll be slow no matter what.

I have ILI9340 support in DisplayCore, but not the ILI9341 yet.


jbcard

Sun, 22 Nov 2015 18:10:14 +0000

Ok majenko,

You have this text if you want.

[url]http://www.wdflcd.com/xz/ILI9341_AN_V0.6_20110311.pdf[/url]


pito

Sun, 22 Nov 2015 21:34:17 +0000

Use the native SPI instead of "SPI bitbanging". Ili9340 is obsolete, 9341 is newer and almost identical. With SPI on SD you can go 20-30MHz provided ili supports it. WIll work fine for text and graphics, no video via SPI, however..


jbcard

Sun, 22 Nov 2015 22:02:15 +0000

On the code for Energia is wrote

SPI.begin();
SPI.setDataMode(SPI_MODE0);
SPI.setClockDivider(2);

I don't know "SPI bitbanging". Have you an example ?


pito

Mon, 23 Nov 2015 18:39:30 +0000

:) Based on your first post I thought you bang the bits :lol:


jbcard

Tue, 24 Nov 2015 15:42:22 +0000

Yes, excuse me but English is not my native lang. I confirm that the TFT2v2 library work with SPI on the FubarinoSD. I have a good screen.

jbcard