Color Touchscreen and LC

Status
Not open for further replies.

Constantin

Well-known member
Hi guys and gals,

Has anyone here tried to use the color touchscreen with the Teensy LC? Can it be done or will one quickly run out of RAM?
 
I ran my sample touchcode old example "IntTouchPaintDebLC" on the Teensy LC and it worked. Recompiling now I get these stats.

Using : #include "Adafruit_ILI9341.h"

It runs more slowly with adafruit than ILI9341_t3 - but RAM doesn't seem to be a killer issue.

On a T_3 the compile reports this::
Sketch uses 28,608 bytes (10%) of program storage space. Maximum is 262,144 bytes.
Global variables use 5,140 bytes (7%) of dynamic memory, leaving 60,396 bytes for local variables. Maximum is 65,536 bytes.

Same code compiled for LC reports this::
Sketch uses 20,184 bytes (31%) of program storage space. Maximum is 63,488 bytes.
Global variables use 2,656 bytes (32%) of dynamic memory, leaving 5,536 bytes for local variables. Maximum is 8,192 bytes.
 
Last edited:
My GitHub samples https://github.com/Defragster/XPT2046_Touch_Examples may no longer contain this but swapping in as needed this makes it work:

Code:
#define LC 1 // comment out to use ILI9341_t3

#if LC
#include "Adafruit_ILI9341.h"
#else
#include <ILI9341_t3.h>
#endif

#ifdef LC
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
#else
ILI9341_t3 tft = ILI9341_t3(TFT_CS, TFT_DC);
#endif

I pulled it out because going to multi-file sketch meant this code was needed in two places.
 
Last edited:
Status
Not open for further replies.
Back
Top