I'm working on a wave energy project that requires digitzing the following sensors (all at 10 Hz, 50 samples/sec in aggregate):
-- Two type T thermocouples converting -20 to +100 Celsius, ADS1248's internal diode will be used as the "cold junction". Software will perform the cold junction compensation.
-- One three wire RTD, converting -20 to +100 Celsius
-- Two pressure sensors that produce 0 to 10 volts
The ARM microcontroller that I'm using is limited to 8 to 16 bit transfer on its SPI interface. Of course, given my slow sampling rate of 10 Hz it is possible to "bit bang" the SPI interface to get achieve 24 bit transfers or gain more control over the ADS1248 signal timing.
To read the five sensors listed above, I think the software must do something like the following:
1. Pulse -RESET to initialize the ADS1278
2. Assert START to start or continue conversions (Must START be asserted to access the configuration registers?)
3. Configure the ADS1248 using the Register Write and Register Read commands. (Can all of the registers in the ADS1248 be read as well as written?) -CS is asserted during the configuration to select the ADS1248.
4. Wait (for an interrupt) on the assertion (falling edge) of -DRDY
5. Issue 24 SPI clock pulses, result of previous conversion appears on DOUT, MSB first. Select the next channel to be converted, by writing the MUX0 register using the WREG command on DIN. Twenty four bits in and out on the DIN and DOUT.
Steps 4 and 5 are repeated as long as START is asserted.
If I want to achieve a 10 Hz sampling for 5 sensors, I should specify 80 Hz in DOR[3:0] of SYS0. Three unwanted sensor inputs can just be discarded. 80 Hz / 8 sensors should give me a 10 Hz sampling rate.
Here are some questions about the software interface:
Since my CPU can only transfer 8 or 16 bits on the SPI interface, can the ADS1248 tolerate a non continuous SPI clock? If I break a 24 bit transfer into three 8 bit transfers, the SPI clock will stop and -CS will negate between transfers but the duration will be short, probably less than 1 uS. One of the responses in the forum suggested that negation of -CS during a transfer doesn't bollux DOUT but resets DIN. Perhaps, I need to "bit bang" -CS so that I can actually perform step #5 above.
Page 55 of the ADS1248 data sheet claims that READC is the default behavior of the ADS1248. When would the READ, READC and SYNC commands be used?
Thanks for your help,
Wayne