User manual

DE2 User Manual
55
Power on the DE2 board, with the USB cable connected to the USB Blaster port. If
necessary (that is, if the default factory configuration of the DE2 board is not currently
stored in EPCS16 device), download the bit stream to the board by using either JTAG or AS
programming
You should now be able to observe that the 7-segment displays are displaying a sequence of
characters, and the red and green LEDs are flashing. Also, Welcome to the Altera DE2
Board is shown on the LCD display
Optionally connect a VGA display to the VGA D-SUB connector. When connected, the
VGA display should show a pattern of colors.
Optionally connect a powered speaker to the stereo audio-out jack
Place toggle switch SW17 in the UP position to hear a 1 kHz humming sound from the
audio-out port. Alternatively, if switch SW17 is DOWN, the microphone-in port can be
connected to a microphone to hear voice sounds, or the line-in port can be used to play audio
from an appropriate sound source.
The Verilog source code for this demonstration is provided in the DE2_Default folder, which also
includes the necessary files for the corresponding Quartus II project. The top-level Verilog file,
called DE2_Default.v, can be used as a template for other projects, because it defines ports that
correspond to all of the user-accessible pins on the Cyclone II FPGA.
5.2 TV Box Demonstration
This demonstration plays video and audio input from a DVD player using the VGA output and
audio CODEC on the DE2 board. Figure 5.1 shows the block diagram of the design. There are two
major blocks in the circuit, called I2C_AV_Config and TV_to_VGA. The TV_to_VGA block consists
of the ITU-R 656 Decoder, SDRAM Frame Buffer, YUV422 to YUV444, YCrCb to RGB, and VGA
Controller. The figure also shows the TV Decoder (ADV7181) and the VGA DAC (ADV7123)
chips used.
As soon as the bit stream is downloaded into the FPGA, the register values of the TV Decoder chip
are used to configure the TV decoder via the I2C_AV_Config block, which uses the I2C protocol to
communicate with the TV Decoder chip. Following the power-on sequence, the TV Decoder chip
will be unstable for a time period; the Lock Detector is responsible for detecting this instability.
The ITU-R 656 Decoder block extracts YCrCb 4:2:2 (YUV 4:2:2) video signals from the ITU-R 656
data stream sent from the TV Decoder. It also generates a data valid control signal indicating the
valid period of data output. Because the video signal from the TV Decoder is interlaced, we need to
perform de-interlacing on the data source. We used the SDRAM Frame Buffer and a field selection
multiplexer(MUX) which is controled by the VGA controller to perform the de-interlacing operation.