PIC-based VGA Interface

Home   ·   Hardware >>

This project offers the very simple VGA interface for PIC24H and dsPIC33 microcontrollers. As the signal generation is supported by software, it contains a minimum of hardware. Video memory is located in internal RAM, and the character generator is a lookup table in internal program memory. All video signal timings match VGA standard in 800x600 mode, so the standard VGA monitor can be directly connected. Each character pixel is represented as 2x2 pixels on the 800x600 screen.

As the whole video support (including PS2 input and UART RX/TX) is located in the single interrupt routine, it is easy to embed it in any software which is not time dependant and which allows time-locked interrupts.

Limitations:

- This project is based on Microchip's PIC microcontroller which runs at 80 MHz (40 MIPS), so the selection of limited to 24H or dsPIC33 families. The minimum of internal Data RAM is 8 Kbytes, as this routine uses 4K for Video Memory and housekeeping (5.3 Kbytes in Demo mode).

- It takes a lot of processor time to generate the VGA signal. In the pure text mode with black areas between text lines, it requires about 77% of processor time (which leaves 9.2 MIPS for other tasks in the main program flow), and in the full-screen mode, which displays not only characters but also the full-height frame pseudographics boxes and lines, 95.6% of processor time (but there is still 1.76 MIPS left for other tasks). Those are roughly measured values, not calculated.

- Only the text mode is supported. Full graphics mode is not possible.

Hardware
Firmware
Character Set
Embedding the Routine in Your Application
Cursors
Modes of Operation
Sync Generation
Frame Pseudographics
Keyboard
UART
Demo Mode
Adding Graphics Window
Firmware Download

Resolution

Monitor mode: 800x600 @ 60 Hz

Displayed resolution: 400x300 pixels

Text format

normal mode:  60 characters in 25 lines

double width mode:  30 characters in 25 lines

double height mode:  60 characters in 12 lines

large mode:  30 characters in 12 lines

Character set

256 characters, 10x6 pixels each (9x5 used for ASCII text)

Colours

Red, Green, Blue, Cyan, Magenta, Yellow, White, Black

Blinking is supported independently for foreground and for background

Two independent cursors with adjustable colours and blinking rates

PS2 keyboard support (input only)

UART support with RX and TX circular buffers

Home   ·   Hardware >>