Lab 9: DSP/BIOS
Run the Code – AdcSwi()
15. We will be running our code in real-time mode, and need to have our window
continuously refresh. Enable Real-time Mode and be sure that the Global
Continuous Refresh option has been checked.
Note: For the next step, check to be sure that the jumper wire connecting “VREFLO”
(pin # P9-18) to “GND” (pin # P9-17) and the wire connecting PWM1 (pin # P8-9) to
ADCIN0 (pin # P9-2) are still in place on the eZdsp™.
16. Run the code in real-time mode watch the window update. Verify that the ADC result
buffer contains updated values.
17. Open and setup a dual time graph to plot a 50-point window of the filtered and unfiltered
ADC results buffer. Click: View Graph Time/Frequency… and set the
following values:
Display Type Dual Time
Start Address – upper display AdcBufFiltered
Start Address – lower display AdcBuf
Acquisition Buffer Size 50
Display Data Size 50
DSP Data Type 32-bit signed integer
Q-value 24
Sampling Rate (Hz) 50000
Time Display Unit
µs
Select OK to save the graph options.
18. The graphical display should show the generated IQmath FIR filtered 2 kHz, 25% duty
cycle symmetric PWM waveform in the upper display and the unfiltered waveform
generated in the previous lab exercise in the lower display. The results should be the
same as the previous lab, but we are using a SWI rather than a HWI.
19. Fully halt the DSP (real-time mode) by using Debug Halt and then unchecking the
“Real-time mode”.
Add a Periodic Function
Recall that an instruction was used in the ADCINT_ISR to toggle the LED on the eZdsp™. This
instruction will be moved into a periodic function that will toggle the LED at the same rate.
9 - 18 C28x - Using DSP/BIOS