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

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

$
0
0
Hi user5922913, A couple of things regarding the code. First, you must delay before communicating to the ADS1248 after a RESET command is issued. See Figure 80 on page 46 of the datasheet. This command is not necessary as the device will be reset when all power supplies are at the nominal operating voltages. If you do wish to use the RESET command, make sure you wait before attempting any further communication. The WREG and RREG commands are a little different than what you are showing in your code snippet. As an example I will discuss the WREG operation, but RREG is similar. There are 2 command bytes. The first command byte starts with the 0100 and the lower nibble is the register address you wish to start writing to. The second command byte is the number of registers to be written minus 1. This allows for block writes (or reads with the RREG command). So if you want to write just one register the second command byte would be 0x00 (1 register to write minus 1). 2 registers would be 0x01, and so on. The bytes following the 2 command bytes are the data. You would need to provide the correct amount of data bytes for the number of registers to be written. As one example, your set of commands would change from: 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); to: pin_LO(ChipSelect); SPI1_Write(WREG|IDAC0); //Write to register SPI1_Write(0x00); //Adress MUX0 SPI1_Write(0xE); //Burn-out current source off /Pos Input: AIN0 (default)/Neg Input:AIN1 (default) pin_HI(ChipSelect); As to using the default settings, you cannot get meaningful data without configuring the registers. This would include turning on the internal reference (used for establishing the IDAC sources), setting the IDAC magnitude, routing the IDAC sources and choosing the reference for the RTD to be measured. Of course you would also need to select the inputs being measured. I see you don't have any filters on your reference inputs, and you only have very large values of capacitance on your RTD inputs. I would highly recommend reviewing the following information: RTD Ratiometric Measurements and Filtering Using the ADS1148 and ADS1248 : http://www.ti.com/lit/an/sbaa201/sbaa201.pdf and A Basic Guide to RTD Measurements: http://www.ti.com/lit/an/sbaa275/sbaa275.pdf Best regards, Bob B

Viewing all articles
Browse latest Browse all 27814

Trending Articles



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