Hello,
I understand you are trying to use the “TMS320F280049c” launchpad to read the analog temperature sensor.
The “TMS320F280049C” microcontroller features three ADC modules: ADCa, ADCb, and ADCc. Each module includes 16 SOCs (Start of Conversion), which initiate the conversion of an analog signal from a specific pin. Additionally, each SOC allows independent control of both its trigger source and the channel it samples. (Here, "channel" refers to any available ADC pin on the microcontroller, such as ADCINA4.)
ADC can be triggered using ePWM, refer to the following steps to achieve the same:
1) Configure ePWM to generate triggers:
- Add the “ePWM” block and under the Event Trigger tab, set ADC Start of Conversion (SOC) Event = on Counter PRD (Period Match).
2) Configure ADC to use ePWM trigger:
- Add the “ADC” block and select ADC-A, ADC-B or ADC-C depending on where the sensor is connected. Choose the correct ADC channel.
- Set Start of Conversion (SOC) Trigger Source = ePWMx SOC Trigger.
You can then use a data display block such as “Scope” to view the data, and if required, apply a scaling formula to convert raw ADC values into a temperature reading based on the sensor’s characteristics.
Refer to the following documentation to know more about using ePWM with microcontrollers: