Firewing Color TFT Library

A place to discuss programming PIC microcontrollers using the Firewing IDE.

Moderators: Chuckt, Garth, bitfogav

Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Firewing Color TFT Library

Post by bitfogav » Tue Jul 09, 2013 8:28 am

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..

If you don't know what Voltage your country is using, you shouldn't be doing electronics ;-)

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Firewing Color TFT Library

Post by brad » Wed Jul 10, 2013 12:09 pm

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?

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Re: Firewing Color TFT Library

Post by bitfogav » Thu Jul 11, 2013 6:19 am

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
If you don't know what Voltage your country is using, you shouldn't be doing electronics ;-)

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Firewing Color TFT Library

Post by brad » Thu Jul 11, 2013 7:05 am

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!

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Re: Firewing Color TFT Library

Post by bitfogav » Thu Jul 11, 2013 7:12 am

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:
If you don't know what Voltage your country is using, you shouldn't be doing electronics ;-)

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Re: Firewing Color TFT Library

Post by bitfogav » Fri Jul 12, 2013 5:50 am

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
If you don't know what Voltage your country is using, you shouldn't be doing electronics ;-)

User avatar
brad
Site Admin
Site Admin
Posts: 2578
Joined: Fri Mar 26, 2010 10:30 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Firewing Color TFT Library

Post by brad » Fri Jul 12, 2013 9:58 am

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!

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 2 guests