Datasheet
LTC2481
34
2481fc
APPLICATIONS INFORMATION
/*
LTC248X.h
Processor setup and
Lots of useful defi nes for confi guring the LTC2481 and LTC2485.
*/
#include <16F73.h> // Device
#use delay(clock=6000000) // 6MHz clock
//#fuses NOWDT,HS, PUT, NOPROTECT, NOBROWNOUT // Confi guration fuses
#rom 0x2007={0x3F3A} // Equivalent and more reliable fuse confi g.
#use I2C(master, sda=PIN_C5, scl=PIN_C3, SLOW)// Set up i2c port
#include “PCM73A.h” // Various defi nes
#include “lcd.c” // LCD driver functions
// Useful defi nes for the LTC2481 and LTC2485 - OR them together to make the
// 8 bit confi g word.
#defi ne READ 0x01 // bitwise OR with address for read or write
#defi ne WRITE 0x00
#defi ne LTC248XADDR 0b01001000 // The one and only LTC248X in this circuit,
// with both address lines fl oating.
// Select gain - 1 to 256 (also depends on speed setting)
#defi ne GAIN1 0b00000000 // G = 1 (SPD = 0), G = 1 (SPD = 1)
#defi ne GAIN2 0b00100000 // G = 4 (SPD = 0), G = 2 (SPD = 1)
#defi ne GAIN3 0b01000000 // G = 8 (SPD = 0), G = 4 (SPD = 1)
#defi ne GAIN4 0b01100000 // G = 16 (SPD = 0), G = 8 (SPD = 1)
#defi ne GAIN5 0b10000000 // G = 32 (SPD = 0), G = 16 (SPD = 1)
#defi ne GAIN6 0b10100000 // G = 64 (SPD = 0), G = 32 (SPD = 1)
#defi ne GAIN7 0b11000000 // G = 128 (SPD = 0), G = 64 (SPD = 1)
#defi ne GAIN8 0b11100000 // G = 256 (SPD = 0), G = 128 (SPD = 1)
// Select ADC source - differential input or PTAT circuit
#defi ne VIN 0b00000000
#defi ne PTAT 0b00001000
// Select rejection frequency - 50, 55, or 60Hz
#defi ne R50 0b00000010
#defi ne R55 0b00000000
#defi ne R60 0b00000100
// Speed settings is bit 7 in the 2nd byte
#defi ne SLOW 0b00000000 // slow output rate with autozero
#defi ne FAST 0b00000001 // fast output rate with no autozero