EasyManuals Logo

Texas Instruments TMS320F2837 D Series Workshop Guide And Lab Manual

Texas Instruments TMS320F2837 D Series
324 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #144 background imageLoading...
Page #144 background image
Lab 6: Analog-to-Digital Converter
6 - 30 TMS320F2837xD Microcontroller Workshop - Analog Subsystem
Procedure
Open the Project
1. A project named Lab6 has been created for this lab exercise. Open the project by
clicking on Project Import CCS Projects. The “Import CCS Eclipse Projects”
window will open then click Browse… next to the “Select search-directory” box. Navigate
to: C:\C28x\Labs\Lab6\cpu01 and click OK. Then click Finish to import the project.
All build options have been configured the same as the previous lab exercise. The files
used in this lab exercise are:
Adc.c
Gpio.c
CodeStartBranch.asm
Lab_5_6_7.cmd
Dac.c
Main_6.c
DefaultIsr_6.c
PieCtrl.c
DelayUs.asm
PieVect.c
EPwm_6.c
Sinetable.c
F28x7xD_Adc.c
SysCtrl.c
F2837xD_GlobalVariableDefs.c
Watchdog.c
F2837xD_Headers_nonBIOS_cpu1.cmd
Xbar.c
Note: The Dac.c and SineTable.c files are used to generate a sine waveform in the
second part of this lab exercise.
Setup ADC Initialization and Enable Core/PIE Interrupts
2. In Main_6.c add code to call the InitAdca(), InitEPwm() and InitDacb()
functions. The InitEPwm() function is used to configure ePWM2 to trigger the ADC at
a 50 kHz rate. Details about the ePWM and control peripherals will be discussed in the
next module. The InitDacb() function will be used in the second part of this lab
exercise.
3. Edit Adc.c to configure SOC0 in the ADC as follows:
SOC0 converts input ADCINA0 in single-sample mode
SOC0 has a 20 SYSCLK cycle acquisition window
SOC0 is triggered by the ePWM2 SOCA
SOC0 triggers ADCINT1 on end-of-conversion
All SOCs run round-robin
Be sure to modify Adc.c and not F2837xD_Adc.c which is used for the ADC calibration.
4. Using the PIE Interrupt Assignment Table” find the location for the ADC interrupt
ADCA1and fill in the following information:
PIE group #: # within group:
This information will be used in the next step.
5. Modify the end of Adc.c to do the following:
- Enable the “ADCA1” interrupt in the PIE (Hint: use the PieCtrlRegs structure)
- Enable the appropriate core interrupt in the IER register
6. Open and inspect DefaultIsr_6.c. This file contains the ADC interrupt service
routine. Save your work.

Table of Contents

Other manuals for Texas Instruments TMS320F2837 D Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS320F2837 D Series and is the answer not in the manual?

Texas Instruments TMS320F2837 D Series Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS320F2837 D Series
CategoryMicrocontrollers
LanguageEnglish

Related product manuals