AnsweredAssumed Answered

SPI for ADAS1000

Question asked by Hasan2015 on Oct 2, 2015
Latest reply on Dec 2, 2015 by Hasan2015

Hello Everyone!

 

I have some problem in writing SPI code in Arduino IDE .

I am trying to control few devices together at a time with Arduino Uno. Only with is kit IDE , I need to write code to "read" ECG of ADAS1000.


Could you kindly describe me SPI communication code for ADAS1000? I mean to read at least ECGCTL register data.I need to use J4 connector. It should also be operating at the same IOVDD levels (2.3 to 3.6v) ,but my arduino uno works at 5 volt. Is there any solution ?

 

1. ADAS1000 datasheet gives the SPI  configuration in page 50-52. For 2kHz setting there is frame or data packet rate. Dont you think, clock divider datamode ect for Arduino Uno should be added? How about serial braud rate

 

2. Besides CS pin, if you look in clock at figure 2 there is another pin called DRDY (data ready pin) . The logic is it should be always LOW when CS is HIGH. How to define this function in  code? Should we need interrupt for DRDY pin?

 

3. You can see there is 16 bit or 24 bit data format. According to 28 table the ECGTCL register adress is 0x01 and if you arrange this Enable mode from the bottom of the column  like 1000110...... (for example), it make sense. Now question is how to read and write this data? What should be ADAS 1000 read and write command for this register?

 

According to table 59, the bit address comes first. Have you use mask in code for that reason?

 

 

4. If you look in Arduino SPI example for temperature sensor application, they only use CS and DRDY pin. Do you think its similar?

 

5. Kindly give me some idea about read and write 1byte when each bit would low and high.

 

6. Are you consedering 4 byte for including MISO and  MOSI ?

 

Best Regards

Hasan

 

Outcomes