Mindstorms 3rd Party ROBOTC Drivers RobotC
[Home] [Download] [Submit a bug/suggestion] [ROBOTC Forums] [Blog] [Support this project]
Files | Defines | Functions | Variables

MAXIM MAX127 ADC
[Other]

Files

file  maxim-max127.h
 

MAXIM MAX127 ADC driver.


Defines

#define MAX127_I2C_ADDR   0x50

Functions

int MAX127readChan (tSensors link, byte i2caddress, byte adcchannel)

Variables

tByteArray MAX127_I2CRequest
tByteArray MAX127_I2CReply

Detailed Description

MAXIM MAX127 ADC


Define Documentation

#define MAX127_I2C_ADDR   0x50

MAX127 default I2C device address

Examples:
maxim-max127-test1.c.

Definition at line 39 of file maxim-max127.h.


Function Documentation

int MAX127readChan ( tSensors  link,
byte  i2caddress,
byte  adcchannel 
)

Returns the current analogue value as measured on the specified channel.

Parameters:
linkthe MAX127 port number
i2caddressthe I2C address the MAX127 is configured for. Use MAX127_I2C_ADDR for the default.
adcchannelthe ADC channel number (0-7)
Returns:
value of the ADC channel or -1 if an error occurred.
Examples:
maxim-max127-test1.c.

Definition at line 53 of file maxim-max127.h.


Variable Documentation

Array to hold I2C reply data

Definition at line 42 of file maxim-max127.h.

Array to hold I2C command data

Definition at line 41 of file maxim-max127.h.