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.
The device is very simple that adds character to an ordinary static image displayed in an old CRT display. This can be easily reprogrammed as desired by the user. A scrolling strip may be added that is implemented as a rotating buffer. The circuit can be easily constructed using only an MCU, crystal oscillator, VGA connector and few capacitors.
HCS08 VGA Output – [Link]