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

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
/*** main() ********************************************************************
Main program initializes microcontroller registers, then reads the LTC2481
repeatedly
*******************************************************************************/
void main()
// This is a basic error detection scheme. The LTC2485 will never take more than
// 163.5ms, 149.9ms, or 136.5ms to complete a conversion in the 50Hz, 55Hz, and 60Hz
// rejection modes, respectively.
// If read_LTC2485() does not return non-zero within this time period, something
// is wrong, such as an incorrect i2c address or bus conflict.
{
signed int32 x, y;
float voltage;
int16 timeout;
initialize();
while(1)
} // End of main()
{
delay_ms(1);
if((x = read_LTC2485(LTC248XADDR, VIN | R50 | SLOW)) != 0)
else
if(timeout > 200)
} // End of main loop
{
// No timeout, everything is okay
timeout = 0;
x ^= 0x80000000;
voltage = (float) x;
voltage = voltage * 5.0 / 2147483648.0;// Multiply by Vref, divide by 2^31
lcd_putc(‘\f’);
lcd_gotoxy(1,1);
printf(lcd_putc, “%01.6f”, voltage); // Display voltage
}
{
++timeout;
}
{
timeout = 200;
lcd_gotoxy(1,1);
printf(lcd_putc, “ERROR - TIMEOUT”);
delay_ms(500);
}
U
U
// Variable for floating point math
// Hardware initialization
// Integer result from LTC2481
// Pace the main loop to something more than 1 ms
W
// Prevent rollover
U
// reset timer
// Invert MSB, result is 2’s complement
// convert to float
// Clear screen
// Goto home position
LTC2485
37
2485fa

Related parts for LTC2485