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

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
*******************************************************************************/
signed int32 read_LTC2485(char addr, char config)
// Start communication with LTC2485:
/*** initialize() **************************************************************
Basic hardware initialization of controller and LCD, send Hello message to LCD
*******************************************************************************/
void initialize(void)
36
{
struct fourbytes
union
return adc_code.bits32;
} // End of read_LTC2485()
{
// General initialization stuff.
setup_adc_ports(NO_ANALOGS);
setup_adc(ADC_OFF);
setup_counters(RTCC_INTERNAL,RTCC_DIV_1);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
lcd_init();
delay_ms(6);
printf(lcd_putc, “Hello!”);
delay_ms(500);
} // End of initialize()
{
int8 te0;
int8 te1;
int8 te2;
int8 te3;
};
{
signed int32 bits32;
struct fourbytes by;
} adc_code;
i2c_start();
if(i2c_write(addr | WRITE))// If no acknowledge, return zero
i2c_write(config);
i2c_start();
i2c_write(addr | READ);
adc_code.by.te3 = i2c_read();
adc_code.by.te2 = i2c_read();
adc_code.by.te1 = i2c_read();
adc_code.by.te0 = i2c_read();
i2c_stop();
{
i2c_stop();
return 0;
}
U
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.
W
// adc_code.bits32
// adc_code.by.te0
// adc_code.by.te1
// adc_code.by.te2
// adc_code.by.te3
// Initialize LCD
// Obligatory hello message
// for half a second
U
all 32 bits
byte 0
byte 1
byte 2
byte 3
2485fa

Related parts for LTC2485