Page 1 of 1

SPI communication needed!

Posted: Sat Dec 19, 2015 8:11 pm
by 407charles
I'm having a problem communicating with the ADC 3208 IC. It's SPI protocol 12 Bit ADC. Here is my program and chip datasheet. I don't know what I'm doing wrong. I will appreciate any help or advice.

Re: SPI communication needed!

Posted: Mon Dec 21, 2015 2:01 pm
by Benj
Hello,

This blog post on SPI comms may help to get you started.

http://www.matrixtsl.com/blog/simplifie ... c-and-spi/

Re: SPI communication needed!

Posted: Tue Dec 22, 2015 7:12 pm
by 407charles
Hi Benj, thanks for your help. I did a temperature controller project and you help me with it before, but the SPI program was different. The program for the controller only included to read data from the MAX6675. For what I see on the SPI blog, the read write commands should be done separately, the chip command should be in LOW state and then the write or read command should be sent out and finish the read or write task with chip disable by energizing the CS pin. Is that right?
My problem is that I'm not understanding the timing graph on the datasheet. It says that write has to be done in the rising edge and after the sixth clock pulse the output data is delivered in a twelve bit format with the MSB first. Down in the data sheet in section 6, it shows how to work with eight bit groups to interface with different microcontrollers but the output data in delivered in the falling edge of the clock and I getting confuse with the right settings for the SPI component. Do I need to use two? one set it up for rising edge and another for the falling edge? another question is, I will be able to read the data at that particular timing? Please, give a hand if you can. I appreciate your time and help. Thanks a lot.

Re: SPI communication needed!

Posted: Wed Dec 23, 2015 1:12 am
by kersing

Re: SPI communication needed!

Posted: Wed Dec 23, 2015 1:32 pm
by 407charles
I got the program for the MAX6675 working. It was more simple than communicating with the ADC3208. In this case the writing command are needed to set the chip, also, the write data command needed being done at the rising edge and reading in the falling edge of the clock respectively. I tried different ideas but without results. I don't know if my SPI component settings are right. I going to keep trying but I'm running out of ideas. I appreciate your response and your help. Thanks a lot.

Re: SPI communication needed!

Posted: Sat Dec 26, 2015 6:30 pm
by 407charles
I tried several modifications in my program but not able to achieve anything. I guess I should try another ADC.