Ivo van Poorten / vga640x400

Dependents:   projet_AWA_testVGA2

Embed: (wiki syntax)

« Back to documentation index

vga640x400.h File Reference

vga640x400.h File Reference

Generate a 640x400 VGA signal. More...

Go to the source code of this file.

Functions

void init_vga (void)
 Initialize the VGA signal.

Variables

unsigned char text_buffer [80 *25]
 80x25 screen buffer, i.e. 25 lines of 80 characters.
unsigned char * font
 Pointer to the user supplied font.

Detailed Description

Generate a 640x400 VGA signal.

The following mbed pins are used:

  • DIP5 - Monochrome bitstream (connect to R, G and B through 470R resistors)
  • DIP8 - VSYNC
  • DIP25 - HSYNC
  • GND

Definition in file vga640x400.h.


Function Documentation

void init_vga ( void   )

Initialize the VGA signal.

This function should be the very first thing you call, before doing anything else. It turns off all peripherals, sets the main clock to 100MHz (instead of the 96MHz default of the mbed) and switches on PWM, I2S and DMA.

Definition at line 254 of file vga640x400.c.


Variable Documentation

unsigned char* font

Pointer to the user supplied font.

Each character is 8 pixels wide and 16 pixels high. The font consists of 16 groups of 256 bytes. i.e. 256 times the first byte of each character, then 256 times the second byte of each character, and so on. This differs from the most common way bitmap fonts are ordered, so you have to preprocess your font data first.

Definition at line 39 of file vga640x400.c.

unsigned char text_buffer[80 *25]

80x25 screen buffer, i.e. 25 lines of 80 characters.

Definition at line 38 of file vga640x400.c.