Hi all.
For the past few weeks I have been working on a personal project in my spare time before I start my first day of college.
The project is to develop a high resolution graphical on screen display for PAL, NTSC and possibly SECAM video signals. The intended application in my case is to stick a camera, OSD module and video transmitter on my model plane and fly it away, whilst getting readouts of various statistics.
It already works. I have a graphical OSD working, with shapes, fills, lines, text and images working. It works better than I expected. :)
The current specifications are:
- At the core, a Microchip dsPIC33FJ128GP802 processor. This was mainly chosen because it's got the most amount of RAM/FLASH in a DIP package and I can easily get them on my breadboard. Also because I already have a PICkit 2 programmer. This processor runs off the 7.37 MHz fast RC oscillator with PLL to boost it to just about 39.7 MIPS slightly under its rated 40 MIPS.
- Dual buffered 256x192 pixel display; pixels are either transparent or white. 12K of video RAM is used. Dual buffering allows a new display to be written to the DRAW buffer and then swap the buffers; this makes the screen change instantly; no flickering is seen.
- An LM1881 is used to syncronise to the signal. I would like to eliminate this, however, it makes the initial design easier. It also improves the stability of the OSD; I found using a comparator has the difficulty of determining the vertical blanking period of the signal.
- Has a 5x5 font which is hand designed by me (based off the Silkscreen font but fixed to 5x5 whereas Silkscreen has some non-5x5 chars.) This font is quite small on the screen, so I am considering a 8x14 terminal style font. 256 pixels allows about 50 characters horizontally and 38 characters vertically with the 5x5 font.
- Powered from +5V (+3.37V supply for dsPIC33F, using an LM317T.)
- All code written in assembly language. The first version used C, but that had too many problems, so I decided to rewrite it in assembler, which made it much faster and fixed many bugs.
- Accelerated drawing of horizontal and vertical lines of any length. Accelerated drawing of any line in odd quadrants.
- All video processing done during the horizontal blanking interval and vertical blanking interval. Only 3 MIPS out of the 39.7 MIPS are available for processing, so the code has to be fast (see above.) Previous C version reached 10 fps doing a full F-22 OSD, target is at least 20 fps for this version and possibly even 30-40 fps (faster than the video signal!)
- Doesn't yet support NTSC... however, this is trivial to add, as all it requires is changing the scaling factors for the display and adjusting some timing parameters. No code changes should be necessary, as NTSC and PAL signals are very similar. SECAM support is being considered but I have seen very few SECAM cameras so this is not planned yet.
I'm currently away from my project at the moment, so I can't post any pictures, but I'll have some up soon. So please, everyone let me know what you think, and if you want to see this go further. I'm certainly going to be using it myself on my model plane, and I hope other people can benefit from my 2 weeks or so of work on this project.
This will be an open source hardware and software design most likely.