Hello all,I am pulling my hair out. I cannot get any communication from either of the 2 AD7731 ADCs I have.I am creating a new hardware rev of a water sanitation system.The OLD hardware was AD7731 and Atmel128.New hardware is AD7731 and PIC18f45k22.

I have ported the code from the atmel to the PIC. I am confident in the Code as I can talk to other SPI devices on the board just fine.

As for the AD7731 I cannot get any response from the IC at all. No !RDY pin low, no ability to read the registers, etc.!RDY stays high at all times.

1- What is the status of 'AD_CS'? It must be low to activate the chip.2- Check the port direction bits of PIC for SPI interface (RC3, RC4, RC5).3- Do you have the signal output of the working system? If yes, what's the difference?4- Do you have the code for the working system? Which compiler? Also which compiler do you use for PIC?

1- What is the status of 'AD_CS'? It must be low to activate the chip.2- Check the port direction bits of PIC for SPI interface (RC3, RC4, RC5).3- Do you have the signal output of the working system? If yes, what's the difference?4- Do you have the code for the working system? Which compiler? Also which compiler do you use for PIC?

1 - In the attached picture Chanel 0 (ENABLE) is the AD_CS pin. You can see it go LOW to enable the IC.2 - MikroC Pro automatically updates these when using the Hardware SPI routines. (I can also talk to other SPI devices on the board)3 - Ill hook up the Logic to the OLD system and take a look. That is something I did not do. Great Idea.4 - I do have the OLD source. Not sure how current. It was written in Imagecraft ICC5 I think. I am using MikroC Pro for the PIC.

I took the setup routines straight from the old source and compared them to the datasheet. They should work... But I have to be missing something.

I even rebuilt on a bread board, and did not hook the AD_RDY to the PIC and it still never goes LOW.

I do have the source. Written in ICCv5 or ICCv6 for the AVR. The code for the init of the AD7731 is very similar. (I have even tried the exact settings although we are not using all the same inputs).I am using MikroC Pro for the PIC.

The signal out on the working system (Old units) is different in that the AD7731 actually responds and takes readings then sets the Data Ready Pin LOW.

I captured the signals, adjusted my program to be identical and still nothing.

After some suggestions from Analog Devices Support, I created an arduino sketch that cycles through all 4 SPI modes and, resets (sends 32 1's) the AD7731 and sets to continuous conversion mode.According to them, this should reset the device and make the device enter normal conversion and start cycling the Data Ready pin at normal intervals.

Have you tried with the POL pin high instead of low (as it affect the mode of the SPI interface of the AD7731) ?

You could also try to pulse the RESET pin with your microcontroller instead of pulling it always high. Maybe the internal power-up reset circuit of the AD7731 is not working properly (this can happen with some circuits if the power voltage rises too slowly).

Have you tried with the POL pin high instead of low (as it affect the mode of the SPI interface of the AD7731) ?

You could also try to pulse the RESET pin with your microcontroller instead of pulling it always high. Maybe the internal power-up reset circuit of the AD7731 is not working properly (this can happen with some circuits if the power voltage rises too slowly).

Yes, I did try the POL pin high (With the same looping SPI mode code) Same result.I just added the RESET pin to the arduino code instead of sending 32 1's and same result.

I captured the signals, adjusted my program to be identical and still nothing.

In that case, you should try replacing the original chips with the chips you try to make work if possible and see if the new ones work too. Btw if you have experience with Basic, there is thread about the same chip here:http://www.picbasic.co.uk/forum/showthread.php?t=5020and the guy actually claims to make it work.

reading this, If your not getting any response, and your thinking you killed your chip.The same would be if the xtal was working, we had a problem where someone used the wrong xtal, and it took an age to find.

I see the chip has Mclk_in & Mclk_out what if you feed just the Mclk_in from a known working osc, this could be from a pic device.

reading this, If your not getting any response, and your thinking you killed your chip.The same would be if the xtal was working, we had a problem where someone used the wrong xtal, and it took an age to find.

I see the chip has Mclk_in & Mclk_out what if you feed just the Mclk_in from a known working osc, this could be from a pic device.

I was hopeful that this might finally be it, but after generating a 1Mhz clock on a pin to drive the MCLK IN pin there was no change.(I can see the clock on the Logic 8 @ 1Mhz)