EXPERIMENT 2 INPUT/OUTPUT written by Neal Glover (nealglover@uky.campus.mci.net) Anthony Reeves (acrv@msg.ti.com) Kevin Donohue (donohue@engr.uky.edu) University of Kentucky Electrical Engineering Department REFERENCES DSKD Starter Kit Manual TMS320C31 Users Guide TLC32040 Spec Sheets EQUIPMENT AND MATERIALS DSKD Starter Kit and Software Personal Computer RCA Jack 9 Vac power supply (for the DSK) Signal Generator Oscilloscope INTRODUCTION The purpose of this experiment is to learn how to use the Analog Interface Circuit (AIC) in conjunction with the DSP. An input sample will be taken from the Analog to Digital Converter (ADC) of the AIC and output to the Digital to Analog Converter (DAC).This experiment will allow you to observe aliasing effects on different signals, to learn to program using interrupts and the AIC interface in preparation for subsequent experiments. The program provided gets an analog input throught the input serial port and provides a digital output through the output serial port with the help of interrupts which provide synchronization.The sampling frequency of the ADC could be changed by setting specific bit patterns and the anti-aliasing filter and the gain control in the AIC could be enabled or disabled through specific settings. The aim of the experiment is to familiarise with those settings and also to learn to program using interrupts and accessing the peripheral devices. PROCEDURE 1. With the power turned off, connect your board to the prallel port on the computer. Connect the 9 Vac adapter to the board and plug into an outlet. Turn on the PC and change to the directory containing the DSK software. 2. If so the DSK is connected and functioning correctly and you are ready to begin work. 3. Examine the initc31.asm program and try to understand its operation. Comments have been provided to show how the initialization routine works. Look through the data sheets on the AIC (TLC32040C). 4. To demonstrate how to utilize an interrupt service routine (ISR), initialize the AIC to a 8 kHz synchronous sampling frequency, with the anti-aliasing filter on, and no scaling.Modify the appropriate initc31.asm file to accomplish this. Since this same routine will be used throughout the remainder of the labs you should fix this file so you can simply use ".include initcXX.asm" in your source. Or you may copy this file and use it as the starting point for each experiment. 5. A routine that will input data from the ADC of the AIC and sent it back out to the DAC has been provided.The input and output will have to be synchronized. This is best accomplished using an interrupt service routine (ISR). What AIC registers are used to input and output data? 6. Initialize the AIC for an 8 KHz sampling frequency, filter enabled, no frequency scaling, and synchronous operation. With the anti-aliasing filter enabled where is cutoff (Fc) likely to occur? 7. Using the signal generator apply a sinusoidal voltage of approximately 1 Vrms at the input jack of the DSK. Assemble and run the program while observing the output of the DSK on an oscilloscope. Vary the frequency of the signal and record any observations. Describe how they are consistent with your understanding of filters and aliasing. 8. Now disable the anti-aliasing filter,, run the program, and again record any observations. Again, how are they consistent with your understanding of filtering and aliasing? 9. Increase the sampling frequency to 16 KHz. Once again using a 1 Vrms sine wave repeat steps 7 and 8, recording any observations. 10. Now set the AIC to various sampling frequency values and scaling values to become more familiar with its initialization. Verify that the AIC is operating according to the parameters.