Getting Started with Digital-to-Analog Converter (DAC)

2021-10-28
The Digital-to-Analog Converter (DAC) converts a digital value written to the Data (DAC.DATA) register to an analog voltage. The output can be connected to a physical pin or used internally. The conversion range is between GND and the selected internal voltage reference (VREF), provided by the Voltage Reference (VREF) peripheral module.
This technical brief describes how the DAC works on tinyAVR® 1-series and AVR® DA microcontrollers (MCUs). It covers the following use cases:
● Generating Constant Analog Signal:
■ Illustrates how to initialize the DAC, set the voltage reference, set the DAC to output a specific constant voltage
● Generating Sine Wave Signal:
■ Initializes the DAC, sets the voltage reference, updates the DAC output inside the infinite loop to generate sine wave samples.
● Reading the DAC Internally with the ADC:
■ Shows how to initialize the DAC and ADC, set the voltage reference, configure the ADC to read the DAC output values. The DAC output voltage is incremented each step, and then it is read using the ADC.
● Using DAC as Negative Input for AC:
■ Initializes the DAC and AC, configures the AC to use the negative input provided by the DAC, configures the DAC output value. The AC will compare the voltage on its positive input pin with the DAC voltage, and set the output pin to high or low, according to the compare result.

Microchip

Digital-to-Analog ConverterDAC

More

More

Application note & Design Guide

More

More

Please see the document for details

More

More

English Chinese Chinese and English Japanese

03/2021

Revision B

TB3210;DS90003210B

2.7 MB

- The full preview is over. If you want to read the whole 27 page document,please Sign in/Register -
  • +1 Like
  • Add to Favorites

Recommend

All reproduced articles on this site are for the purpose of conveying more information and clearly indicate the source. If media or individuals who do not want to be reproduced can contact us, which will be deleted.

Contact Us

Email: