Objective: Program a display using the VGA display interface
The Video Graphics Array interface was developed by IBM in 1987. VGA has a standard resolution of 640x480 pixels at a refresh rate of 60Hz, and is commonly found in older computer monitors and televisions.
The main difference between VGA and its newer counterparts (HDMI, Display Port, and DVI) is that VGA carries only analog video signals while the other standards utilize digital or a mix of analog and digital to achieve higher resolutions and image quality. In this lab we will be designing a VGA controller to drive a standard VGA display.
The main difference between VGA and its newer counterparts (HDMI, Display Port, and DVI) is that VGA carries only analog video signals while the other standards utilize digital or a mix of analog and digital to achieve higher resolutions and image quality. In this lab we will be designing a VGA controller to drive a standard VGA display.
Lab Components
- 10 kOhm resistor
- 2x 68 Ohm resistors
- 2x 470 Ohm resistors
- VGA adapter
- Solder-less Protoboard
- Jumper Wires
- Arduino
Part 1: Hardware Setup
In part 1 of the project we will connect a VGA compatible display to our arduino.
Procedure:
Connect the arduino to the attached female end of the included VGA connector as shown in the below figure.
Connect the arduino to the attached female end of the included VGA connector as shown in the below figure.
- We will follow the basic outline of Nick Gammon's How to output VGA signals to a monitor. Please go to the website and make sure you understand how the code works.
- Download the code WorkingVGAout.ino and the two libraries: screen font.h and TimerHelpers.h
- Program this onto the Arduino. Make sure the code, and both libraries are open at the same time. Use Sketch---> Add File to add the two .h files if they are not there
- Instead of using the USB programmer, use the power brick to power the board
- It might take a few seconds for the monitor to synchronize the output
Part 2: Awesome Project of your Choice
Unlike the other labs, the project requirements are intentionally somewhat open-ended. Be creative!
Some ideas for your project.
- Dynamic text
- Color
- Sound generation ( over the RCA port)
- Making a terminal
- Adding interaction for a game
- Building a character map for non-Roman alphabets
- Improving the resolution of the system
Useful reference/ inspiration for you to browse over (embedded link):
Questions:
- What are the basic timing signals and how the VSYNC and HSYNC signals work
- Point out the section of the code that generates VSYNC and HSYNC
- How the characters are generated
- How the character library works, and how the characters were selected. In particular, explain and replicate the character map for the number zero and include this on the report ( Feel free to print a graph paper from here)
- How the HSYNC signal synchronizes each line, and how the VSYNC works over each frame cycle. Include a sketch of both signals or capture them using the oscilloscope
- How co-opting the TX line is used in this code to provide reliable timing signal