AVR XMEGA Digital to Analog Converter Driver Example 1.
Copyright (c) 2010-2018 Microchip Technology Inc. and its subsidiaries.
#include <conf_example.h>
#include <asf.h>
Macros | |
#define | NR_OF_SAMPLES 32 |
Number of samples in sample buffer. More... | |
#define | RATE_OF_CONVERSION 22050 |
Rate at which DA conversions should be done. More... | |
Functions | |
int | main (void) |
Variables | |
static const uint16_t | sine [NR_OF_SAMPLES] |
Sample buffer with one period of a sine wave. More... | |
#define NR_OF_SAMPLES 32 |
Number of samples in sample buffer.
Referenced by main().
#define RATE_OF_CONVERSION 22050 |
Rate at which DA conversions should be done.
Referenced by main().
int main | ( | void | ) |
References board_init(), DAC_ADJ_LEFT, dac_enable(), dac_read_configuration(), DAC_REF_BANDGAP, dac_set_active_channel(), dac_set_channel_value(), dac_set_conversion_interval(), dac_set_conversion_parameters(), dac_set_conversion_trigger(), dac_wait_for_channel_ready(), dac_write_configuration(), NR_OF_SAMPLES, RATE_OF_CONVERSION, sine, sysclk_enable_module(), SYSCLK_EVSYS, sysclk_get_per_hz(), sysclk_init(), SYSCLK_PORT_C, SYSCLK_PORT_GEN, SYSCLK_TC0, and SYSCLK_TC4.
|
static |
Sample buffer with one period of a sine wave.
Referenced by main().