This repository contains examples of bare metal source code for Digital-to-Analog Converter (DAC) as described in the TB3210-Getting Started with Digital-to-Analog Converter (DAC) document from Microchip. The repository contains an Atmel Studio Solution with multiple projects inside:
- Generating Constant Analog Signal: This use case shows how to use the DAC to generate a constant analog signal on an output pin (for more details, see Generating Constant Analog Signal)
- Generating Sine Wave Signal: This use case shows how to use the DAC to generate a sine wave signal (for more details, see Generating Sine Wave Signal)
- Reading DAC Internally with ADC: This use case shows how to use the DAC to generate an output voltage internally (no pin involved). The ADC will read the value. The DAC voltage output will increment by one step every iteration (for more details, see Reading DAC Internally with ADC)
- Using DAC as Negative Input for AC: This use case describes how to use the DAC as negative input for the AC and trigger an LED when the positive input is higher than the DAC reference (for more details, see Using DAC as Negative Input for AC)
More details and code examples on ATtiny817 can be found at the following links:
- TB3210-Getting Started with Digital-to-Analog Converter (DAC)
- ATtiny817 Product Page
- ATtiny817 Code Examples on GitHub
- ATtiny817 Project Examples in START
- Microchip Studio 7.0.2542 or newer (https://www.microchip.com/mplab/microchip-studio)
- ATtiny_DFP 1.7.330 or newer Device Pack
- ATtiny817 Xplained Mini (attiny817-xmini)