I have been trying to configure and use the AD7172-4 for about a week now and am not having much luck.
- Communicating with an PIC24 device - SPI signals look good. Viewed with a scope and edges look correct. Also reading registers back from the device appear correct.
- AVdd1 = 5V
- AVdd2 = 3.3V
- IOVdd = 3.3V
- PIC24 is at 3.3V
- Caps on supply lines as suggested by datasheet.
- Ref+ = 2.5V
- Ref- = (A)GND
- Tested input values 0.25V, 0.35V & 0.5V using millivolt source
I have tried two different setups.
- My own setup/configuration, from looking at the datasheet.
- One from register values specified by the AD7172-4 Eval+ software (used is simulation mode). In this, the physical input pint AIN5 is routed to analogue channel 3, which is set to use setup config1. The simulation seems to be correct.
I am using Single Conversion mode. After the conversion I am waiting a fixed amount of time before polling the status register to see if conversion is done. Please note that I am only doing this during testing, as I know waiting for a fixed time will not be practical in my final application.
On a side note, I was initially polling the MISO pin (with CS high) at the PIC end to see it go low to indicate a completed conversion, however, when I probed it with a scope, this line seemed to decay over a (longish) period of time, rather than just drop as I would have expected. Unfortunately, I did not record the decay time.
I am then looping through the 'Single Conversion - Wait - Poll - Read' sequence 1000 (now particular reason, also tried 1500) times, then instructing the PIC program to stop on a breakpoint.
Now what I am seeing is the last read value seems to vary dependant on the my wait duration. The longer the wait duration the higher the value read. Furthermore, the value seen actually seems independent of the actual voltage applied at the input. At 100ms delay, the read value appears to be around 0.5V regardless of the input voltage.
While I know it is virtually impossible for anyone to tell me what is wrong without actually seeing my configuration in detail, I would like to know if anyone has had a similar experience and seen similar effects? Or, if anyone could provide any suggestions.
I think I have mostly exhausted possible issues with the configuration of the device and now am considering it to be a hardware issue.
Thanking you in advance.