analog.h File Reference

Contains functions and definitions for using the ADC. More...

Go to the source code of this file.

Defines

#define AN0   0x00
 Analog port 0.
#define AN1   0x01
 Analog port 1.
#define AN2   0x02
 Analog port 2.
#define AN3   0x03
 Analog port 3.
#define AN4   0x04
 Analog port 4.
#define AN5   0x05
 Analog port 5.
#define AN6   0x06
 Analog port 6.
#define AN7   0x07
 Analog port 7.
#define AN8   0x08
 Analog port 8.
#define AN9   0x09
 Analog port 9.
#define AN10   0x0a
 Analog port 10.
#define AN11   0x0b
 Analog port 11.
#define AN12   0x0c
 Analog port 12.
#define AN13   0x0d
 Analog port 13.
#define AN14   0x0e
 Analog port 14.
#define AN15   0x0f
 Analog port 15.
#define EXT_MUX   AN7
 EXT_MUX analog port.
#define WHEEL_PORT   AN10
 Analog port for the wheel.
#define BATT_PORT   AN11
 Analog port for the battery voltage detector.

Functions

void analog_init (void)
 Initialize analog ports.
unsigned int analog8 (int which)
 Read an 8-bit number from an analog port.
unsigned int analog10 (int which)
 Read a 10-bit number from an analog port.
int wheel (void)
 Read the position of the wheel.


Detailed Description

Contains functions and definitions for using the ADC.

Contains definitions and function prototypes for using the ADC to detect analog signals on pins AN0 - AN7. AN6 and AN7 are used for the wheel and battery.

The pins labeled E6 and E7 are external interrupt pins and are not related to analog.

Author:
Colony Project, CMU Robotics Club, based on firefly code by Tom Lauwers

Generated on Fri Sep 14 15:36:17 2007 for libdragonfly by  doxygen 1.4.6