Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages | Examples

XgAvrADC


Defines

#define ADC_PRESCALE_DIV2
 0x01,0x00 -> CPU clk/2

#define ADC_PRESCALE_DIV4
 0x02 -> CPU clk/4

#define ADC_PRESCALE_DIV8
 0x03 -> CPU clk/8

#define ADC_PRESCALE_DIV16
 0x04 -> CPU clk/16

#define ADC_PRESCALE_DIV32
 0x05 -> CPU clk/32

#define ADC_PRESCALE_DIV64
 0x06 -> CPU clk/64

#define ADC_PRESCALE_DIV128
 0x07 -> CPU clk/128


Typedefs

typedef enum adc_ref_type adc_ref_t
typedef enum adc_mode_type adc_mode_t
typedef enum adc_channel_type adc_channel_t

Enumerations

enum  adc_ref_type { AVCC, AREF, INTERNAL_256 }
enum  adc_mode_type { FREE_RUNNING, SINGLE_CONVERSION }
enum  adc_channel_type {
  ADC0, ADC1, ADC2, ADC3,
  ADC4, ADC5, ADC6, ADC7
}

Functions

void ADCInit (void)
void ADCSetRef (adc_ref_t reference)
void ADCSetMode (adc_mode_t mode)
u_char ADCSetPrescale (u_char prescalar)
void ADCSetChannel (adc_channel_t adc_channel)
void ADCBufferFlush (void)
void ADCStartConversion (void)
void ADCStopConversion (void)
u_char ADCRead (u_short *value)
adc_mode_t ADCGetMode (void)


© 2000-2003 by egnite Software GmbH - visit http://www.ethernut.de/