Quantcast
Channel: Data converters
Viewing all articles
Browse latest Browse all 27555

Forum Post: RE: ADS1248: SPI communication in continously conversion mode for RTD PT100 thermo measurement

$
0
0
Hello Bob, right now i am using the default register settings at startup which means i dont write into the registers. I just power up the ADS1248 and then send 24 SCKL'S to get the data. I also tried to set the registers by the following commands but it didnt change something: pin_LO(ChipSelect); SPI1_Write(0x06); //send Reset command to ADS1248 pin_HI(ChipSelect); pin_LO(ChipSelect); SPI1_Write(WREG); //Write to register SPI1_Write(IDAC0); //Adress MUX0 SPI1_Write(0xE); //Burn-out current source off /Pos Input: AIN0 (default)/Neg Input:AIN1 (default) pin_HI(ChipSelect); pin_HI(ChipSelect); SPI1_Write(WREG); //Write to register SPI1_Write(MUX0); //Adress MUX0 SPI1_Write(0x01); //Burn-out current source off /Pos Input: AIN0 (default)/Neg Input:AIN1 (default) pin_LO(ChipSelect); pin_LO(ChipSelect); SPI1_Write(WREG); //Write to register SPI1_Write(MUX1); //Adress MUX1 SPI1_Write(0x20); //Internal oscillator in use / Internal reference is always on / REFP0 and REFN0 reference inputs selected pin_HI(ChipSelect); pin_LO(ChipSelect); SPI1_Write(WREG); //Write to register SPI1_Write(SYS0); //Adress SYS0 SPI1_Write(0x20); //PGA = 4 / DR = 5 SPS pin_HI(ChipSelect); pin_LO(ChipSelect); SPI1_Write(WREG); //Write to register SPI1_Write(IDAC0); //Adress IDAC0 SPI1_Write(0x06); //IDAC0: 1mA pin_HI(ChipSelect); pin_LO(ChipSelect); SPI1_Write(WREG); //Write to register SPI1_Write(IDAC1); //Adress IDAC1 SPI1_Write(0x89); //IDAC1:IEXC1 IDAC2:IEXC2 pin_HI(ChipSelect); pin_HI(ChipSelect); SPI1_Write(WREG); //Write to register SPI1_Write(VBIAS); //Adress VBIAS SPI1_Write(0x00); //BIAS voltage disabled pin_LO(ChipSelect); pin_HI(ChipSelect); SPI1_Write(WREG); //Write to register SPI1_Write(OFC0); //Adress OFC0 SPI1_Write(0x00); //reset offset calibration pin_LO(ChipSelect); pin_HI(ChipSelect); SPI1_Write(WREG); //Write to register SPI1_Write(OFC1); //Adress OFC1 SPI1_Write(0x00); //reset offset calibration pin_LO(ChipSelect); pin_HI(ChipSelect); SPI1_Write(WREG); //Write to register SPI1_Write(OFC2); //Adress OFC2 SPI1_Write(0x00); //reset offset calibration pin_LO(ChipSelect); pin_HI(ChipSelect); SPI1_Write(WREG); //Write to register SPI1_Write(GPIOCFG);//Adress GPIOCFG SPI1_Write(0x00); //all used as analog inputs pin_LO(ChipSelect); pin_HI(ChipSelect); SPI1_Write(WREG); //Write to register SPI1_Write(GPIODIR); //Adress GPIODIR SPI1_Write(0x00); //all used as analog inputs pin_LO(ChipSelect); pin_HI(ChipSelect); SPI1_Write(WREG); //Write to register SPI1_Write(GPIODAT); //Adress GPIODAT SPI1_Write(0x00); //all used as analog inputs pin_LO(ChipSelect); Is it necessary to set the registers at startup because they have default values ? I attached the schematic i am using: (Please visit the site to view this file) I am recieving mostly values like 0xFFFFF and some other random values betwen. It is not a stable value and and changing in high orders. I calculated the maximum and minimum resistance of the PT100 resistors for 80C° and -20C°: A = 3.9083*10^-3; B = -5.775*10^-7; C = -4.183*10^-12; R0 = 100; %Calculation of the lower resistance RTD_1 = R0*(1+(A*T1)+(B*T1^2)+((C*T1^3)*(T1-100))); %Calculation of the higher resistance RTD_2 = R0*(1+(A*T2)+(B*T2^2)); R(-20C°) = 92.16 Ohm R(80C°) = 130.89 Ohm I am using a Reference resistor of 820 Ohms and the exitation current is 1mA. I am expecting a code : R/Rref : 100 ohms / 820 ohms : 0.1219... so expecting a code around 0x00000. Could it be that if i dont set up the registers correct that there is no exitation current by default and the measurement fails? Is there a way i could test if i can correct write into the register ? thanks for your help

Viewing all articles
Browse latest Browse all 27555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>