Generating Analog RGB Video with a PIC Microcontroller

Here is a PIC16F628 microcontroller clocked at 20MHz generating an analog RGB video signal with composite sync.

PIC Microcontroller RGB Video

This project was inspired by Rickard Gunee’s PIC Video Howto which gave me a big headstart in writing the code.  Thanks Rickard!  I have been wanting to work on this project since reading the tutorial several years ago, and finally got a chance to start it last week.

There are few fundamental differences in my approach compared to Rickard’s and others I have seen in the past.  His tutorial was written a few years ago before 20MHz PICs were commonly available (it uses an overclocked PIC16F84.)  He also focuses on generating composite video to drive a standard television (using the AV inputs).  I am generating RGB video which will interface with the Sharp LCD I had sitting on the shelf.  RGB is a little different in that it uses a separate sync signal (composite horizontal and vertical sync on one inverted TTL line) and each color is brought out as a separate 0.7Vpp signal.  These two differences make the RGB interface considerably easier (in my opinon) to work with, especially since the approach to composite video Rickard uses is limited to black and white.

So far the biggest challenges have been with getting the video timing right.  I am writing the whole program in PIC assembly and every clock cycle counts.

More on this project soon, but until then, there are a few more photos on flickr.

6 thoughts on “Generating Analog RGB Video with a PIC Microcontroller”

  1. Has been much movement for a while Jeff. The increase of LCD and OLED usage with PICs would seem to make this the ideal time to update this item. I’m sure there a lot of people interested in using an RGB interface rather than the 8/9/16/18 I/O port options

  2. Hello,

    Very cool .
    Is it possibly to create a whit this to indicate the real time results from a home-bus ?

    Ben

  3. Thanks Tony!

    My next step is to clean up the code (it’s very inefficient with program memory right now) and then figure out how to encode and display ‘pixels’ in memory.

Leave a Reply