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

ads7828.h File Reference

Detailed Description

Definition in file ads7828.h.

#include "global.h"

Go to the source code of this file.


#define ADS7828_I2C_ADDR   0x90
 Base I2C address of ADS7828 devices.
#define ADS7828_CMD_PD0   0x04
 ADS7828 Power-down bit 0.
#define ADS7828_CMD_PD1   0x08
 ADS7828 Power-down bit 1.
#define ADS7828_CMD_C0   0x10
 ADS7828 Channel Select bit 0.
#define ADS7828_CMD_C1   0x20
 ADS7828 Channel Select bit 1.
#define ADS7828_CMD_C2   0x40
 ADS7828 Channel Select bit 2.
#define ADS7828_CMD_SD   0x80
 ADS7828 Single-ended/Differential Select bit.
#define ADS7828_CMD_CH0   0x00
 ADS7828 Convert Channel 0.
#define ADS7828_CMD_CH1   0x04
 ADS7828 Convert Channel 1.
#define ADS7828_CMD_CH2   0x01
 ADS7828 Convert Channel 2.
#define ADS7828_CMD_CH3   0x05
 ADS7828 Convert Channel 3.
#define ADS7828_CMD_CH4   0x02
 ADS7828 Convert Channel 4.
#define ADS7828_CMD_CH5   0x06
 ADS7828 Convert Channel 5.
#define ADS7828_CMD_CH6   0x03
 ADS7828 Convert Channel 6.
#define ADS7828_CMD_CH7   0x07
 ADS7828 Convert Channel 7.
#define ADS7828_CMD_PDMODE0   0x00
 ADS7828 Power-down Mode 0.
#define ADS7828_CMD_PDMODE1   0x04
 ADS7828 Power-down Mode 1.
#define ADS7828_CMD_PDMODE2   0x08
 ADS7828 Power-down Mode 2.
#define ADS7828_CMD_PDMODE3   0x0C
 ADS7828 Power-down Mode 3.


u08 ads7828Init (u08 i2cAddr)
void ads7828SetReference (u08 ref)
u16 ads7828Convert (u08 i2cAddr, u08 channel)
 Begin single-ended conversion on given logical channel#, and return result.
u16 ads7828ConvertDiff (u08 i2cAddr, u08 channel)
 Begin differential conversion on given channel pair, and return result.
u16 ads7828ConvertRaw (u08 i2cAddr, u08 channel)
 Begin conversion on given raw channel#, and return result.

Generated on Sun Oct 29 03:41:08 2006 for Procyon AVRlib by  doxygen 1.4.2