LTC2485 LINER [Linear Technology], LTC2485 Datasheet - Page 35

no-image

LTC2485

Manufacturer Part Number
LTC2485
Description
24-Bit ?? ADC with Easy Drive Input Current Cancellation and I2C Interface
Manufacturer
LINER [Linear Technology]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
LTC2485CDD
Manufacturer:
LT
Quantity:
10 000
Part Number:
LTC2485CDD#TRPBF
Manufacturer:
ATMEL
Quantity:
1 430
Part Number:
LTC2485IDD
Manufacturer:
LT
Quantity:
10 000
Part Number:
LTC2485IDD#PBF
Manufacturer:
Linear Technology
Quantity:
1 912
Part Number:
LTC2485IDD#PBF
Manufacturer:
LT
Quantity:
709
Part Number:
LTC2485IDD#TRPBF
Manufacturer:
LINEAR/凌特
Quantity:
20 000
APPLICATIO S I FOR ATIO
/*
LTC2485.c
Basic voltmeter test program for LTC2485
Reads LTC2485, converts result to volts,
and prints voltage to a 2 line by 16 character LCD display.
Mark Thoren
Linear Technonlgy Corporation
June 23, 2005
Written for CCS PCM compiler, Version 3.182
*/
#include “LTC248X.h”
/*** read_LTC2485() ************************************************************
This is the funciton that actually does all the work of talking to the LTC2485.
Arguments:
Returns:
the i2c_xxxx() functions do the following:
void i2c_start(void): generate an i2c start or repeat start condition
void i2c_stop(void): generate an i2c stop condition
char i2c_read(boolean): return 8 bit i2c data while generating an ack or nack
boolean i2c_write(): send 8 bit i2c data and return ack or nack from slave device
These functions are very compiler specific, and can use either a hardware i2c
port or software emulation of an i2c port. This example uses software emulation.
A good starting point when porting to other processors is to write your own
i2c functions. Note that each processor has its own way of configuring
the i2c port, and different compilers may or may not have built-in functions
for the i2c port.
When in doubt, you can always write a “bit bang” function for troubleshooting
purposes.
The “fourbytes” structure allows byte access to the 32 bit return value:
struct fourbytes
{
int8 te0;
int8 te1;
int8 te2;
int8 te3;
};
addr - device address
config - configuration bits for next conversion
zero if conversion is in progress,
32 bit signed integer LTC2485 output word.
U
// Define structure of four consecutive bytes
// To allow byte access to a 32 bit int or float.
//
// The make32() function in this compiler will
// also work, but a union of 4 bytes and a 32 bit int
// is probably more portable.
U
W
U
LTC2485
35
2485fa

Related parts for LTC2485