Fonts and putchar - tarasjg/mbed-vga GitHub Wiki

  • VGA has a total of 15 pins. for this project, we combine Red, Green, Blue signal to a single Mbed pin(p5). this way it will be able to display white text on the screen. (picture below of combination of RGB and VGA connector pinout).

*VGA monitor is display text by using pixel by pixel method. By organizing the output signal to the alphabet using a Mbed library, we can display a text message on the monitor. (below is an example of display text library in the file of vga_font.h)

  • connect between Mbed and VGA, first, we connect a 330 Ohms resistor between Red, Green, Blue signal altogether, and P5 on the Mbed (a larger resistor value will make the brightness lower). second, we connected the Ground pin of the HSync and VSync to the Ground on the Mbed. lastly, we connect the HSysnc to P25, and VSysnc to P8. (the connection between the Mbed and VGA cable using the pinout below)

  • Once everything is set up, use function vga_putchar can display the full character set available, (see below picture for code and a demo video showing how it works on the Mbed with all available character displays. VGA demo for full character set [upload Youtube video]

  • using the vga_putstring, it can set the x,y location, string, and color for the text. however, since the RGB was connected to one output, the VGA is only able to display WHITE. (below is an example code that display an string with color WHITE) (here is the demo video of display a string on monitor by Mbed via VGA)

uploaded Youtube video of display string using VGA

demo program zip file

compiled Mbed LPC1768 file

fastlib (VGA library credit to Ivo van Poorten)