Page 2 - Altera DE2 Board; CONTENTS; and
Altera DE2 Board ii CONTENTS Chapter 1 DE2-70 Package ............................................................................................................... 1 1.1 Package Contents ..................................................................................................................
Page 3 - Box
Altera DE2 Board iii 5.12 TV Decoder ........................................................................................................................ 52 5.13 Implementing a TV Encoder .............................................................................................. 54 5.14 Using...
Page 4 - Chapter 1; a computer that runs the Microsoft Windows software.; Package Contents
DE2-70 User Manual 1 Chapter 1 DE2-70 Package The DE2-70 package contains all components needed to use the DE2-70 board in conjunction with a computer that runs the Microsoft Windows software. 1.1 Package Contents Figure 1.1 shows a photograph of the DE2-70 package. Figure 1.1. The DE2-70 package co...
Page 5 - The DE2-70 Board Assembly
DE2-70 User Manual 2 The DE2-70 package includes: • The DE2-70 board • USB Cable for FPGA programming and control • DE2-70 System CD containing the DE2-70 documentation and supporting materials, including the User Manual, the Control Panel utility, reference designs and demonstrations, device datash...
Page 6 - Getting Help; Altera Corporation
DE2-70 User Manual 3 1.3 Getting Help Here are the addresses where you can get help if you encounter problems: • Altera Corporation 101 Innovation Drive San Jose, California, 95134 USA Email: [email protected] • Terasic Technologies No. 356, Sec. 1, Fusing E. Rd. Jhubei City, HsinChu County, Tai...
Page 7 - Chapter 2; Layout and Components
DE2-70 User Manual 4 Chapter 2 Altera DE2-70 Board This chapter presents the features and design characteristics of the DE2-70 board. 2.1 Layout and Components A photograph of the DE2-70 board is shown in Figure 2.1. It depicts the layout of the board and indicates the location of the connectors and...
Page 8 - Block Diagram of the DE2-70 Board
DE2-70 User Manual 5 (AS) programming modes are supported • 2-Mbyte SSRAM • Two 32-Mbyte SDRAM • 8-Mbyte Flash memory • SD Card socket • 4 pushbutton switches • 18 toggle switches • 18 red user LEDs • 9 green user LEDs • 50-MHz oscillator and 28.63-MHz oscillator for clock sources • 24-bit CD-qualit...
Page 12 - Getting
DE2-70 User Manual 9 Serial ports • One RS-232 port • One PS/2 port • DB-9 serial connector for the RS-232 port • PS/2 connector for connecting a PS2 mouse or keyboard to the DE2-70 board IrDA transceiver • Contains a 115.2-kb/s infrared transceiver • 32 mA LED drive current • Integrated EMI shield ...
Page 13 - Welcome to the Altera DE2-70; The VGA monitor displays the image shown in Figure 2.3.
DE2-70 User Manual 10 At this point you should observe the following: • All user LEDs are flashing • All 7-segment displays are cycling through the numbers 0 to F • The LCD display shows Welcome to the Altera DE2-70 • The VGA monitor displays the image shown in Figure 2.3. • Set the toggle switch SW...
Page 14 - Chapter 3; Control Panel Setup; Download Code; Note, the Control Panel will occupy the USB port until you
DE2-70 User Manual 11 Chapter 3 DE2-70 Control Panel The DE2-70 board comes with a Control Panel facility that allows users to access various components on the board from a host computer. The host computer communicates with the board through an USB connection. The facility can be used to verify the ...
Page 16 - Controlling the LEDs, 7-Segment Displays and LCD Display; LED
DE2-70 User Manual 13 7-SEG Display 16x2 LCD LEDs LEDs PS/2 SDRAM Flash SSRAM SD Card Soket USB Blaster USB Device Control Codes Figure 3.2. The DE2 -70 Control Panel concept. The DE2 -70 Control Panel can be used to light up LEDs, change the values displayed on 7-segment and LCD displays, monitor b...
Page 17 - Dot; will be updated immediately.
DE2-70 User Manual 14 Figure 3.3. Controlling LEDs. Choosing the 7-SEG tab leads to the window in Figure 3.4. In the tab sheet, directly use the Up-Down control and Dot Check box to specified desired patterns, the 7-SEG patterns on the board will be updated immediately. Figure 3.4. Controlling 7-SEG...
Page 18 - Switches and Buttons
DE2-70 User Manual 15 Choosing the LCD tab leads to the window in Figure 3.5. Text can be written to the LCD display by typing it in the LCD box and pressing the Set button. Figure 3.5. Controlling LEDs and the LCD display. The ability to set arbitrary values into simple display devices is not neede...
Page 19 - SDRAM/SSRAM/Flash Controller and Programmer; on the DE2; Memory; tab and select
DE2-70 User Manual 16 Figure 3.6. Monitoring switches and buttons. The ability to check the status of button and switch is not needed in typical design activities. However, it provides users a simple mechanism for verifying if the buttons and switches are functioning correctly. Thus, it can be used ...
Page 21 - USB Monitoring
DE2-70 User Manual 18 into the memory. The Sequential Read function is used to read the contents of the SDRAM-U1 and place them into a file as follows: 1. Specify the starting address in the Address box. 2. Specify the number of bytes to be copied into the file in the Length box. If the entire conte...
Page 22 - PS2 Device; Start
DE2-70 User Manual 19 Figure 3.8. USB Mouse Monitoring Tool. 3.6 PS2 Device The Control Panel provides users a tool to receive the inputs from a PS2 keyboard in real time. The received scan-codes are translated to ASCII code and displayed in the control window. Only visible ASCII codes are displayed...
Page 23 - SD CARD; SD-CARD Interface. Follow the steps below to exercise the SD card:; Read; button to read the SD card. The
DE2-70 User Manual 20 Figure 3.9. Reading the PS2 Keyboard. 3.7 SD CARD The function is designed to read the identification and specification of the SD card. The 1-bit SD MODE is used to access the SD card. This function can be used to verify the functionality of SD-CARD Interface. Follow the steps ...
Page 24 - Figure 3.10. Reading the SD card Identification and Specification.; Audio Playing and Recording; steps below to exercise this tool.; Audio; tab leads to the window in Figure 3.11.
DE2-70 User Manual 21 Figure 3.10. Reading the SD card Identification and Specification. 3.8 Audio Playing and Recording This interesting audio tool is designed to control the audio chip on the DE2-70 board for audio playing and recording. It can play audio stored in a given WAVE file, record audio,...
Page 26 - the board. The operation is as same as recording audio from MIC.; Overall Structure of the DE2-70 Control Panel; directory on the
DE2-70 User Manual 23 Figure 3.12. Audio Recording and Saving as a WAV file. To record audio sound from LINE-IN port, please connect an audio source to the LINE-IN port on the board. The operation is as same as recording audio from MIC. 3.9 Overall Structure of the DE2-70 Control Panel The DE2-70 Co...
Page 28 - Chapter 4; Video Utility Setup; The Control Panel will occupy the USB port until you
DE2-70 User Manual 25 Chapter 4 DE2-70 Video Utility The DE2-70 board comes with a video utility that allows users to access video components on the board from a host computer. The host computer communicates with the board through the USB-Blaster link. The facility can be used to verify the function...
Page 29 - VGA Display; Display
DE2-70 User Manual 26 Figure 4.1. The DE2-70 Video Utility window. 4.2 VGA Display Choosing the Display tab in the DE2-70 Video Utility leads to the window shown in Figure 4.2. The function is designed to download an image from the host computer to the FPGA board and output the image through the VGA...
Page 30 - Video Capture; Capture
DE2-70 User Manual 27 Figure 4.2. Displaying selected image file on VGA Monitor. 4.3 Video Capture Choosing the Capture tab leads to the window in Figure 4.3. The function is designed to capture an image from the video sources, and sent the image from the FPGA board to the host computer. The input v...
Page 31 - Overall Structure of the DE2-70 Video Utility
DE2-70 User Manual 28 Figure 4.3. Video Capturing Tool. 4.4 Overall Structure of the DE2-70 Video Utility The DE2-70 Video Utility is based on a NIOS II system running in the Cyclone II FPGA with the SDRAM-U2 or SSRAM. The software part is implemented in C code; the hardware part is implemented in V...
Page 33 - Chapter 5; Using the DE2-70 Board; Configuring the Cyclone II FPGA
DE2-70 User Manual 30 Chapter 5 Using the DE2-70 Board This chapter gives instructions for using the DE2-70 board and describes each of its I/O devices. 5.1 Configuring the Cyclone II FPGA The procedure for downloading a circuit from a host computer to the DE2-70 board is described in the tutorial Q...
Page 34 - Configuring the FPGA in JTAG Mode; sof; FPGA; Configuring the EPCS16 in AS Mode; pof
DE2-70 User Manual 31 Configuring the FPGA in JTAG Mode Figure 5.1 illustrates the JTAG configuration setup. To download a configuration bit stream into the Cyclone II FPGA, perform the following steps: • Ensure that power is applied to the DE2-70 board • Connect the supplied USB cable to the USB Bl...
Page 35 - Using the LEDs and Switches; or reset inputs in a circuit.
DE2-70 User Manual 32 position and then reset the board by turning the power switch off and back on; this action causes the new configuration data in the EPCS16 device to be loaded into the FPGA chip. USB Blast er Circuit EPC S1 6 Se r ia lC onf igur a t ion D e v ic e JTAG Confi g Port USB Auto Pow...
Page 39 - Using the 7-segment Displays; Table 5.4 shows the assignments of FPGA
DE2-70 User Manual 36 LEDG[7] PIN_ AA24 LED Green[7] LEDG[8] PIN_ AC14 LED Green[8] Table 5.3. Pin assignments for the LEDs. 5.3 Using the 7-segment Displays The DE2-70 Board has eight 7-segment displays. These displays are arranged into two pairs and a group of four, with the intent of displaying n...
Page 41 - Clock Circuitry; can use these clocks as a source clock for the PLL circuit.
DE2-70 User Manual 38 HEX5_D[0] PIN_M3 Seven Segment Digit 5[0] HEX5_D[1] PIN_L1 Seven Segment Digit 5[1] HEX5_D[2] PIN_L2 Seven Segment Digit 5[2] HEX5_D[3] PIN_L3 Seven Segment Digit 5[3] HEX5_D[4] PIN_K1 Seven Segment Digit 5[4] HEX5_D[5] PIN_K4 Seven Segment Digit 5[5] HEX5_D[6] PIN_K5 Seven Seg...
Page 43 - Using the LCD Module; the
DE2-70 User Manual 40 5.5 Using the LCD Module The LCD module has built-in fonts and can be used to display text by sending appropriate commands to the display controller, which is called HD44780. Detailed information for using the display is available in its datasheet, which can be found on the man...
Page 44 - the LCD_BLON signal should not be used in users’ design projects.; Using the Expansion Header; Table 5.7. Voltage level setting of the expansion headers using JP1.
DE2-70 User Manual 41 LCD_DATA[5] PIN_C2 LCD Data[5] LCD_DATA[6] PIN_C3 LCD Data[6] LCD_DATA[7] PIN_B2 LCD Data[7] LCD_RW PIN_F3 LCD Read/Write Select, 0 = Write, 1 = Read LCD_EN PIN_E2 LCD Enable LCD_RS PIN_F2 LCD Command/Data Select, 0 = Command, 1 = Data LCD_ON PIN_F1 LCD Power ON/OFF LCD_BLON PI...
Page 48 - Using VGA
DE2-70 User Manual 45 5.7 Using VGA The DE2-70 board includes a 16-pin D-SUB connector for VGA output. The VGA synchronization signals are provided directly from the Cyclone II FPGA, and the Analog Devices ADV7123 triple 10-bit high-speed video DAC is used to produce the analog data signals (red, gr...
Page 51 - Using the 24-bit Audio CODEC; Datasheet/Audio CODEC
DE2-70 User Manual 48 5.8 Using the 24-bit Audio CODEC The DE2-70 board provides high-quality 24-bit audio via the Wolfson WM8731 audio CODEC (enCOder/DECoder). This chip supports microphone-in, line-in, and line-out ports, with a sample rate adjustable from 8 kHz to 96 kHz. The WM8731 is controlled...
Page 53 - Fast Ethernet Network Controller; available on the manufacturer’s web site, or in the
DE2-70 User Manual 50 KB CLK KB DAT MSDAT MSCLK PS 2_KB DATPS 2_KB CLK PS 2_MSCLK PS 2_MSDAT VCC 5 VCC 5 VCC 5 VCC 33 VCC 33 VCC 5 VCC 5 VCC 33 VCC 33 R172 2K R172 2K BC35 0.1u BC35 0.1u R174 120 R174 120 R175 120 R175 120 D9 BA T54S D9 BA T54S 1 2 3 D96 BA T54S D96 BA T54S 1 2 3 D10 BA T54S D10 BA ...
Page 55 - TV Decoder; folder on the
DE2-70 User Manual 52 ENET_CS_N PIN_C28 DM9000A Chip Select ENET_INT PIN_C27 DM9000A Interrupt ENET_IOR_N PIN_A28 DM9000A Read ENET_IOW_N PIN_B28 DM9000A Write ENET_RESET_N PIN_B29 DM9000A Reset Table 5.15. Fast Ethernet pin assignments. 5.12 TV Decoder The DE2-70 board is equipped with two Analog D...
Page 57 - Implementing a TV Encoder; encoder implemented in this manner.
DE2-70 User Manual 54 TD1_CLK27 PIN_G15 TV Decoder 1 Clock Input. TD1_RESET_N PIN_D14 TV Decoder 1 Reset TD2_D[0] PIN_C10 TV Decoder 2 Data[0] TD2_D[1] PIN_A9 TV Decoder 2 Data[1] TD2_D[2] PIN_B9 TV Decoder 2 Data[2] TD2_D[3] PIN_C9 TV Decoder 2 Data[3] TD2_D[4] PIN_A8 TV Decoder 2 Data[4] TD2_D[5] ...
Page 58 - Using USB Host and Device; associated interface are listed in Table 5.17.
DE2-70 User Manual 55 5.14 Using USB Host and Device The DE2-70 board provides both USB host and device interfaces using the Philips ISP1362 single-chip USB controller. The host and device controllers are compliant with the Universal Serial Bus Specification Rev. 2.0, supporting data transfer at ful...
Page 59 - Using IrDA
DE2-70 User Manual 56 OTG_D[4] PIN_J12 ISP1362 Data[4] OTG_D[5] PIN_H12 ISP1362 Data[5] OTG_D[6] PIN_H13 ISP1362 Data[6] OTG_D[7] PIN_G13 ISP1362 Data[7] OTG_D[8] PIN_D4 ISP1362 Data[8] OTG_D[9] PIN_D5 ISP1362 Data[9] OTG_D[10] PIN_D6 ISP1362 Data[10] OTG_D[11] PIN_E7 ISP1362 Data[11] OTG_D[12] PIN_...
Page 60 - chips are provided in the
DE2-70 User Manual 57 The pin assignments of the associated interface are listed in Table 5.18. IRD A_TXD IRD A_RXD VCC 33 VCC 33 R42 120 R42 120 R41 120 R41 120 U6 IrDA U6 IrDA AGN D 4 VC C 3 N C 2 GN D 1 SD 5 R XD 6 TXD 7 LED A 8 SH IELD 9 R43 47 R43 47 Figure 5.21. IrDA schematic. Signal Name FPG...
Page 69 - Chapter 6; Examples of Advanced Demonstrations; Installing the Demonstrations; It is; DE2-70 Factory Configuration; Demonstration Setup, File Locations, and Instructions
DE2-70 User Manual 66 Chapter 6 Examples of Advanced Demonstrations This chapter provides a number of examples of advanced circuits implemented on the DE2-70 board. These circuits provide demonstrations of the major features on the board, such as its audio and video capabilities, and USB and Etherne...
Page 70 - TV Box Demonstration
DE2-70 User Manual 67 • 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 th...
Page 72 - TV Box Picture in Picture (PIP) Demonstration; main/sub window via a toggle switch.
DE2-70 User Manual 69 DE-interlace ITU-R 656 YUV 4:2:2 Decoder VGA(LCD/CRT)Monitor Line Out VGA Out DVD Player Video In Line In Audio Output CVBS S-VideoYPbPr Output Speaker Figure 6.2. The setup for the TV box demonstration. 6.3 TV Box Picture in Picture (PIP) Demonstration The DE2-70 board has two...
Page 75 - Table 6.1. The setup for the TV box PIP demonstration; USB Paintbrush; VGA Controller
DE2-70 User Manual 72 SW[16] = OFF SW[17] = OFF; SW[16] = ON Signal display mode Video in 1 SW[17] = ON; SW[16] = OFF PIP display mode Main window: Video in 2 Sub window : Video in 1 SW[17] = ON; SW[16] = ON PIP display mode Main window: Video in 1 Sub window : Video in 2 Table 6.1. The setup for th...
Page 76 - Compile
DE2-70 User Manual 73 Nios II CPU Altera System Interconnect Fabric Philips ISP1362 Host Port VGA Controller Frame Buffer USB Mouse ADV7123 Figure 6.5. Block diagram of the USB paintbrush demonstration. Demonstration Setup, File Locations, and Instructions Project directory: DE2_70_NIOS_HOST_MOUSE_V...
Page 77 - Figure 6.6. The setup for the USB paintbrush demonstration.; USB Device; Philips PDIUSBD12 SMART; Add; button in the window panel of the software
DE2-70 User Manual 74 USB Driver VGA Controller IP On-Chip Video Frame Buffer VGA Monitor Figure 6.6. The setup for the USB paintbrush demonstration. 6.5 USB Device Most USB applications and products operate as USB devices, rather than USB hosts. In this demonstration, we show how the DE2-70 board c...
Page 78 - Clear
DE2-70 User Manual 75 the user clicks on the Clear button in the window panel of the software driver, the host computer sends a different USB packet to the board, which causes the Nios II processor to clear the hardware counter to zero. Figure 6.7. Block diagram of the USB device demonstration. Demo...
Page 79 - device; A Karaoke Machine; reconfigures
DE2-70 User Manual 76 USB Driver 7-SEG Control Accumulator PC Figure 6.8. The setup for the USB device demonstration. 6.6 A Karaoke Machine This demonstration uses the microphone-in, line-in, and line-out ports on the DE2-70 board to create a Karaoke Machine application. The Wolfson WM8731 audio COD...
Page 81 - Ethernet Packet Sending/Receiving; and sends it to the Ethernet port.
DE2-70 User Manual 78 Clock/Data Frequency Generator Speaker MP3/Any Audio Output Microphone Figure 6.10. The setup for the Karaoke Machine. 6.7 Ethernet Packet Sending/Receiving In this demonstration, we will show how to send and receive Ethernet packets using the Fast Ethernet controller on DE2-70...
Page 83 - SD Card Music Player; advanced multimedia products using the DE2-70 board.
DE2-70 User Manual 80 Ethernet Driver 10/100Mbps CAT 5 Cable Loopback Device Figure 6.12. The setup for the Ethernet demonstration. 6.8 SD Card Music Player Many commercial media/audio players use a large external storage device, such as an SD card or CF card, to store music or video files. Such pla...
Page 86 - Music Synthesizer Demonstration
DE2-70 User Manual 83 • Press KEY3 on the DE2-70 board can play the next music file stored in the SD card. • Press KEY2 and KEY1 will increase and decrease the output music volume respectively. . Figure 6.16 illustrates the setup for this demonstration. SD Card Driver Audio CODEC Controller On-Chip ...
Page 89 - Figure 6.16. The Setup of the Music Synthesizer Demonstration.
DE2-70 User Manual 86 I #4 K 5 O #5 L 6 P #6 : 7 “ +1 Table 6.3. Usage of the PS/2 Keyboard’s keys. Line Out Keyboard Input VGA Out Music Synthesizer Algorithms for Audio Processing VGA(LCD/CRT)Monitor Keyboard Speaker C D E F G A B C D E F G A B C D E F G A B Figure 6.16. The Setup of the Music Syn...
Page 90 - Audio Recording and Playing
DE2-70 User Manual 87 6.10 Audio Recording and Playing This demonstration shows how to implement an audio recorder and player using the DE2-70 board with the built-in Audio CODEC chip. This demonstration is developed based on SOPC Builder and NIOS II IDE. Figure 6.18 shows the man-machine interface ...
Page 91 - SOPC
DE2-70 User Manual 88 hardware part is built by SOPC Builder under Quartus II. The hardware part includes all the other blocks. The “AUDIO Controller” is a user-defined SOPC component. It is designed to send audio data to the audio chip or receive audio data from the audio chip. The audio chip is pr...
Page 92 - Table 6.4. Toggle switch setting for audio recorder and player.
DE2-70 User Manual 89 • Load the Software Execution File into FPGA. ( note *1 ) • Configure audio with the toggle switches. • Press KEY3 on the DE2-70 board to start/stop audio recoding ( note *2 ) • Press KEY2 on the DE2-70 board to start/stop audio playing ( note *3 ) Note: (1). Execute DE2_70_AUD...
Page 93 - Chapter 7; Appendix; Revision History; Copyright Statement; Copyright © 2007 Terasic Technologies. All rights reserved.
DE2-70 User Manual 90 Chapter 7 Appendix 7.1 Revision History Version Change Log V1.0 Initial Version (Preliminary) V1.01 1. Add appendix chapter. 2. Modify Chapter 2,3,4,5,6. 7.2 Copyright Statement Copyright © 2007 Terasic Technologies. All rights reserved.