AM263x MCU+ SDK  08.02.01
DAC Ramp Wave

Introduction

This example uses DAC to generate a ramp wave on the DAC output.

The example does the below

  • Configures Timer to generate interrupt at a rate of 20KHz.
  • Increments a variable alpha from 0 to 360 based on the output ramp wave frequency required.
  • Scales alpha to the range of DAC output in the DAC Shadow register within the ISR.
  • This repeated programming of the registers generates a ramp wave.

External Connections

  • DAC output pin can be connected to an oscilloscope to view the ramp wave output.

AM263X-CC

Note: To use the reference voltage generated on ControlCard, make sure that the System VREF source select switch SW8 on ControlCard is set to position 1-2

When using AM263x-CC with TMDSHSECDOCK (HSEC180 controlCARD Baseboard Docking Station)

  • Capture waveform on HSEC Pin 9

AM263X-LP

Note: To use the reference voltage generated on LaunchPad, make sure that the DAC_VREF source select switch S1 on LaunchPad is set to position 1-2

With AM263X-LP

  • Capture the waveform on boosterpack header J1/J3 Pin 30

Supported Combinations

Parameter Value
CPU + OS r5fss0-0 nortos
Toolchain ti-arm-clang
Board am263x-cc, am263x-lp
Example folder examples/drivers/dac/dac_ramp_wave/

Steps to Run the Example

  • When using CCS projects to build, import the CCS project for the required combination and build it using the CCS project menu (see Using SDK with CCS Projects).
  • When using makefiles to build, note the required combination and build using make command (see Using SDK with Makefiles)
  • Establish connections as mentioned in External Connections section
  • Launch a CCS debug session and run the executable, see CCS Launch, Load and Run
  • Use an Oscilloscope to view the ramp wave on DAC output pin.

See Also

DAC

Sample Output

Shown below is a sample output when the application is run,

DAC Ramp Wave Test Started ...
DAC Ramp Wave Test Passed!!
All tests have passed!!

Sample Output