Using the CODEC ReadMeFirst

Similar documents
Lab 4: Using the CODEC

The Audio Synthesizer

Lab 4 An FPGA Based Digital System Design ReadMeFirst

Lab 6 - MCU CODEC IIR Filter ReadMeFirst

Lab 1: Introduction to Laboratory Equipment ReadMeFirst

Operational Amplifiers 2 Active Filters ReadMeFirst

Lab 12 Laboratory 12 Data Acquisition Required Special Equipment: 12.1 Objectives 12.2 Introduction 12.3 A/D basics

Tektronix digital oscilloscope, BK Precision Function Generator, coaxial cables, breadboard, the crystal earpiece from your AM radio kit.

The University of Queensland School of Information Technology and Electrical Engineering. ELEC3004/7312: Signals, Systems and Controls

Cyclone II Filtering Lab

Experiment I: An Introduction to the Arduino Due + Sampling and Reconstruction

Experiment A8 Electronics III Procedure

Experiment # 4. Frequency Modulation

Exercise 1: AC Waveform Generator Familiarization

Laboratory Assignment 1 Sampling Phenomena

On-Line Students Analog Discovery 2: Arbitrary Waveform Generator (AWG). Two channel oscilloscope

Sampling and Reconstruction

ESE 150 Lab 04: The Discrete Fourier Transform (DFT)

Laboratory Experiment #1 Introduction to Spectral Analysis

P a g e 1 ST985. TDR Cable Analyzer Instruction Manual. Analog Arts Inc.

EXPERIMENT 1: INTRODUCTION TO THE NEXYS 2. ELEC 3004/7312: Signals Systems & Controls EXPERIMENT 1: INTRODUCTION TO THE NEXYS 2

Introduction to the Analog Discovery

EECS 216 Winter 2008 Lab 2: FM Detector Part II: In-Lab & Post-Lab Assignment

Stratix II Filtering Lab

ENGR 1110: Introduction to Engineering Lab 7 Pulse Width Modulation (PWM)

Sound Wave Measurements using an Oscilloscope and Waveform Generator

Advanced Lab LAB 6: Signal Acquisition & Spectrum Analysis Using VirtualBench DSA Equipment: Objectives:

SGN Bachelor s Laboratory Course in Signal Processing Audio frequency band division filter ( ) Name: Student number:

Pre-Lab. Introduction

Lab Report #10 Alex Styborski, Daniel Telesman, and Josh Kauffman Group 12 Abstract

Stratix Filtering Reference Design

UNIVERSITY OF NORTH CAROLINA AT CHARLOTTE Department of Electrical and Computer Engineering

Set-up. Equipment required: Your issued Laptop MATLAB ( if you don t already have it on your laptop)

DT 9818 Waveform-Generator. Hardware Trigger Version. Operating Manual. Version 2.0. May Page 1 of 21

Experiment A8 Electronics III Procedure

ESE 150 Lab 04: The Discrete Fourier Transform (DFT)

ECE 2274 Lab 1 (Intro)

Page 1/10 Digilent Analog Discovery (DAD) Tutorial 6-Aug-15. Figure 2: DAD pin configuration

On-Line Students Analog Discovery 2: Arbitrary Waveform Generator (AWG). Two channel oscilloscope

ESE 350 Microcontroller Laboratory Lab 5: Sensor-Actuator Lab

The Oscilloscope. Vision is the art of seeing things invisible. J. Swift ( ) OBJECTIVE To learn to operate a digital oscilloscope.

Getting started with Mobile Studio.

Interfacing to the SoundStation VTX 1000 TM with Vortex Devices

Experiment 8: An AC Circuit

Precalculations Individual Portion Introductory Lab: Basic Operation of Common Laboratory Instruments

ITT Technical Institute. ET275 Electronic Communications Systems I Onsite Course SYLLABUS

ET275P Electronic Communications Systems I [Onsite]

LAB #7: Digital Signal Processing

Lab 5 Timer Module PWM ReadMeFirst

Mic Mate Pro. User Manual

The oscilloscope and RC filters

Exploring DSP Performance

Build Your Own Bose WaveRadio Bass Preamp Active Filter Design

Lab E5: Filters and Complex Impedance

EE 201 Lab! Tektronix 3021B function generator

Transmission Lines and TDR

Acoustic Resonance Lab

Data Conversion and Lab Lab 4 Fall Digital to Analog Conversions

Lab #1 Lab Introduction

LABORATORY 4. Palomar College ENGR210 Spring 2017 ASSIGNED: 3/21/17

Experiment # 2 Pulse Code Modulation: Uniform and Non-Uniform

Name: First-Order Response: RC Networks Objective: To gain experience with first-order response of RC circuits

Analog Discovery Arbitrary Function Generator for Windows 7 by Mr. David Fritz and Ms. Ellen Robertson

Lab 4: Analysis of the Stereo Amplifier

The University of Jordan Mechatronics Engineering Department Electronics Lab.( ) Experiment 1: Lab Equipment Familiarization

When you have completed this exercise, you will be able to relate the gain and bandwidth of an op amp

EECE Circuits and Signals: Biomedical Applications. Lab 3. Basic Instruments, Components and Circuits. Introduction to Spice and AC circuits

University of North Carolina-Charlotte Department of Electrical and Computer Engineering ECGR 3157 Electrical Engineering Design II Fall 2013

EE 1210 Op Amps, Gain, and Signal Integrity Laboratory Project 6

Introduction to Lab Instruments

LAB II. INTRODUCTION TO LABVIEW

MASSACHUSETTS INSTITUTE OF TECHNOLOGY /6.071 Introduction to Electronics, Signals and Measurement Spring 2006

Precalculations Individual Portion Filter Lab: Building and Testing Electrical Filters

Lab 2: Linear and Nonlinear Circuit Elements and Networks

Lab 1B LabVIEW Filter Signal

DSP Dude: A DSP Audio Pre-Amplifier

The Single-Phase PWM Inverter with Dual-Polarity DC Bus

Exercise 2-1. PAM Signals EXERCISE OBJECTIVE DISCUSSION OUTLINE. Signal sampling DISCUSSION

The Sampling Theorem:

Experiment 02: Amplitude Modulation

Integrators, differentiators, and simple filters

Group: Names: Resistor Band Colors Measured Value ( ) R 1 : 1k R 2 : 1k R 3 : 2k R 4 : 1M R 5 : 1M

Experiment # 1 Introduction to Lab Equipment

Lab Report #7 Alex Styborski, Daniel Telesman, and Josh Kauffman Group 12 March 22, 2013 Abstract

MFJ-752C SIGNAL ENHANCER II

Group: Names: (1) In this step you will examine the effects of AC coupling of an oscilloscope.

RC Filters and Basic Timer Functionality

CHAPTER 6. Motor Driver

Experiment # 5 Baseband Pulse Transmission

Exercise 1: Touch and Position Sensing

Physics 472, Graduate Laboratory DAQ with Matlab. Overview of data acquisition (DAQ) with GPIB

Agilent 33522A Function Arbitrary Waveform Generator. Tektronix TDS 3012B Oscilloscope

Cornerstone Electronics Technology and Robotics Week 21 Electricity & Electronics Section 10.5, Oscilloscope

Transmit filter designs for ADSL modems

Digital Signal Processing

Lab 3: RC Circuits. Construct circuit 2 in EveryCircuit. Set values for the capacitor and resistor to match those in figure 2 and set the frequency to

MAE106 Laboratory Exercises Lab # 1 - Laboratory tools

1.0 Introduction to VirtualBench

EE25266 ASIC/FPGA Chip Design. Designing a FIR Filter, FPGA in the Loop, Ethernet

Rowan University Freshman Clinic I Lab Project 2 The Operational Amplifier (Op Amp)

Transcription:

Using the CODEC ReadMeFirst Lab Summary This lab covers the use of the CODEC that is necessary in nearly all of the future labs. This lab is divided into three parts. In the first part, you will work with the use of the CODEC on the DE2 board to examine basic signals from the benchtop function generator in both the analog and digital domain. In Part 2, you will use the CODEC to observe an audio signal from an MP3 player or the ipad. In the third part, you will send in an analog signal into the DE2 board and observe the converted digital waveform in Signal Tap II. Please note that much of this lab was developed for the previous version of the DE2 FPGA boards. Please be patient when viewing the video as portions that are describing the creation and configuration of the CODEC no longer apply to your lab. Lab Background Most real world signals are analog. In order for a digital device such as an FPGA to communicate with the outside world, an analog to digital (A/D) conversion using a CODEC is essential. Once the digital circuitry processes the digitized signal, it must be converted back as a modified analog signal using the digital-to-analog convertor (DAC). You can use the CODEC whenever an external signal (such as one from the signal generator) must be processed, or when sending a signal from the DE2 Board to an external device (such as on the oscilloscope or a speaker). Lab Preparation Supplies DE2 Board x 1 USB Blaster Cable x 1 BNC Coaxial Cable x 2 BNC to RCA Adapter x 2 RCA to 3.5 mm Cable x 2 3.5 mm to 3.5 mm Cable x 1

Documents Review the following documents: Sampling.pdf DE2_CODEC_use.pdf Videos Watch the following screencasts prior to performing the lab: 1) Sampling.mp4 2) Using the Codec.mp4

Part 1: The CODEC In this part, you will be learning how to use the CODEC interface. To test the CODEC, you will input a wave from the signal generator and convert it to a digital wave. You will then convert the digital wave back to an analog wave and observe the result on the oscilloscope. Begin by downloading the archived project named CODEC_Proj into your working directory on the Z drive. This can be found in the 2060 Labs website under Lab 04 and Files on the lab computer desktop. Create a folder of the same name. Place the archive in the folder, and double click on the archive ICON. NOTE 1 : Any project requiring a CODEC will be available for you on the website. Do not Create a new project. Open the project provided and continue the lab by adding to it. NOTE 2 : It is not necessary to configure the CODEC as it was on the old Cyclone II boards. Please ignore any reference to Configure CODEC either in the videos or in any of the other support documentation. NOTE 3 : It is not necessary to change the Core Voltage to 1.2V for any of the projects downloaded from the website. This step has already been performed for you when the CODEC project was created. Construct the schematic shown below. NOTE 4 : This is the CODEC that comes with the project. JUST MODIFY it. DO NOT create another CODEC.

Procedure: 1) Connect the AUD_in and AUD_out buses as shown in the schematic. 2) Program the DE2 Board with your circuit. 3) Use the RCA to BNC adapters and the RCA phono jack splitter cables to connect a BNC coaxial cable between CH1 of the signal generator and either the red or white connectors on the splitter cable that is plugged in to the Line In on the DE2 board (BLUE). 4) Use a second set of cables and adapters to connect the DE2 board Line Out (GREEN) to CH1 of the oscilloscope. 5) Set the signal generator to produce a 1 khz, 1 Volt peak-to-peak Sine wave. 6) Observe this wave on the oscilloscope. NOTE 5 : Remember to ENABLE the Output on CH1 of the Signal Generator. NOTE 6 : Check both the red & white connectors on both of splitter cables (4 combinations) in order to patch your signals through to the correct places in the set-up wave. The left and right color coding varies with brand of RCA/35mm adapter. NOTE 7 : You may also find the Autoscale button (white) on the oscilloscope very helpful when look for the waveform. Result 1: Take a screenshot of the sine wave on the oscilloscope and include this in your lab report. Result 2: Export the oscilloscope data and plot the data in MATLAB. Include this in your lab report. 6) Using the signal generator, produce a Square Wave with the same frequency and peakto-peak voltage as the above sine wave. Observe this wave on the oscilloscope and save the waveform. Result 3: Take a screenshot of the wave on the oscilloscope and include this in your lab report. Result 4: Export the oscilloscope data and plot the wave in MATLAB. Include this in your lab report. Checkpoint 1: Show the lab monitor both of your MATLAB plots.

Part 2: Codec Application In this part, we will observe the signal from an MP3 player on the oscilloscope, using the circuit from the last project. Procedure 1. Connect the Line in of the DE2 board to a MP3 player (or the ipad, computer, etc.) using the 3.5 mm to 3.5 mm cable. 2. Play any sort of file that contains audio. (Your favorite song?) 3. Change the time base on the oscilloscope to a low setting, 50 milliseconds/divisions, 4. Change the vertical scale on the oscilloscope to 1.00 Volts/division to begin with. You may adjust it later to be able to better see your music signal. 5. Observe the signal on the oscilloscope. 6. Now try changing the volume of the device. What happens to the amplitude on the oscilloscope? Result 5: Take a screenshot of the music signal on the oscilloscope and include it with your lab report.

Part 3: The A/D Converter In this part, you will use Signal Tap II to plot the digitalized waveform. ***************************************************************************** NOTE: You will need to use this part of the lab to answer Topic 4 in the discussion questions ***************************************************************************** Procedure 1) Create two output (bus) pins for both AUD_inL[15..0] and AUD_inR[15..0] separately. 2) Run Analysis & Synthesis (the 1 st stage of compilation) and set up Signal Tap. The Analysis & Synthesis button is as shown in the figure below. Select the clock in Signal Tap to be AUD_ADCLRCK and add AUD_inL[15..0] and AUD_inR[15..0] to node list. If you have trouble, review the Signal Tap II Logic Analyzer Screencast from the previous lab. 3) Connect the Signal Generator to the Line In of the DE2 board (BLUE). Use 2 cable sets and connect the signal to both the red and white RCA input channels. Set the signal generator to generate a sine wave with 2 Vpp and 1 khz frequency. 4) Recompile and Reprogram. Observe the results from the two AUD_in pins in Signal Tap II. Verify that you are getting a sine wave. 5) Set the signal generator to generate a sine wave with a frequency such that the normalized frequency is 1/10. Recall that the sampling rate (Fs) of the CODEC is 48000 Hz and the normalized frequency is related to the frequency by the equation f = F/Fs. (i.e. f = 1/10, set the signal generator to F = 48000 Hz/10).

6) Rerun the Signal Tap II Program and observe the results as a Signed Bar Chart. Select the signal name -> right clock -> Scroll down to Bus Display Format -> Second setting from the bottom is Signed Bar Chart. Results 6: Take a screenshot of the Signal Tap results and include it in your lab report. Checkpoint 2: Show your results to the lab monitor. Checkpoint 3: Clean up and show your workbench to the lab monitor. Discussion Questions Topic 1: What is the sampling frequency of the CODEC? Topic 2: What frequency should the signal generator be set at to achieve a normalized frequency f = 0.5? Topic 3: Explain why the units of the normalized frequency are in cycles/sample. In other words, what does it mean to have a signal that oscillates at 1/3 cycles/sample? What is the relationship between actual frequency, normalized frequency and cycles per sample. Topic 4: Use the circuit you developed in part 3 of the lab to find at what normalized frequency do you begin to stop seeing a signal? Set your function generator to 2 V peak-peak. Figure out the frequency in Hertz at which Signal Tap stops reproducing a signal. Then divide by the sampling frequency to calculate the normalized frequency. Remember that F = f*fs (Assume Fs = 48,000 Hz). What you are examining is referred to as aliasing and the Nyquist criteria for sampling. Hint: Use Autorun Analysis to change the frequency and observe the signal in real time. Topic 5: CODEC stands for Encoding and Decoding. How are each of these functions accomplished at the hardware level?