I recently bought the Kuman K60 320x240 2.8" tft LCD screen and I wrote Astroids on the arduino. But the game slows down a lot when I am drawing multible enemys and bullets.
I am using the Arduino Mega 2560 and the MCUFRIEND_kbv/Adafruit_GFX libarys.
But I do not know what the bottleneck is ... if it is the display/ the libs or the arduino. Hope someone can help me ...
You have chosen a 2.8" Blue Uno Shield. And then wonder why it is slow on a MEGA2560.
If you want to run quickly, buy a Mega Shield. Or hand-wire a Mega ProtoShield.
Most purpose-built Mega Shields are write-only. But a hand-wired Protoshield gives you the best of both worlds.
TFTs can work incredibly fast. Just look at Marek's ILI9341_due library. Or at Bodmer's TFT_HX8357 library.
The Arduino is successful purely because of the Uno. The Uno is small, cheap, easy to program and most importantly it sells in 100000s. So you have many third party shields for the Uno and virtually nothing for Mega/Due.
David.
Allready figured that, but when comparing the two (running the same program and mesuring the time for each draw) there is not much of a difference, e.g. for filling the screen only 4 ms
You have an 8-bit parallel i/f. The "best" time you could achieve for a screen fill is:
8-bit: 240 x 320 x 2 x 66ns = 10138us or 10ms
16-bit: 240 x 320 x 1 x 66ns = 5069us or 5ms
Neither of these are possible with a 16MHz mega2560.
You can do it with an ARM or Xmega.
Just be realistic. Buy a Display shield with a Mega footprint.
Or hand-wire an Adapter for your Uno footprint shield.
David.