ADS1248 24bit ADC Read/write Registers vis SPI.transfer

Status
Not open for further replies.

Flydroid

Member
Hi guys,

I've read here a lot already and probably learned even more! Great source of information.

Now, I have been writing simple library using the standard SPI lib to communicate with a TI ADS1248 24bit ADC.
The goal is to readout several thermocouples and PT100 and the Teensy 3.1 running at 96Mhz.

Here is my code so far: https://github.com/Flydroid/ADS1248-Library/
It does include an .ino which I have been using for testing.

In order to configure the ADS1248 correctly for my purpose i need to write some registers.
My test sketch just writes to 0x40 the value 0x07. To see if it was stored correctly i wanted to read the register.
This is what fails. I get 0x00 as a return instead of 0x07.

Using an ikaLogic analyzer i could see whats happening on the SPI bus.
Writing Registers:
Screenshot 2014-10-22 18.46.01.jpg
Reading Registers:
Screenshot 2014-10-22 18.58.22.jpg
As seen in the picture, where i should get values in the registers when i send 0xFF = NOP, but there is nothing on the output.

I know that the output works because if I issue RDATA, read data ones, I get values returned.

One thing i find intriguing is that if i do SPI.setClockDivider(SPI_CLOCK_DIV4); during Setup, which should put the SPI clock 3.275Mhz according to this thread (The ADS1248 says 4Mhz clock but this should be fine), nothing happes. the logic analyzer doesn't trigger and i get no serial output at all.
 
Status
Not open for further replies.
Back
Top