Three-pin 640x400 VGA Console Mode

Dependents:   projet_AWA_testVGA2

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers vga640x400.h Source File

vga640x400.h

Go to the documentation of this file.
00001 #ifndef VGA640X400_H
00002 #define VGA640X400_H
00003 
00004 /**
00005  * @file vga640x400.h
00006  * Generate a 640x400 VGA signal.
00007  *
00008  * The following mbed pins are used:
00009  * - DIP5 - Monochrome bitstream (connect to R, G and B through 470R resistors)
00010  * - DIP8 - VSYNC
00011  * - DIP25 - HSYNC
00012  * - GND
00013  */
00014  
00015 extern unsigned char text_buffer[80*25]; ///< 80x25 screen buffer, i.e. 25 lines of 80 characters.
00016 extern unsigned char *font;              ///< Pointer to the user supplied font.
00017                                          ///< Each character is 8 pixels wide and 16 pixels high.
00018                                          ///< The font consists of 16 groups of 256 bytes.
00019                                          ///< i.e. 256 times the first byte of each character, then
00020                                          ///< 256 times the second byte of each character, and so on.
00021                                          ///< This differs from the most common way bitmap fonts are
00022                                          ///< ordered, so you have to preprocess your font data first.
00023                                     
00024 
00025 /** Initialize the VGA signal
00026  *
00027  * This function should be the very first thing you call, before doing anything else.
00028  * It turns off all peripherals, sets the main clock to 100MHz (instead of the 96MHz default of the mbed)
00029  * and switches on PWM, I2S and DMA.
00030  */
00031 void init_vga(void);
00032 
00033 #endif