[Lui's homepage] [DSP homepage]

CE 101, 2nd Semester 2003-2004
Lab Exercise 3

A Digital Sinusoidal Oscillator on the 'C542

This exercise requires use of the 'C542 kits, the dskplasm assembler, and the associated C54x Code Explorer software in the DSP Lab.

In this exercise you will implement digital sinusoidal oscillators on the 'C542. More information on these oscillators is provided [here].

1. First write code in the 'C542 assembly language implementing a digital sinusoidal oscillator generating samples of

0.25 sin( 2 pi f1 t)

where f1 is the frequency assigned to you. [frequency assignments] Use 8000 Hz as sampling rate. You will need to know how to represent constants in a fixed-point format, and how to multiply them properly.

Design your code such that it writes 200 or more samples of 0.25 sin( 2 pi f1 t) into an array of memory locations starting at 0x2000.

Set a breakpoint after the samples are written to memory. (Help on how to set breakpoints is available from the Code Explorer Menu.) Once the breakpoint is reached use View>>Graph from the Code Explorer Menu in order to produce a graph of at least 200 samples generated by your oscillator. Be sure to set all graph parameters appropriately. Be sure that the graph generated is indeed that of a sinusoid having the right amplitude and period.

Use alt-PrintScreen to capture the graph generated. Be able to show this graph during evaluation of this lab exercise.

2. Next, write code to implement a digital sinusoidal oscillator that actually outputs a continuous tone of frequency f1 using the 'C542 kits in the lab. Set the analog interface (the DAC in particular) to operate at 8000 Hz.

Note that the DAC is a 14-bit DAC and that the 2 least significant bits of a 16-bit value sent to the DAC must be zeroed out. Read the TLC320AC01C Data Manual for details.

 

Be able to answer all questions related to this exercise. During evaluation of this exercise, you must have with you on files or on paper any and all forms of documentation that you would need to show and/or discuss how you went about doing this exercise.

 

[Lui's homepage] [DSP homepage]


 

This page has been accessed
Counter
times since December 6, 2003.

Created December 6, 2003
Last updated December 6, 2003
By Luisito L. Agustin
lui_agustin@yahoo.com
1