Module 328.adc - ADC routines for the ATmega328

ADC routines for the ATmega328.

Index

Declarations

adc.module:31Constant VCC

VAL INT VCC

Symbolic constant for signaling the use the VCC voltage reference.

adc.module:33Constant INTERNAL

VAL INT INTERNAL

Symbolic constant for signaling the use the internal 1.1v reference.

adc.module:35Constant AREF

VAL INT AREF

Symbolic constant for signaling the use the external AREF reference.

adc.module:49Process adc.base

PROC adc.base (VAL INT avr.pin, VAL INT ref, RESULT INT v)

Perform an Analog-to-Digital Conversion on the given AVR pin, and writes out the result.

Parameters:

VAL INT avr.pin The AVR pin on which to perform the ADC.
VAL INT ref Which voltage reference to use as the comparison. Can be VCC, INTERNAL, or AREF.
RESULT INT v The INT that will be used to store the analog read.

adc.module:91Process adc.aref

INLINE PROC adc.aref (VAL INT avr.pin, RESULT INT v)

Helper function for performing an ADC using the AREF.

Parameters:

VAL INT avr.pin The AVR pin on which to perform the ADC.
RESULT INT v The INT that will be used to store the analog read.

adc.module:101Process adc.vcc

INLINE PROC adc.vcc (VAL INT avr.pin, RESULT INT v)

Helper function for performing an ADC using the VCC.

Parameters:

VAL INT avr.pin The AVR pin on which to perform the ADC.
RESULT INT v The INT that will be used to store the analog read.