This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS1220 SPI communications

Other Parts Discussed in Thread: ADS1220, ADS1220EVM

Hello,

In the datasheet of the ADS1220 it is mentioned that to read data without interruption, it is necessary to keep DIN low while clocking out data.

To make it simple, the SPI master that I want to use can manage a read command in both ways :

first way :

CS

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

SCK

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

MOSI
(DIN)

1

1

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

MISO
(DOUT)

-

-

-

-

-

-

-

-

d
23

d
22

d
21

d
20

d
19

d
18

d
17

d
16

d
15

d
14

d
13

d
12

d
11

d
10

d
09

d
08

d
07

d
06

d
05

d
04

d
03

d
02

d
01

d
00

 

second way :

CS

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

SCK

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

MOSI
(DIN)

1

1

1

1

1

1

1

1

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

MISO
(DOUT)

-

-

-

-

-

-

-

-

d
23

d
22

d
21

d
20

d
19

d
18

d
17

d
16

d
15

d
14

d
13

d
12

d
11

d
10

d
09

d
08

d
07

d
06

d
05

d
04

d
03

d
02

d
01

d
00

 

As I did not succeed in attaching a file, I will transmit the corresponding timing diagrams in a separate e-mail.

How does the ADS1220 exactly behave when DIN is kept high ? Does the response of the ADS1220 on DOUT can meet the expected MISO signal in both cases ? For information, I already have added some glue logic to force DIN low from d23 to d00, otherwise MOSI returns high from d23.

Regards

Didier

 

 

 

 

  • Hi Didier,

    Welcome to the forum!  I'm not totally clear about what you are asking.  I will attempt to explain the operation.  You should always send SCLKs in blocks representing 8 bits (or as complete byte transfers).  The ADS1220 will read/write in full-duplex, so you want to be careful about sending inadvertent commands by accident.  One way to prevent this is by keeping DIN low when not specifically issuing a command.  Keeping DIN high should also work equally as well.

    Just for information 0xC0 that you show in example 1 is not a valid command.  It is always best not to send random data.

    Best regards,

    Bob B

  • Hi Bob,

    Thanks a lot for your answer. My understanding of the datasheet is much better now. To make things clearer, the SPI master that I have to use always send an parameter byte on MOSI when executing a read command, it is designed like that : this byte is always with the format 11nnnnnn, nnnnnn depending on the parameter of the read command. The master does not clock in MISO while clocking out data on MOSI but only after clocking out data on MOSI : I understand now that the problem for me is that the ADS1220 will send data when the master is clocking out the read command parameter, thus missing the MSB of the conversion result. I hoped that it was possible to delay the sending of the conversion result with a 0xFF command, avoiding the need of a "complex" protocol adapter. I think that the right solution is to convert the parameter byte to a RDATA command.  I will take time to design that and test  it with the ADS1220EVM.

    Best regards

    Didier