Phasor A/V PAL demo uses ATmega88

Above is a new demo video called Phasor developed by [Lft]. It is run from an AVR ATmega88 and a few passive components, and the result is pretty amazing. [Lft] goes into detail about the tricks he used to get this up and running. The chip is clocked at 17.73447 MHz which is exactly four times the frequency of the PAL color carrier wave which allows him to fake a smooth signal. He also uses a timer trick to get the voltages that he needs. The work done here is beyond hardcore and quite frankly we can’t believe he managed to fit all of this into 8.5 KB of program space with just 1 KB or RAM. We wonder if there’s enough room there to add sound and color to the AVR Tetris project.

[Thanks Sprite_tm]


  1. Scott says:

    I like the old craft better! I think it was probably because of the superior music.

  2. ziarkaen says:

    He should stick an upside-down CPU to it so that it doesn’t overheat.

  3. Rachel says:

    Wow…demoscene always amazes me. I’m going to have to build this now.

  4. Ben Ryves says:

    Exceptional work. Very impressive indeed!

  5. Drakonite says:

    Wow, spiffy!

    It is always impressive to see this much jammed in to such a small foot print; and it always gives me a bit of hope to see, after dealing with the majority of programmers who seem to need 10MB to print hello world.

  6. nubie says:

    Yipes! I wonder when we will start seeing HDMI/DVI/DisplayPort run from a micro.

    A-mazing for sure.

  7. cirr says:

    ye that was cool

  8. me says:

    Just awesome! :D

  9. carbon-rod says:

    Holy crap!!! that is absolutely amazing to be able to generate a pal colour signal from such a low powered device let alone generating all those 3d objects and other effects… as well as music!!

    Nice work… and you are truly beyond hardcore!

  10. selfsilent says:

    That takes me back to the Amiga demo scene and looking at some of the names that pop up such as Fairlight I’d imagine that he used to be part of it too. I wonder what team he was with.

    I did a small bit of coding for Vision Factory a long time back with Rudi Ratlos. Good days.

  11. t&p says:

    I wish I could have gone to a breakpoint ;_;

  12. PodeCoet says:

    Holy shit. That’s freakin awesome!

  13. t&p says:

    another question is whats up with the lights?
    is it part of the demo, or is he turning the light dimmer up and down with it in the background?

  14. anon says:

    t&p, that’ll be his camera’s auto exposure over-compensating during the dark scenes. Exposure will increase as the overall mean brightness drops, and vice-versa

  15. t&p says:

    My brother said the same thing, but I am not too sure about that because of the reflection of the desk, and he turns the lights down on a ‘not really bright screen’ at the beginning, and then later, seems to get even more into the up and down with the lights.

  16. margen says:

    what’s the name of that tune??

  17. Thinkerer says:

    Okay, I’m bowing towards Sweden in awe of this – and getting a Timex-Sinclair/TRS-80 flashback at the same time.

  18. Scott says:

    Yes, but how can an Arduino be incorporated to make it better?

  19. lickmynutsack says:

    @Scott I hate you so much right now……

  20. Lou Skunt says:

    I agree with Scott.. We can fit a few Ardinos and some blinking blue lights to pimp out this project..

  21. gcat122 says:

    @t&p re the background lighting… It really is the camera overcompensating with spot metering and a little slowness in response. We should all learn from this – When you have an awesome project to capture on video use average or area metering and get closer to the object of interest but keep the cam steady and focused as this wizard did here.

    Super work!

  22. jproach says:

    @margen he composes the music as well, you can dl it here:

  23. “It is always impressive to see this much jammed in to such a small foot print; and it always gives me a bit of hope to see, after dealing with the majority of programmers who seem to need 10MB to print hello world.”

    DOS version is still 22 bytes, but it can be shortened a little by using some undocumented initial register values to probably 18, 16 with no termination, and I think maybe a little less with direct video memory writes and a hung program.

    Windows version (via messagebox) is 1536 bytes assembled with FASM, and most of that is the PE header and can be reduced farther by stripping out various unused sections (thereby making it noncompliant).

    But then again 1.5T hard drives are ~$100 and my granny has 4GB of RAM in the computer she uses to check e-mail, so I’m not sure why people bitch and moan about this anymore.

  24. Richard says:

    That’s a seriously neat piece of work – it warms my heart to see the art of compact coding is not only still alive, but really pushing the envelope of what’s possible.

    Very well done, lft :-)

  25. nes says:

    Astounding work! And talented/modest too! I should think the skills on show here would make him a very valuable asset to any games company or /shudder/ in embedded systems.

    “DOS version is still 22 bytes… …1.5T hard drives are ~$100 and my granny has 4GB of RAM in the computer she uses to check e-mail…”

    Your granny must be very rich.

  26. smoker_dave says:

    8-bit for life!

    Such an amazing project, the guy does not even look old enough to remember Commodore 64. Really impressive.

  27. bothersaidpooh says:

    i was going to try something like this to enable colour 3d night vision on my video glasses.
    the problem was that the pic can’t generate anywhere near this much information, about the only way it would work would be to use a quad bilateral switch, LM1881 (to get the syncs and raw video data), seriesed schottky diodes to get the a-d at video speed and some other tricks.
    the upshot is it would probably work but occupy too much board space.

    on the flip side, something like this would be a perfect use for a digital delay line (aka DDL) made from a PIC10F206.
    internally clocked, and occupies a fraction of the space of anything like it.
    you’d just need four IO lines if MCLR was used as an input and the same chip could be used as a colour shifter by using two lines as +/- phase control.
    Simplez :)

    (now if only i could get these pesky pyroelectric sensors to work, grr… instant thermal imager if i used a round robin technique using pager motors and the good old fashioned trial-and-error image reconstruction trick.

  28. Drone says:

    Doesn’t the Propeller micro-controller do what eight of these can do while costing only a couple of bucks more?

  29. Bacchus says:

    Wow! Just… Wow.

    That’s brilliantly insane.

    Does this man like bztanks?

  30. markii says:

    i love it very muchachos.

  31. cantido says:


    You might want to get a book about distributed/parallel computing.. having 8 “machines” doesn’t usually make your application 8 times faster.

  32. Ben Ryves says:

    @cantido: Indeed, but being able to dedicate one of its cores to the task of generating the video signal and another to the task of generating the sound would probably make life quite a bit easier in this instance. Getting all the timing right and still having CPU time left over to actually produce something interesting on the screen and from the speakers is the tricky part, in my opinion!

    @Drone: Last time I attempted to buy a Propeller they were going to charge about $80 in all thanks to an absolutely ridiculous P&P charge. I couldn’t find a UK distributor so went into AVR development instead.

  33. Dude says:

    I wonder what his girlfriend will.. umm, never mind.

  34. bothersaidpooh says:

    you can make a “propeller” clone using eight PICs in parallel with the clocks separated by 1/4 of an instruction cycle.
    this can be done using a single clock and seven 40xx series logic gates (non inverting) in series with the clocks taken from each output.


  35. dirk says:

    This is really bad-ass, well done!

  36. David Maas says:

    Absolutely amazing! I can’t believe he did that with an ATMega88!

  37. Steve says:

    I can only hope to someday understand how to do this, great music, great visual, great show! Keep up the good work.

  38. Paul says:

    Wow! Sounds like AY chip music (spectrum, Atari ST etc). Great stuff!!!

  39. jproach says:

    @Drone: propeller is about $8 vs m88 $3 in single quantity. You can find his demo using a propeller here:
    Clearly it is a more capable chip for what he is doing. As a general purpose low cost micro, m88 would more often be the better choice.

  40. Mikey says:


  41. osgeld says:

    and for the record he has a demo running on a propeller, its a good demo but knowing whats running it kinda depreciates it IMO

    “i got video out of a propeller” so does everyone else!

    but these atmega88 demos are magical in the way they work

  42. cantido says:

    @Ben Ryves

    That is true.. but from what I can see access to the shared memory (where your framebuffer would be) is single port and the arbiter is round-robin.. so if you had a cog rendering display data and then another cog generating your video signal you might end up having two cogs that are basically stepping around each other… that’s not to say that having 8 hardware threads can’t be used effectively, but I’d always prefer to have a faster chip with a ton of timers and interrupts. The ideal solution for video would be an CPLD and some dual port ram mapped into the processor’s address space for your framebuffer, but that’s not really the idea of the Real Wild compos. :)

  43. octel says:

    anyone know where i can find information on the types of effects used in this video and other demos? i know the popular “sine text” and “sine plasma” but im wondering about that twisting ribbon effect

    some of us need that $40 for real necessities, such as food and heating bills, you know?

  44. Matthias_H says:

    > This is amazing! White people are so creative and intelligent.

    @Jeff Davis, could you please elaborate on that?

  45. Jentulman says:

    I’ve just regressed back to my 13yo Amiga owning days, all I can say is

    “Uber mad 1337 skillz” :)

    Really nice chiptuneage too, especially when it all goes a bit Daft Punk with the arpeggiator towards the end.

  46. osgeld says:

    “some of us need that $40 for real necessities, such as food and heating bills, you know?”

    see my previous statement, if 40$ is going to keep you from eating then maybe you should reconsider your standing in life and your hobbies

    I am no millionaire, but somehow I managed to scrape up a little extra money and got that 4 gigs of ram

  47. silverbyte says:

    this is just fucking awesome, over the top, incredible…

  48. octel says:

    “reconsider your standing in life”

    hahah spoken like a privileged asshole

  49. nes says:

    “reconsider your standing in life”

    LOL. Ok I probably deserved that. Anyhoo, my point was that the beauty of this is in the method. A Propeller demo would be just as good IMHO. (I think the borked nature of the shared buffer interlocking might make the job harder.) Doing colour composite video on a PIC (8-bit) or *gasp* an 8051 would just rock my little world.

    “I … got that 4 gigs of ram”

    Your capacious yet volatile byte store truly humbles me. :-)

  50. The Moogle says:


    Eat a fat dick.

    • Caleb Kraft says:

      seriously guys, there are plenty of other places to bicker on the internet. Please stop polluting the Hack a Day comments threads with this stupidity.

      -thread locked-


Get every new post delivered to your Inbox.

Join 96,706 other followers