Lab 6: Analog-to-Digital Converter
Run the Code
10. In
Main_6.c
place the cursor in the
“main loop”
section, right click on the
mouse key and select
Run To Cursor
.
11. 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
.
Note:
For the next set of steps “VREFLO”
must be connected to
“GND”. Using a connector
wire provided, connect “VREFLO” (pin # P9-18) to “GND” (pin # P9-17).
Exercise
care when connecting any wires, as the power to the eZdsp™ is on, and we do not
want to damage the eZdsp™!
Details of pin assignments can be found in Appendix A.
12. Using another connector wire provided, connect the ADCINA0 (pin # P9-2) to “GND”
(pin # P9-1) on the eZdsp™. Then run the code again, and halt it after a few seconds.
Verify that the ADC results buffer contains the expected value of 0x0000.
13. Adjust the connector wire to connect the ADCINA0 (pin # P9-2) to “+3.3V” (pin # P2-
45) on the eZdsp™. Then run the code again, and halt it after a few seconds. Verify that
the ADC results buffer contains the expected value of 0x0FFF.
14. Adjust the connector wire to connect the ADCINA0 (pin # P9-2) to IOPA1 (pin # P8-10)
on the eZdsp™. Then run the code again, and halt it after a few seconds. Examine the
contents of the ADC results buffer (the contents should be alternating 0x0000 and
0x0FFF values). Are the contents what you expected?
15. 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:
Start Address
AdcBuf
Acquisition Buffer Size
50
Display Data Size
50
DSP Data Type
16-bit unsigned integer
Sampling Rate (Hz)
50000
Time Display Unit
µ
s
Select
OK
to save the graph options.
16. Recall that the code toggled the IOPA1 pin alternately high and low. (Also, the ADC
ISR is toggling the LED DS2 on the eZdsp™ as a visual indication that the ISR is
running). If you had an oscilloscope available to display IOPA1, you would expect to see
a square-wave. Why does Code Composer Studio plot resemble a saw-tooth wave?
What is the signal processing term for what is happening here?
6 - 16
C28x - Analog-to-Digital Converter
Содержание C28 Series
Страница 64: ...Summary 3 16 C28x Peripheral Registers Header Files ...
Страница 78: ...Interrupt Sources 4 14 C28x Reset and Interrupts ...
Страница 218: ...Lab 9 DSP BIOS 9 22 C28x Using DSP BIOS ...
Страница 244: ...Lab 10 Programming the Flash 10 26 C28x System Design ...
Страница 273: ...Appendix A eZdsp F2812 C28x Appendix A eZdsp F2812 A 1 ...
Страница 275: ...Appendix eZdsp F2812 eZdsp F2812 Connector Header and Pin Diagram C28x Appendix A eZdsp F2812 A 3 ...
Страница 276: ...Appendix P2 Expansion Interface A 4 C28x Appendix A eZdsp F2812 ...
Страница 277: ...Appendix P4 P8 P7 I O Interface C28x Appendix A eZdsp F2812 A 5 ...
Страница 278: ...Appendix A 6 C28x Appendix A eZdsp F2812 ...
Страница 279: ...Appendix P5 P9 Analog Interface C28x Appendix A eZdsp F2812 A 7 ...
Страница 281: ...Appendix JP7 JP8 JP11 JP12 Boot Mode Select JP9 PLL Disable DS1 DS2 LEDs C28x Appendix A eZdsp F2812 A 9 ...
Страница 282: ...Appendix A 10 C28x Appendix A eZdsp F2812 TP1 TP2 Test Points ...