Hi All,
I am trying to use an AD7705 with an raspberry pi pico w. Setting the initial registers (clock, setup, calibration) works as expected. After reasing the dataregister a view times (not always the same) the register returns 8192 (using a gain of 4) and nothing else. This seems to have happened to a view people before but no solutions are published. Is this a common problem? I am using a standaed ad7705 breakout board and have tried serval to rule out a faulty unit.
i'm not sure
what aditional info i can give. I can post (badly writte) prototyping code, logic analyser (dsview) captures or screenshots from my oscilloscope if needed.
edit:
As requested i added some additional info.Since i can only add pictures here i created a shared folder on my google drive with the original capture files.
The link to this folder is: https://drive.google.com/drive/folders/1jaEWu0dabaq3lW5rF8DuDZUr_ZPMs_0I?usp=share_link Please note that in the logic analyser files channel 4 is the status of the DRDY pin.
Below is a screenshot from my osciloscope, it was hard to capture so i hope it is helpful. If other measurements are needed feel free to educate me :-)
Below are two screenshots from my logic analyser when sending a command 0x38 to receive the data register and the result from the ADC. Notice that in the first screenshot that a valid value is sent by the ADC followed by the rising of the DRDY pin. In the second screenshot the ¨frozen"value is returned and the DRDYpin does not go high.
channel 0 is CS
channel 1 is MOSI
channel 2 is SCLK
channel 3 is MISO
channel 4 is DRDY
Many thanks for helping me with this, i hope i just overlook something simple.
edit 2:
I managed to capture my clock, and i think this might be considdered bad ringing although there is a distinct signal there.
Edit 3: as promisses a photo of my project. The red area outlines the mcu, the area outlined in blue is the adc used in above testing. The device in purple was added tonight, it is a logic level switcher which did most definitly not help my signal. But since it is not part of the original setup it can be considdered to be not there.
The white wires are the spi lines to the adc.
edit 3:
So i changed the code to readback the clock and setup register every time i try to read the data register. Something funny is happening.
Below you´ĺl find the output. the red lines show the last time everythoing reads correct. The blue lines show that also reading the clock and setup register is failing when the data register returns the frozen values. I will also capture this with my oscilloscope and post some pictures later.
Also, something strange started to happen, when i had an oscilloscope probe attached to the CS-pin the freezing would occur less...
starting...
ADC succesfully reset
ADC interface succesfully reset
{'result': 0, 'error': '', 'command': '00100000', 'function': 'ADCnextop'}
{'result': 0, 'error': '', 'command': '00001110', 'function': 'ADCclock'}
{'result': 0, 'error': '', 'command': '00010000', 'function': 'ADCnextop'}
ADC setup
{'result': 0, 'error': '', 'command': '01010000', 'function': 'ADCsetup'}
00010000
{'result': 0, 'error': '', 'command': '00011000', 'function': 'ADCnextop'}
{'result': '01010000', 'error': '', 'command': 'read', 'function': 'ADCsetup'}
00010000
{'result': 0, 'error': '', 'command': '00011000', 'function': 'ADCnextop'}
{'result': '00010000', 'error': '', 'command': 'read', 'function': 'ADCsetup'}
Calibration completed.
{'result': '00010000', 'error': '', 'command': 'read', 'function': 'ADCsetup'}
ADC interface succesfully reset
press single
{'result': 0, 'error': '', 'command': '00101000', 'function': 'ADCnextop'}
CLOCK REGISTER : 00001110
{'result': 0, 'error': '', 'command': '00011000', 'function': 'ADCnextop'}
SETUP REGISTER : 00010000
DATA REGISTER : 01111111 11110011
{'result': 0, 'error': '', 'command': '00101000', 'function': 'ADCnextop'}
CLOCK REGISTER : 00001110
{'result': 0, 'error': '', 'command': '00011000', 'function': 'ADCnextop'}
SETUP REGISTER : 00010000
DATA REGISTER : 01111111 11110101
{'result': 0, 'error': '', 'command': '00101000', 'function': 'ADCnextop'}
CLOCK REGISTER : 00000000
{'result': 0, 'error': '', 'command': '00011000', 'function': 'ADCnextop'}
SETUP REGISTER : 00011000
DATA REGISTER : 00000000 00000000
{'result': 0, 'error': '', 'command': '00101000', 'function': 'ADCnextop'}
CLOCK REGISTER : 00000000
added code output including readback of registers
[edited by: h3ndr1k at 1:19 PM (GMT -5) on 20 Jan 2023]