Sunday, 15 September 2013

Arduino 80x25 TV Video Output Library V0.2

[Update: Please see the new version which supports multiple fonts and 'medium resolution' graphics]

This is an update to my previous version of the 80x25 tv video output library for Arduino. Grant Searle has updated his video processor code (upon which this is based), to support 4 bit mode. This reduces the number of I/O pins required from 10 down to 6 (4 bits and 2 control lines). See his page for further information on that.
As before, all you need to do is download my 80x25 TV Video Output Library for Arduino library, and extract it into the libraries folder inside you arduino projects folder. The choice of the 6 pins is up to you, here is how it is wired in the code examples in the library.
There are two 10K resistors which control the mode of the video processor. R 4bit is there to set 4 bit mode. R NTSC can be used to set NTSC output mode. Omit R NTSC for PAL mode.
Note, this time I am following Grant's advice and using a 74HCT166. Although the 165 I used last time works, the 166 is preferable due to it's fully synchronous output. The HCT version is also preferable to the LS version. Compare the gaps between the zeroes. Firstly, a 74LS165:
Then a 74HC165
And finally a 74LS166
As you can see, the sharpness is improved. The variation in brightness is due to poor photographic skills on my part.
Although 4 bit mode is half as fast as 8 bit mode, it can still update the display considerably faster that you can read. One of the examples in the library I have provided reads the 6 analogue inputs and displays a binary representation of their value. It does this as fast as it can and continues to send data to the display, which scrolls up as the data appears. This is a good example of using this sort of output for debugging purposes.