ATmega64M1 AVR UART, ADC and DAC  v2.0
UART, ADC and DAC libraries for the ATmega16M1, ATmega32M1 and ATmega64M1.
dac.h
Go to the documentation of this file.
1 
13 #ifndef DAC_H_
14 #define DAC_H_
15 
16 // ##### Includes #####
17 #include <avr/io.h>
18 #include <stdio.h>
19 
20 
21 // ##### Definitions #####
28 enum DAC_REF {
39  };
40 
41 
42 // ##### Functions #####
43 void dacReference(DAC_REF mode);
45 void dacInit(void);
46 void dacWrite(uint16_t value);
47 
48 
49 #endif /* DAC_H_ */
void dacWrite(uint16_t value)
Function write value to DAC.
Definition: dac.cpp:114
DAC_REF dacGetReference(void)
Function to read the current ADC/DAC voltage reference selection.
Definition: dac.cpp:65
Internal 2.56V reference voltage.
Definition: dac.h:38
Internal 2.56V reference voltage with external capacitor connected on the AREF pin.
Definition: dac.h:36
void dacInit(void)
Function to initialize DAC.
Definition: dac.cpp:100
DAC_REF
Enum class for possible DAC Vref Selection Bits.
Definition: dac.h:28
External Vref on AREF pin, Internal Vref is switched off.
Definition: dac.h:30
AVcc (no external capacitor connected on the AREF pin)
Definition: dac.h:34
void dacReference(DAC_REF mode)
Function to set the ADC/DAC voltage reference selection The configuration of the voltage reference se...
Definition: dac.cpp:22
AVcc with external capacitor connected on the AREF pin.
Definition: dac.h:32