Recently I have been working on getting my arduino to provide me with colour output.
The TVout library is very good but unfotunately NOT colour, just B&W
Therefore I decided to find a way to route signals to RGB video, and adjusting the levels of the 3 signals so that I can get 256 colours
The downside is what ever colour I choose is that final colour of the whole screen.
The upside is the screen colour can be change without a rewrite to the screen, so effectively, an INSTANT change.
For the application I have in mind, this is perfect !
I shall be uploading a circuit and code in the next few days
Please comment if you have interest or input to this subject
This sounds like a nice addition to TVout. I found another project (via Google) that hooks up a VGA connector and is able to do multiple colors on the screen at the same time. (Search for 'arduino VGA output' or similar.)
Many apologies, I forgot to post the code and circuit for this, I shall get onto it as soon as possible
I have found a way to split the screen so you can have one colour for the top and one for the bottom, you can set the break point for the colour, it works quite well, but occasionally there is a screen glitch, I am using set_vbi_hook() and set_hbi_hook() to set and reset which colour is going out via the RGBouts of my board, its a lot simpler than it sounds
To add VGA colour to the TVout library and circuitry is quite simple
(I am using actual pin numbers rather than arduinos' pin numbering system...)
I used 3 PWMs on the UNO to drive 3 separate 100R & 10uf charge pumps, one for red/green/blue respectively. The resultant voltage levels of these charge pumps was fed into one side of a 4066 transmission gate (3 needed, although there are 4 in the chip). The gate of the 4066 is driven by the raw TV signal derived from pin 13. Each of the outputs of the transmission gates feed the VGA signal (R/G/B) via 470R resistors. The VGA needs to have a composite sync made up of both H & V syncs, this comes from UNO pin 15 via a 1k resistor into the VGA connector. Dont forget to connect the correct GND signals on the VGA connector.
See attached circuit for more information
The PWMs can be driven as normal to give the correct R/G/B out put on the screen
The downside of this is that the TV can only output ONE colour at a time, but I think you will find this is better than just white all the time. The possibilities of this will give you 24bit colour !!!
I hope others can find this as useful and adaptable as I have - good luck :@)
I am only using PAL at the moment, I can get full colour, but only one or two colours at a time, that is enough for me at present. I have looked into the convertor chips too
mcnobby:
To add VGA colour to the TVout library and circuitry is quite simple.
The downside of this is that the TV can only output ONE colour at a time, but I think you will find this is better than just white all the time. The possibilities of this will give you 24bit colour !!!
I hope others can find this as useful and adaptable as I have - good luck :@)
Thanks for the schematic, but where will I find the code you're using?
you can test it in black and white as the schematic in the link, then you can add the new schematic (above) but remember to removed the old b&w hardware connections (470r & 1k resistors), the colours can then be driven by PWM signals on the pics shown using the analogWrite command. Make sure your 5v supply is a good one and not from a 78L05 regulator, the regulator on the UNO board is fine for this. Good luck
if you are after the modifications for the 32mhz version then the TVout library will need to be tweaked to adjust the screen width. If anyone is interested I will post the changes