Video timing; New discoveries, improved synchronisation code.
Linus Akesson
Posts: 22
Hi!
I've been venturing into the murky depths of video generator timing, and discovered some new glitches and previously undocumented behaviour. The upshot is that I managed to write a 100% reliable PLL synchronisation routine. (The technique used in Chip Gracey's multi-cog video drivers is 99.94% reliable.)
Here's the code, and all the juicy details:
http://www.linusakesson.net/programming/propeller/pllsync.php
I've been venturing into the murky depths of video generator timing, and discovered some new glitches and previously undocumented behaviour. The upshot is that I managed to write a 100% reliable PLL synchronisation routine. (The technique used in Chip Gracey's multi-cog video drivers is 99.94% reliable.)
Here's the code, and all the juicy details:
http://www.linusakesson.net/programming/propeller/pllsync.php
Comments
I have a driver for 3-cog 6-bit color photos on VGA that I could never get the pixels exactly on top of each other with...
Maybe your ideas will help with that...
Awesome writeup! It really explained a number of things!
Great Job!
KK
OBC
Ross.
Linus, what else can plasma do? Share library routines? other?
Yes, I've got some code that doesn't work too. Can't wait to bang on this.
Thanks Linus!
Re: jazzed- Linus created a Propeller assembler called "plasma"
plasma Info Here:
http://www.linusakesson.net/software/plasma/index.php
The power of having two PLLs interleave the pixels on different cogs is awesome - better pictures, high resolutions, more colors.
The other thing I don't quite get is the reload on every pixel. That's like self-inflicted damage and then complaining that it doesn't work properly. And changing only a single bit doesn't help. If you step back for a moment and look at it you'll realise that you change a register value the moment it's sampled. Single bit change or not you'll have a ~50% chance that it catches up one cycle later (than the other cog(s)). I checked and this'll happen more often than you think. Which may be OK for a particular use case but can (and should) be avoided.
The solution listed suffers from jitter (frqa <> po2) given the right circumstances. A more solid version is listed in my [thread=126874]waitvid thread[/thread] (20110409 update).