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

# a2d.c File Reference

## Detailed Description

Definition in file a2d.c.

`#include <avr/io.h>`
`#include <avr/interrupt.h>`
`#include "global.h"`
`#include "a2d.h"`

Go to the source code of this file.

## Functions
void | a2dInit (void)
void | a2dOff (void)
| Turn off A/D converter.
void | a2dSetPrescaler (unsigned char prescale)
void | a2dSetReference (unsigned char ref)
void | a2dSetChannel (unsigned char ch)
| sets the a2d input channel
void | a2dStartConvert (void)
| start a conversion on the current a2d input channel
u08 | a2dIsComplete (void)
| return TRUE if conversion is complete
unsigned short | a2dConvert10bit (unsigned char ch)
unsigned char | a2dConvert8bit (unsigned char ch)
| SIGNAL (SIG_ADC)
| Interrupt handler for ADC complete interrupt.
## Variables
volatile unsigned char | a2dCompleteFlag

## Variable Documentation

volatile unsigned char a2dCompleteFlag

| Software flag used to indicate when the a2d conversion is complete. Definition at line 28 of file a2d.c.