ADS1256 analog to digital converter

I'm having a real heck of a time with this chip, the TI ADS1256 A to D converter. Has anyone else here programmed this device before with a uC . I am using an atmel atmega 162 . All of my outputs look alive and well, and the ADC sends back semi random data when I attempt to just read a configuration register. If anyone here has example code (pseudo code, assembler, c, any processor) I would be relieved to just see some example of the proper sequence or timing. I've been through the data sheet several times and have cut back from a complete configuration and data acquisition to a very simple "what's in this register" and still don't have it working. TI doesn't have any examples of coding on their website as far as I can tell. I'm truly at a loss here, as the signals all look fairly clean (SPI signals), as far as I can tell I'm sending the right sequences and still I just get random gibberish from the chip. Thanks!

Reply to
fenriswolfnews
Loading thread data ...

I'm having a real heck of a time with this chip, the TI ADS1256 A to D converter. Has anyone else here programmed this device before with a uC . I am using an atmel atmega 162 . All of my outputs look alive and well, and the ADC sends back semi random data when I attempt to just read a configuration register. If anyone here has example code (pseudo code, assembler, c, any processor) I would be relieved to just see some example of the proper sequence or timing. I've been through the data sheet several times and have cut back from a complete configuration and data acquisition to a very simple "what's in this register" and still don't have it working. TI doesn't have any examples of coding on their website as far as I can tell. I'm truly at a loss here, as the signals all look fairly clean (SPI signals), as far as I can tell I'm sending the right sequences and still I just get random gibberish from the chip. Thanks!

Reply to
fenriswolfnews

The signals look fairly clean ? They have to be identical to the datasheet. With matching timing.

Some ADC requires some idle time after a reset. But this will also be mentioned in the datsheet.

Meaning you will have to actually measure your SPI signals and compare each detail with the datasheet. Not just the timings, but also the written details

Rene

--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com
& commercial newsgroups - http://www.talkto.net
Reply to
Rene Tschaggelar

what kind of SPI signals, there are 4 or 8 different definitions of SPI, regarding on which clock edge data should be valid etc. Even the same manufacturer (i.e. TI) uses different SPI definitions for different devices !!

Stef Mientki

as far as I can tell I'm sending

Reply to
Stef Mientki

TI just specifies the timing and voltages. They don't specify a "type" of SPI. I am meeting all the timing diagrams and specs in the document as far as I can tell. I'm doing the proper significant digit order as well. I really could benefit from sample code if anyone has any. I'm doing things in the proper order as well as I can discern from the ADS1256 manual. However, the manual doesn't contain a single example of a proper end to end timing diagram or configuration sequence or data reads like the other ADC's I've used on this project. I've done SPI interfaces with no problem before. I think this problem lies more in configuration sequence or my misunderstanding of the proper sequence of events to get the chip up and going.

Stef Mientki wrote:

Reply to
fenriswolfnews

I just tried to connect the ADS1255 to a PIC, and indeed me too had troubles. Problem was caused by parameter t6, which I've never seen so bad in any other SPI device ;-)

In case it might help, below is my test code for a PIC, written in JAL.

succes, Stef Mientki

-- initialization of the SPI port

-- ADS1255 / ADS1256 @ 7.68 MHz

-- SPI clock t1-max = 4tclock = 2 MHz const SPI_clock = target_clock / 16 -- 20Mc/16 = 1_250_000 const SPI_device_has_DIO = false -- if device has combined data-IO !!

-- from figure 1 at page 6 const SPI_clock_idle = low

-- Din is defined at the falling clock edge,

-- setup time t4-minimal = 50 nsec

-- hold time t5-minimal = 50 nsec const SPI_master_out_active_edge = falling_edge

-- Dout is changed on rising edge, so sampling should be on falling edge

-- propagation delay t7-max = 50 nsec

-- hold time t8-min = 0 nsec const SPI_master_in_active_edge = falling_edge

-----------------------------------------------------------------------------

-- Read IO

----------------------------------------------------------------------------- function ADC24_IO return byte is var byte data spi_send_mssp(_ADS1256_cmd_read_regs | _ADS1256_regs_io) spi_send_mssp( 0 ) delay_10us( _ADS1256_T6_10usec )

Reply to
Stef Mientki

Another phenomena, I couldn't find in the datasheets: when an (auto-?) calibration is done, you've to wait till RDY becomes low, before issuing any other command, otherwise it will not be recognized.

This also implies that when auto-calibrate is turned on, all commands like gain setting, frequency change, buffer etc, which will cause an automatic selfcalibrate, you too have to wait !!

Stef Mientki

Reply to
Stef Mientki

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.