Summary
This reference design demonstrates simple VGA signal generation using the Freescale MC9S08SH16VTJR 8-bit microcontroller operating at 40MHz CPU speed. It outputs a VGA signal composed of horizontal sync, vertical sync, and three analog color signals with TTL sync at 640×480 resolution and about 57Hz refresh rate. The video is generated frame-by-frame in an infinite loop, with each frame drawn line-by-line. Each video line is divided into 16 parts, with color data stored in RAM and accessed via registers, supporting 8 basic colors through 1-bit per color channel.Parts used in the VGA Signal Generation Project:
- Freescale MC9S08SH16VTJR 8-bit microcontroller
- RAM (for storing color data)
- VGA cable/connector (implied for output)
- Analog circuitry for 0-0.7V color signal output with 75Ω impedance
- TTL signal generation components for horizontal and vertical sync signals
This reference design is a simple VGA signal generation that uses the Freescale’s MC9S08SH16VTJR, which is an 8-bit microcontroller that has Central Processor Unit (CPU) speed of 40MHz with a maximum bus frequency of 20MHz. It has an internal clock source module containing a Frequency-Locked Loop (FLL) controlled by internal or external reference. Its precision trimming of internal reference allows 0.2% resolution and 2% deviation over temperature and voltage with 1.5% deviation using internal temperature compensation. The simplest instructions such as NOP take 1 bus cycle, the other instructions take more cycles, and for example RTS takes 6 bus cycles.

The VGA signal has 5 components that include horizontal synchronization, vertical synchronization and three analog color signals. The analog color signal range is 0-0.7V with 75Ω impedance and sync signals are TTL signals. The device has a refresh rate of 60Hz with 640 x 480 resolutions, and the pixel clock is 25.175MHz. The display refresh rate is therefore slightly lower, somewhere around 57Hz. The implementation for video signal generation is in the form of an infinite loop where one loop cycle is equal to one video frame. During every frame the video signal is generated line by line. A subroutine was created that draws multiple lines, where the number of lines is expected in the A register. Every line is divided into 16 parts. Colors of these parts are stored in RAM. Pointer to this array is expected in the HX register. Each of the 3 color channels is 1 bit only having 8 available basic colors.
For more detail: HCS08 VGA Output
The VGA signal has 5 components that include horizontal synchronization, vertical synchronization and three analog color signals. The analog color signal range is 0-0.7V with 75Ω impedance and sync signals are TTL signals. The device has a refresh rate of 60Hz with 640 x 480 resolutions, and the pixel clock is 25.175MHz. The display refresh rate is therefore slightly lower, somewhere around 57Hz. The implementation for video signal generation is in the form of an infinite loop where one loop cycle is equal to one video frame. During every frame the video signal is generated line by line. A subroutine was created that draws multiple lines, where the number of lines is expected in the A register. Every line is divided into 16 parts. Colors of these parts are stored in RAM. Pointer to this array is expected in the HX register. Each of the 3 color channels is 1 bit only having 8 available basic colors.
For more detail: HCS08 VGA Output