Lab 7: Event Manager
Main_7.c
Labcfg.cmd
Lab.cdb
DSP281x_Headers_BIOS.cmd
User_5_6_7.cmd
CodeStartBranch.asm
SysCtrl.c
Gpio.c
DSP281x_GlobalVariableDefs.c
PieCtrl_5_6_7_8_9.c
DefaultIsr_5_6_7.c
Adc.c
Ev_7_8_9_10.c
Setup Shared I/O, General-Purpose Timer1 and Compare1
2. Edit
Gpio.c
and adjust the shared I/O pins in Group A for the PWM1 function.
3. In
Ev_7_8_9_10.c
, setup General-Purpose Timer 1 and Compare 1 to implement the
PWM waveform as described in the objective for this lab. The following registers need
to be modified: T1CON, T1CNT, T1PR, DBTCONA (set deadband units off), CMPR1,
ACTRA, COMCONA. (Hint – the last step should be to enable Timer 1). Make use of
the global variable names and values that have been set using #define in the beginning of
Ev_7_8_9_10.c
file. Notice that GPTCONA has been initialized earlier in the code
during Timer 2 setup. Save your work.
Build and Load
4. Save all changes to the files and click the
“Build”
button.
5. Reset the DSP.
Run the Code – PWM Waveform
6. Open a memory window to view some of the contents of the ADC results buffer. The
address label for the ADC results buffer is
AdcBuf
. 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 using the ADC, check to be sure that the jumper wire connecting
“VREFLO” (pin # P9-18) to “GND” (pin # P9-17) is still in place on the eZdsp™ from
the earlier lab.
7. Using another connector wire provided, connect the PWM1 (pin # P8-9) to ADCIN0 (pin
# P9-2) on the eZdsp™.
8. Run the code in real-time mode and watch the window update. Verify that the ADC
result buffer contains the updated values.
9. Open and setup a graph to plot a 50-point window of the ADC results buffer.
Click:
View Graph Time/Frequency…
and set the following values:
C28x - Event Manager
7 - 37
Summary of Contents for C28 Series
Page 64: ...Summary 3 16 C28x Peripheral Registers Header Files ...
Page 78: ...Interrupt Sources 4 14 C28x Reset and Interrupts ...
Page 218: ...Lab 9 DSP BIOS 9 22 C28x Using DSP BIOS ...
Page 244: ...Lab 10 Programming the Flash 10 26 C28x System Design ...
Page 273: ...Appendix A eZdsp F2812 C28x Appendix A eZdsp F2812 A 1 ...
Page 276: ...Appendix P2 Expansion Interface A 4 C28x Appendix A eZdsp F2812 ...
Page 277: ...Appendix P4 P8 P7 I O Interface C28x Appendix A eZdsp F2812 A 5 ...
Page 278: ...Appendix A 6 C28x Appendix A eZdsp F2812 ...
Page 279: ...Appendix P5 P9 Analog Interface C28x Appendix A eZdsp F2812 A 7 ...
Page 282: ...Appendix A 10 C28x Appendix A eZdsp F2812 TP1 TP2 Test Points ...