After that brief distraction of trying to interface with the enc28j60 I finally have a project to use my VGA output on AVR for. The main aim of this project is to end up producing a count down clock.  Output will be black and white and it will be controlled by a ATTiny45. This is a considerably smaller micro in pretty much all regards compared to the mega644p that I had been using previously. The main reason behind using the ATTiny is to try get all of the circuitry inside of a VGA cable to make a hidden controller. I haven’t quite thought how I will power it yet but I guess that can be left for when the issue arises. The project is hosted on github.

The pin out for the micro is as follows:

      RESET --|  |-- VCC
      CLK I --|  |-- PB2--BW
COMS--PB4   --|  |-- PB1--HSync
      GND   --|  |-- PB0--VSync

CLK I is sent to a oscillator that is at 20MHz. Since this is only going to be used to display the time the output will be 00:00 where 0 are different numbers. Assuming I can mange to output a pixel every 5 cycles max horizontal resolution is 512/5=102 pixels. We need to display 5 characters of same size. I will go for 20 pixels wide for each number the extra two pixels will be black. The vertical resolution by default will be 480 this though will make some odd shaped pixels so to simplify things there will be a black bar top and bottom of 40 pixels. We will also divide this by 4 just to make everything square. Each character therefore will be 20×20 pixels. I already have a working output so the next stage is to draw the actual characters. There is no point in actually doing this manually so a quick c# program will take care of that.