megaAVR ADC example 1
Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.
#include "adc.h"
Macros | |
#define | ADC_INPUT ADC_MUX_ADC0 |
#define | ADC_VREF ADC_VREF_AVCC |
Functions | |
int | main (void) |
Main function. More... | |
#define ADC_INPUT ADC_MUX_ADC0 |
Referenced by main().
#define ADC_VREF ADC_VREF_AVCC |
Referenced by main().
int main | ( | void | ) |
Main function.
Main function.
This function initializes the MAC, initiates a MLME reset request (wpan_mlme_reset_req()), and implements a the main loop.
Main function.
The master example begins by initializing required board resources. The system clock, basic GPIO pin mapping, and interrupt vectors are established.
A memory location on a TWI slave is written with a fixed test pattern which is then read back into a separate buffer. As a basic sanity check, the original write-buffer values are compared with values read from the slave to a separate buffer. An LED on the development board is illuminated when there is a match between the written and read data.
Main function.
Main function.
Initializes the clock system, board and serial output, then sets up the Sleep Manager unit test suite and runs it.
Main function.
Initializes the clock system, board and serial output, then sets up the IOPORT Service unit test suite and runs it.
Main function.
Initializes the clock system, board and serial output, then sets up the USART unit test suite and runs it.
Main function.
Initializes the clock system, board and serial output, then sets up the TWI unit test suite and runs it.
Main function.
The SAM3X_EK, SAM3X Arduino board and SAM4C_EK use two bytes length internal address EEPROM.
TWI and QT600 interface initialization
References adc_init(), ADC_INPUT, ADC_PRESCALER_DIV128, adc_read_8bit(), and ADC_VREF.