Close
0%
0%

Arduino Graphics Card

Advanced graphics for anything from homebrew computers to weather reporting boxes and everything that can communicate over 3.3-5v UART.

Similar projects worth following
Starting from
$39.50
Nuclear_Man_D has 12 orders / 1reviews
Ships from United States of America
I have had this graphics card I made and was using for another project. The other project was being documented, but I realized that this card deserved documentation and a project of its own. It uses a Parallax Propeller to output VGA and NTSC video. It can be interfaced with 115200 baud UART. Now with a datasheet!

The NGT20 was originally designed to be a terminal for my custom computers. It executes this task amazingly well. With the default color configuration there are 3 foreground colors: white, red, and green. Red is great for STDERR or other error output. White for normal text, and green for anything you want to stand out. It automatically scrolls the screen when the cursor needs space to go down, making programming even easier.

How did you come to make this project???

Well I love to build computers. So I tried to make a single board computer with a parallax propeller.... and it never worked. The pcb was kinda scrapped and the project abandoned. Later, again working on an FPGA computer, I didn't want to make the FPGA do graphics, so I thought "Hey, why not use that old, scrapped and otherwise useless board to generate graphics?" Now, the remains of an old single board computer became my first version of this project! I never knew I could love a design so much, and I made another graphics card. A cleaner version. Now I am making them using boards from OSH Park! All thanks to a scrapped single board computer.

Where is the project now?

Pretty much got everything working. Will still improve it more sometime, so its still an ongoing project.

Quick specs:

  • Supports 3.3v and 5v UART
  • supports NTSC and VGA video output
  • Support for sprite rendering
  • RAM on card can be modified for quick, repeated draws of complex objects
  • Can be an arduino shield
  • Basic 3D rendering support

To come once updated:

  • Higher Resolution (Maybe 640x480 VGA?)
  • More colors
  • Faster serial interface
  • Any suggestions?

My latest version is the NGT30, an advanced and refined product with the features from the NGT20, plus improved resolution and 3d rendering support.

Now available on Tindie at my store!

Documentation/Resources

NGT31 Wiki Page

Arduino Library:

GitLab

Firmware Source Code:

GitLab

Datasheets:

NGT31 Datasheet

NGT30 Datasheet (Broken link - I need to fix this still)

NGT20 Datasheet (Broken link - I need to fix this still)

NGT15 Datasheet (WIP) (Outdated design! Why is this here?)

Please help me improve my datasheets! I would greatly appreciate feedback on these documents.

GFX_1.kicad_pcb

kicad_pcb - 147.70 kB - 04/24/2017 at 05:39

Download

GFX_1.sch

sch - 23.16 kB - 04/24/2017 at 05:39

Download

NGT15-20_test.ino

A cool test program for an NGT15 or NGT20. Not compatible with GFXCard.spin firmware ;(

ino - 4.24 kB - 04/01/2017 at 03:12

Download

  • 1 × Parallax Propeller GPU
  • 1 × 5Mhz crystal
  • 1 × 24LC256 Memory ICs / EEPROMs
  • 1 × 1.1k resistor
  • 1 × 560 Ohm resistor

View all 9 components

  • Switching over to Propeller C

    Dylan Brophy09/25/2018 at 19:01 0 comments

    Until I move away from the propeller chip entirely for my graphics, I will want to make my code run faster.  I want more RAM free to store sprites and 3d lines, and I want better framerates.

    I have always used spin for programming the Propeller chip, however I have recently discovered that Propeller C is now faster than spin.  To be exact, for some programs it can be twice or even 5x as fast!!!

    I got this data from here.

    I think my program could have a decent increase in speed using propeller C.  There are two caveats however:

    1. Most of the CPU time is spent in assembly routines, not spin code
    2. The communication bottleneck is (mostly) in the 115200 bps serial, not the spin code

    To speed up the assembly routines I could overclock the propeller chip.  This has been done.  The propeller reaches about 100 Mhz on most chips if I remember correctly.

    The communication bottleneck could be fixed by adding a SPI communication option.  I must keep serial however to keep a certain level of backwards compatibility with my older versions.

  • Nailed It.

    Dylan Brophy04/04/2018 at 22:40 0 comments

    Assembly code (and almost everything) working.

    I still need to do a little more optimization to speed up the rendering, but other than that the thing works!  :-D

  • Assembly: sine works! but not cosine...

    Dylan Brophy04/03/2018 at 21:17 0 comments

    Doing trig in assembly

    The sine function actually works!  But cosine doesn't.

    I suspect it is a problem with signed multiplication/division.  It *should* work... But ya never know.

    I have tried other angles and different multipliers (instead of 16384)

    I think after this my 3d rendering might actually work in assembly!

    EDIT : im posting latest code on GitHub if you are interrested. Check project page for the link.

  • Final NGT30 board version working, and new 3D graphics programming ideas

    Dylan Brophy03/27/2018 at 04:38 0 comments

    Thanks @oshpark for the beautiful boards :-)

    Now I need to finish the software...

    I fixed some bugs in the Arduino libraries today, but I still need to finish the 3D graphics.  I have decided that my original model for the rendering will not work.

    Why not?

    Too many cogs are competing for graphics rendering at the same time.  One cog must do all rendering for the entire NGT30. I have noticed rendering issues.

    Also, my assembly code is not going to be able to render the graphics even if it were the only cog using the Graphics object.

    Additionally, the original rendering model wastes a ton of processing power and slows everything down.

    What is the new idea?

    Have a cog running assembly code to calculate the screen coordinates of 3d coordinates.  The Arduino will send a command to the NGT30 when the 3D objects must be rendered. The main cog will actually send the commands to the Graphics object, while the assembly "calculator cog" will do all the necessary trigonometry.

    This should be better AND easier! :D


  • Forgot to buy headers and ic sockets...

    Dylan Brophy03/23/2018 at 23:48 0 comments

    My OSH Park boards arrived!  I had most of the parts but I realized I was missing two important components for the PCB:  arduino shield headers and ic sockets.

    Well, the board seems cool so far!  I just won't be able to test it.

    I decided not to solder the resistors without the rest of the parts.  

  • 3D rendering in assembly!

    Dylan Brophy03/23/2018 at 06:11 0 comments

    3d rendering in the parallax propeller's spin just isn't fast enough.  In case you don't know, the parallax propeller actually INTERPRETS SPIN CODE.  Although spin is still reasonably fast, I can get it much faster if I got the rendering going in assembly.

    This is what I have been working on lately, and it seems that it *somewhat* works in the simulator.  But nothing ever renders. The simulator says that the graphics command register is always occupied, and, for some reason, never empties itself (as it shoud and usually does).

    So I dug in the hex files to find ...numbers... : 

    I don't want to go into details, but basically this proves that the entire command chain is being ruined by my assembly code.  I think that if I fix that my assembly will render 3d graphics!

    ALSO. I am making a commit to my github so that anyone who wants to take a peek at my code can.

  • New boards arrived and assembled, plus a 3D graphics video!

    Dylan Brophy03/10/2018 at 09:06 0 comments

    I got these nice boards from OSH park Thursday:

    NGT30 boards!!!!
    Fresh from OSHPark + Nuclaer Labs

    I only made one mistake (so far as I know):  the communication pins for the arduino are FLIPPED.  So these boards cannot be made backwards-compatible with NGT20 anything.  Other than that, this board seems to work great!

    I will be porting #Arduino Desktop to this soon.  I just need to make sure the keyboard pins are right and I need to hack the Arduino library for communicating with the NGT20 for compatibility with the error on the PCBs.

  • Trig accuracy issues (and a possible solution)

    Dylan Brophy02/27/2018 at 06:42 2 comments

    The cube I had been rendering did not calculate for camera pitch/yaw, so if it was a 3d game you would only be able to look in the +X direction.  I added some math to fix that, but then I got another problem.

    I wasn't using floating point numbers, and I was using a homemade arctan table which, sadly, may have been less than accurate.  The cube jumped around the screen and was recognisable only most of the time.

    I was using propeller spin language, and used fixed-point arithmatic.  I think its time I used c++.  We shall see how it goes!

  • 3D graphics in the making!

    Dylan Brophy02/26/2018 at 07:01 0 comments

    I wasn't sure if the propeller could handle 3D graphics, but I gave it a shot this weekend.  I did it, I got a rectangular prism up and made it move!

    The NGT30, which I am going to be building when I get the boards back from OSH :D, will be 3d-graphics capable.

  • NGT30 Orderded from OSH :D

    Dylan Brophy02/23/2018 at 03:58 0 comments

    I have ordered the prototype NGT30s from OSH.  I decided not to modify the board (like make any Through-hole components SMD or anything) because I am terrible at SMD resistor sizes and couldn't figure it out.  Should get the boards in a few weeks :D

    The new firmware will be pretty much the same as NGT20 firmware.  The board is just improved for flexibility and an added PS2 port, shrunken down and made more affordable.  I want to add something fun to the firmware but I have no idea what.  The current NGT30s have no NTSC/PAL port, so much of the RAM is not used and many cogs of the Propeller could be used.  If you have any thoughts let me know!

View all 22 project logs

Enjoy this project?

Share

Discussions

Vishnu Mohanan wrote 02/13/2018 at 11:03 point

Brilliant! You should give this to high end graphics card enthusiasts and tell them to have a good look at it. May be you could show it to Linus and have it reviewed. I must warn you; he'll probably drop it..

  Are you sure? yes | no

deʃhipu wrote 02/13/2018 at 13:22 point

Why Linus? What does he have to do with this?

  Are you sure? yes | no

Vishnu Mohanan wrote 02/13/2018 at 13:28 point

Linus Sebastian - from Linus Tech Tips, not Linus Torvalds :D

  Are you sure? yes | no

deʃhipu wrote 02/13/2018 at 13:31 point

Aaah!

  Are you sure? yes | no

Mars wrote 03/27/2017 at 21:16 point

I would like to see this with a SPI bus. A lowly Arduino can output SPI with a few Mhz SCLK, beats out 115kbps pretty well.

  Are you sure? yes | no

Dylan Brophy wrote 03/28/2017 at 01:27 point

I would love to add a faster serial interface. the only issue is the boards I have only 2 connections between the arduino and propeller. If you have any other fast serial protocol ideas i would love to hear, and I myself will think and look into this. Thankyou :D

P.S. - creating a project to solve this. bidirectional pins is out of the question for my OSH park boards ;( but im sure I can still make a custom high speed serial protocol. #2-pin SuperSerial

  Are you sure? yes | no

Steven Gann wrote 10/19/2016 at 22:56 point

Lovely. I can't wait to mess around with it this weekend.

  Are you sure? yes | no

Dylan Brophy wrote 10/28/2016 at 00:11 point

How'd it go?

  Are you sure? yes | no

Steven Gann wrote 10/03/2016 at 11:52 point

I've been working on a homebrew CPU and am looking for a graphics adapter. The last Parallax product I used was the Basic Stamp II, back when the BoE used RS-232, so I don't know a lot about Propeller. I do happen to have a Propeller Demo F board in my collection, but never used it.

Definitely excited for more information on this.

  Are you sure? yes | no

Dylan Brophy wrote 10/05/2016 at 02:06 point

Il make a schematic of the board I made and upload it.  If your making your own cpu, are you using an FPGA or discreet logic, or something else?  If your cpu is 5v or needs UART support you may need a few chips, but with a Demo Board you will have a great graphics adapter. I would recommend it.

  Are you sure? yes | no

Steven Gann wrote 10/05/2016 at 19:22 point

Right now, all I have is an emulator (https://github.com/stevengann/sg16). I picked up a Max II CPLD to learn VHDL, because I've been wanting to get involved with FPGAs anyway.

A schematic would be helpful, thank you. It seems the Prop is popular as a video adapter.

  Are you sure? yes | no

Dylan Brophy wrote 10/18/2016 at 13:21 point

Ok I have made a schemtic and it is in the source code.  If you open the GFXcard.spin in the Propeller Tool, you will see the code and the documentation.

  Are you sure? yes | no

Dylan Brophy wrote 03/26/2017 at 16:24 point

Hey, haven't heard from you in a while. How has it come?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates