[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 580: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 636: sizeof(): Parameter must be an array or an object that implements Countable
Brads Electronic Projects Forum • Firewing Color TFT Library
Page 1 of 1

Firewing Color TFT Library

Posted: Tue Jul 09, 2013 8:28 am
by bitfogav
Hi everyone.

I have been working with David Barker to put together a Color TFT library, but I must say that David has done alot of the work..

I have a Demo Video which is a port from the Arduino TFT Demo.
The Demo is running on a Firewing board which is clocking at 80Mhz..



This is an early test video when I was trying to interface the TFT with Firewing Board..


Re: Firewing Color TFT Library

Posted: Wed Jul 10, 2013 12:09 pm
by brad
Nice one bitfogav! How many FPS can you get from this when running at 80Mhz?
How many colors can you get from it?

Do you have the code for your demo video?

Re: Firewing Color TFT Library

Posted: Thu Jul 11, 2013 6:19 am
by bitfogav
brad wrote:How many FPS can you get from this when running at 80Mhz?
Im sorry I can't really give you an FPS Brad, it depends on the render time it takes within the Graphic subroutines and what you are sending out to the display.. But it is pretty quick!.
brad wrote:How many colors can you get from it?
The shield we have used is one from IteadStudio 2.4 TFT Display. It has just over 262K of colors.
We have a routine abit like - "SetPenColor(255, 255, 255)" within each parameter you can enter a value between 0-255, which represents (RED, GREEN, BLUE).
brad wrote:Do you have the code for your demo video?
I have some example code below, but all the examples including the code will be released soon. :)

Code: Select all

   ' drwa header and footer
   Tft.Clear()  
   Tft.SetBrushColor(255, 0, 0)
   Tft.FillRect(0, 0, 319, 13)
   Tft.SetBrushColor(64, 64, 64)
   Tft.FillRect(0, 226, 319, 239)                          
   Tft.SetFont(Fixed)
   Tft.Brush.Style = BrushStyle.IsClear
   Tft.Graphic.Align = TextAlign.Center
   Tft.SetPenColor(255, 255, 255)
   Tft.WriteStr(160,3,"* Firewing Color Tft Display Library *")
   Tft.SetPenColor(255,255,0)
   Tft.WriteStr(160,229,"<http://www.firewing.info>")
            
   ' draw border
   Tft.SetPenColor(255,255,255)
   Tft.SetBrushColor(0, 0, 255)
   Tft.Rect(0, 14, 319, 225)

   ' draw crosshairs
   Tft.SetPenColor(0, 0, 255)
   Tft.setBrushColor(0, 0, 0)
   Tft.Line(159, 15, 159, 224)
   Tft.Line(1, 119, 318, 119)
   for i as ushort = 9 to 310 step 10
      Tft.Line(i, 117, i, 121) 
   next
   for i as ushort = 19 to 220 step 10
      Tft.Line(157, i, 161, i)    
   next    
  
   ' Draw sin-, cos- and tan-lines  
   Tft.SetPenColor(0,255,255)
   Tft.WriteAt(5,15,"Sin")
   for i as ushort = 1 to 317
      Tft.SetPixel(i,119 + (sin(((i*1.13)*3.14)/180)*95))
   next
  
   Tft.SetPenColor(255,0,0)
   Tft.WriteAt(5,27,"Cos")
   for i as ushort = 1 to 317
      Tft.SetPixel(i,119+(cos(((i*1.13)*3.14)/180)*95))
   next

   Tft.SetPenColor(255,255,0)
   Tft.WriteAt(5,39,"Tan")
   for i as ushort = 1 to 317
      Tft.SetPixel(i,119+(tan(((i*1.13)*3.14)/180)))
   next

Re: Firewing Color TFT Library

Posted: Thu Jul 11, 2013 7:05 am
by brad
I have had in my mind to write a module for SF Basic for the 32x32 LED matrix. All this info here will come in handy fo that! (If I ever get around to doing it.) So far I have been able to draw individual pixels, box outlines, filled boxes and I had a bit of a hard time getting lines to be drawn.

One day I'll get there.

By the way, $19 for a TFT touch screen! Bargain!

Re: Firewing Color TFT Library

Posted: Thu Jul 11, 2013 7:12 am
by bitfogav
brad wrote:I have had in my mind to write a module for SF Basic for the 32x32 LED matrix. All this info here will come in handy fo that! (If I ever get around to doing it.) So far I have been able to draw individual pixels, box outlines, filled boxes and I had a bit of a hard time getting lines to be drawn.
Yes of course I still got my 32x32 Led matrix to get around too as well, Look at the GLCD library in Swordfish? im sure that will help :wink:

Re: Firewing Color TFT Library

Posted: Fri Jul 12, 2013 5:50 am
by bitfogav
Ive just posted on the Firewing Wiki..

Introduction into the Firewing Color TFT Library

And a list of samples for the Color TFT Library
Sample Codes

Re: Firewing Color TFT Library

Posted: Fri Jul 12, 2013 9:58 am
by brad
Thanks Gav, will have a good read and see what I can borrow to use with my 32x32 matrix.

One day I'll get to those TFT displays!