Video-Duino

duino_hdmi

03_24_2015 : Out for Fab

Just fabbed out my most ambitious OSH-Park 2-layer PCB yet.  It is called “VideoDuino” and is an Arduino Pro Mini compatible CPU board ( ATMEGA328 ) that has HDMI graphics via my Spartan6 ( Nano6 ) FPGA design combined with a TI LVCMOS to HDMI converter. Also has the new Analog Devices AD5592R that contains 8 12bit ADCs, DACs and GPIO in 8 configurable IO pins over a simple SPI interface. Board measures 2.6″ x 1.6″ – large for one of my designs, $21 for Qty-3. Board is powered from a standard micro-USB connector. Dual FTDI 1×6 headers for configuring CPU and FPGA from a PC’s USB port. As far as I can tell, there are no Arduino platforms with graphics – so this is somewhat unique.

04_08_2015 : Almost fully assembled!

IMG_1023

04_11_2015 :  Powered up!

IMG_1027

IMG_1025

Assembly is 90% Complete.  Still need to solder on the Analog Devices AD5592R and all the headers.  Did a power current test 1st and verified minimum 5V USB current ( about 30mA ) and then used my Digilent HS2 JTAG programmer and Xilinx impact software to download the top.bit bootloader into the FPGA.  Once the bootloader was in, I used BD_SHELL.EXE to load the bootloader permanently into PROM Slot-0 and then my HDMI test design into PROM Slot-1. Power cycled and got my color test bars 1st try! FPGA and HDMI converter chip are at about 70mA on 5V supply. Next I need to download the Arduino bootloader using the AVRISP mkII and verify the CPU is working.

Stage-1 of this project was PCB design.  Stage-2 was assembly and power on test.  Now I will move on to Stage-3 which is FPGA firmware design and Arduino software design.

04_12_2015 : Arduino CPU is Alive!

IMG_1028IMG_1029

Used my AVRISP mkII USB to ISP ( SPI ) dongle from Atmel to program the Arduino bootloader from Arduino app on my Linux workstation into the AVR ATMEGA328 micro controller – magically turning it into a full fledged Arduino.  The firmware upload flow for this board is to use proprietary cables ( HS2 JTAG For Xilinx, AVRISP mkII for AVR ) only once on the board after assembly. After both bootloaders are installed, I use a generic FTDI cable to update firmware.  The bright red LED is actually flashing at 1Hz using my bringup sketch. My board is fully software compatible with the awesome Sparkfun Arduino Pro Mini. A tremendous bargain for $10.

Next goal for the project is to design a simple SPI bus bridge from the CPU to my FPGA. My goal is to be able to rapidly prototype software in Python on my Linux workstation that talks directly to the FPGA via FTDI. When I have working Python – I can then port it to C and have it run on Arduino standalone.

04_27_2015 : VGA 80×32 or 40×16 Text is working

IMG_1042

One of the main practical features of this project is to provide text output for microcontrollers over just a couple of wires. Actual graphics might be slow to transfer- but text should be quick – especially when I provide hardware line scrolling. Today I got my VGA text going.  I found a free to use VGA equivalent font ( 8×16 ) called Unicode VGA font – Thank you Dmitry Bolkhovityanov! All I needed to do was to write a quick python script to parse out the 1st 128 ASCII characters and build a 2Kx8 Verilog inferrable ROM from it. The ROM size 2Kx8 is 128 ASCII characters by 16 vertical lines by 8 data bits for the 8 horizontal pixels per character which is a single Xilinx Block RAM.  A 4Kx8 RAM then provides a text buffer for 128×32 characters ( displayed as 80×32 on the 768×512 HDMI display ). Only hickup was Spartan6 has some issues with ROMs and my 1st attempt was always reading out nothing but zeros. For some reason switching to inferrable VHDL ROM instead of Verilog fixed the problem – strange Xilinx issue.   Basic circuit works great.  Now I need to decide if I should provide scrolling display feature ( “Trace” ) in hardware or write it in software.  I think I need to create a generic hardware block for zeroing out line bursts of either text of graphics to speed things up.

I am toying with the idea of providing hardware sprites so that this could be used for simple 8bit gaming.  In a 4Kx9 RAM ( 2 BRAMs ) I could provide 16 different sprites of 16x16x9 ( 3bit RGB ).  Games would be limited to dynamic sprites overlayed on top of static ( slowly drawn ) background. If I go this route – I probably would need to provide sound as well….

05.09.2015   So I designed this new bus protocol I call “BML Packet Bus” for transferring bits, bytes and dwords over multiple interfaces ( UART, SPI, I2C, Bit-Bang ) with the bus master being a uP ( ala Arduino ) or even another FPGA.  It is an enhancement over my existing “Pixel Bus” and it is very flexible in terms of payload optimization and ideal for video transfer ( burst increments can be specified for bursting in any direction ). Like all great ideas – I designed it in my backyard hammock on an engineering notepad. I even got so far as typing it all up in Verilog comments. Sadly – I then hit a roadblock realizing it isn’t something I can just write the Verilog in my head and debug in circuit.  I need a simulator. I use and love Modelsim at my day job, unfortunately they have no “Home License” for a few $100 like Eagle does for layout.  They have a “Student Edition” – but I haven’t set foot in a classroom since I was a Science Docent for my kids in the 2000’s. So – looking for a good simulator for home. Have used Icarus Verilog + GTKwave in the past – but would like something better. Any suggestions ?

Video-Duino