Generating Amplitude Modulated Signal Using 10-bit DAC

The DAC can be used to generate amplitude modulated signal. In this case, the DAC uses the voltage reference from the VREFA pin as modulation waveform (information signal), while it is configured to generate sine wave for the carrier signal.


Therefore, the amplitude of the carrier signal will vary according to the signal that needs to be modulated.

Important: The frequency of the carrier signal must be greater than that of the information signal in order for the resulting signal to be relevant.

Based on the carrier wave frequency (SIGNAL_FREQ), the core will use a fixed number of samples (N_SAMPLES) to build the signal as described in “Generating Sine Wave Signal Using 10-Bit DAC”. The resulting sample rate will be:


The resulting modulated signal will be available on the DAC output external pin (PD6).

In this example, a 50 Hz sine wave is used as the carrier signal and the modulated signal is a 2 Hz sine wave from a signal generator.

Figure 1. Resulting Signal Visualized on Oscilloscope

Tip: The full code example is also available in Appendix.