java6502 wrote:
Thanks for the replies everyone.
I will try the suggestion Daryl made and report back on my progress. I'm using an Arduino Uno, and so I already have a 16MHZ external clock. Not sure if I need to change the fuse bit for an external clock, so please let me know if I misunderstood.
If using an Uno (or clone) i should already be setup for the external 16Mhz crystal and ready to go out the box...
Quote:
Also, while using this code is nice, I would much rather learn how in general to implement composite video, or even VGA for that matter. There are two books I recently came across, "The Cheap Video Cookbook" and "Son of Cheap Video" by Don Lancaster. I'm sure you are all familiar with these. Are they a good place to start? I am particularly interested in Composite Video, as it seams this should be the simplest to start with. The Atmega328p is just able to do this work, but lets suppose I had an new Arduino Uno Rev4, with an ARM cortex6 running at 48MHZ. It has 256 kB of flash, and 32kB of RAM and it runs at 5 volts. With a device like this, I should be able to generate a fairly decent video signal and not even have to use assembly. I could generate a clean composite video signal all in C, and get a better understanding of a how it's supposed to work before reimplementing in assembly. I have found that sometimes it's easier to do things in C just to figure out how in principle they are supposed to work, and then, if performance is still an issue, do it in assembly.
I've looked around online, and oddly have come up short finding a nice article on how to go about building this. Please let me know if you have any good sources. And thank you all again for being so helpful and friendly.
The ATmega 328p is very able to generate PAL (or NTSC) video from C. There should be no need for assembler unless you have the brain cells to spare. Look up the TVout pages on the arduino forum/reference sites... It's a standard library if you're using the Arduino system.
And FWIW: I skimmed the Don Lancaster books some time back, but his was my main reference when I write my code:
http://martin.hinner.info/vga/pal.htmlI was also involved in designing timing/generation code for various high resolution video systems in the late 80s too, so all that ken is lurking in my old grey cells too... But read that web page above and once you have the format of a line and then a whole frame you should get the picture....
I avoid other forums like AVRfreaks as there is generally too much negativity there.
But... As this is really an AVR/ATmega issue then you may well be better off there...
Also, lets not forget some of the early systems did video generation the hard way - the ZX80 and the Atari 2600... It generates composite video with minimal hardware assist and virtually no RAM...
-Gordon
_________________
--
Gordon Henderson.
See my
Ruby 6502 and 65816 SBC projects here:
https://projects.drogon.net/ruby/