AD1939
Production
The AD1939 is a high performance, single-chip codec that provides four analog-to-digital converters (ADCs) with differential input, and eight digital-to...
Datasheet
AD1939 on Analog.com
AD1938
Production
The AD1938 is a high performance, single-chip codec that provides four analog-to-digital converters (ADCs) with input and eight digital-to-analog converters...
Datasheet
AD1938 on Analog.com
I've just built my first circuit/PCB with an AD1939 codec. Powered up and have checked for shorts in the circuit etc... Connected my USBi device (from an eval' board) and setup a quick SigmaStudio program with the AD193x device. Whenever I try to write to device or read the settings from the chip I get "Compiled, Comms Failed". Where should I start fault finding this so I can configure my AD1939? Any ideas greatly received!
Kind regards,
Mark
Image of my board (excuse the over bright LED's... whoops!):
Hello MDThommo81,
The AD1939 only has an SPI control port for writing and reading back of the internal control registers, Since the USBi's I2C LED in your picture was flickering, which leads us to believe that you are using I2C in the hardware setup window in Sigma Studio. Please make sure that it is set for SPI like below.
Note that I chose SPI 0x2 ADR0, because I was using one of the extra latches. The USBi pin uses latch 1 which is SPI 0x1 ADR0. please select that.
If you change that to correct latch, then read/write like this to see whether communication was established: simply right-click the AD193X block, choose READ/WRITE window, modify the address, write any register value and then read it back. You can verify if you are reading the written data correctly.
we would also need to look at your hardware schematic, what is the state of the reset pin?
If you have a scope, just probe signals coming out of the USBi and see if it makes sense or just see 'is there a signal coming out in the first place.
Also please go thru this PCB layout best practices manual.
PCB Layout Best Practices for AD193x codecs - Q&A - Audio - EngineerZone (analog.com)
Regards,
Harish
Hello MDThommo81,
The AD1939 only has an SPI control port for writing and reading back of the internal control registers, Since the USBi's I2C LED in your picture was flickering, which leads us to believe that you are using I2C in the hardware setup window in Sigma Studio. Please make sure that it is set for SPI like below.
Note that I chose SPI 0x2 ADR0, because I was using one of the extra latches. The USBi pin uses latch 1 which is SPI 0x1 ADR0. please select that.
If you change that to correct latch, then read/write like this to see whether communication was established: simply right-click the AD193X block, choose READ/WRITE window, modify the address, write any register value and then read it back. You can verify if you are reading the written data correctly.
we would also need to look at your hardware schematic, what is the state of the reset pin?
If you have a scope, just probe signals coming out of the USBi and see if it makes sense or just see 'is there a signal coming out in the first place.
Also please go thru this PCB layout best practices manual.
PCB Layout Best Practices for AD193x codecs - Q&A - Audio - EngineerZone (analog.com)
Regards,
Harish
Hi Harish, thank you for your reply.
I agree that it should be SPI, and no idea why USBi is illuminating the I2C LED. Here is my SigmaStudio project setup:
Then when I load the Read/Write window as you suggested here is the result:
Any further thoughts or suggestions?
Many thanks,
Mark
sorry, forgot to include my circuit schematic. see attached. Thanks!
Hello Mark,
Since the USBi block in your schematic is red in color, I believe your PC driver is not loaded correctly. once The USBi is connected properly to your PC then the USBi block will turn green, as shown in the image below.
The USB cable may be the issue. Retry after changing the cable. Try these actions listed below if you continue to have this issue.
1. Un-install any version of Sigma Studio that was previously installed
2. Re-start your PC
3. Install sigma studio V4.7
4. Again, restart your pc
I hope this works.
Regards,
Harish
Hello MDThommo81,
Follow the suggestions that Harish has been giving you. He is providing great help. I just want to comment on one thing I noticed in your schematic. You are direct coupling the DAC outputs to an amplifier. You are taking the CM voltage from the codec and going to an OpAmp to drive the output amplifier reference which is all great to do. The issue is you have the OpAmp setup as a non-inverting amplifier so the output will be 1+Rfb/Rin. So the 1,5V CM will and up being 3V and you actually labeled the test point as 3V. This will skew the CM voltage on the output of the DACs and cause distortion and headroom issues and in fact there may not be much output at all or only half the waveform. You need to remove R163 and change R162 to be a 0-ohm jumper and that will leave you with a voltage follower configuration which is perfect to use for this application.
Dave T
Brilliant, thanks Harish. I'm away for work right now but will try again tomorrow when I'm back at the home office.
Great observation, Dave. A little frustrating from my end because I just followed advice from the OpAmp supplier and really should have double checked. I'll make the mods once I get the board up and running, hopefully tomorrow. I'll keep you posted. Thanks again.
Harish. Thank you so much. I didn't need to change the USB cable in the end, but reinstalling v4.7 seems to have helped. Attached is screenshot after setting up a SigmaStudio project with the Codec and using "Get Current Settings From Chip". Also reading and writing values using the Read/Write window now works.
Hi Dave,
Happy to take this offline. But can you explain to me how I have got the OpAmp setup wrong? Just so I can avoid this in the future. Now I'm confident with my circuit for the AD1939, I'm hoping to make a bunch more boards, but like the idea of a differential OpAmp as I work with balanced audio cables over long distances. Cheers! Mark.
OK. I have revisited what you are saying Dave. I thought you were commenting on my OPA1632 configuration, but you were pointing out my OPA350PA configuration. It has been some time since I drew up this circuit so I can't remember all my reasoning for the 3V from the buffer... Below are images from my TINA Spice simulation I looked at when verifying my design. I have revisited the circuit for my differential op-amp (OPA1632) and changed the CM_Bias voltage from 3V to 1.5V. Then re-run the simulation. I get the same VDiff output voltage for both scenarios. So now I guess I'm back to asking you how the CM voltage "skew" that you mention will cause distortion etc.
Fig 1. TINA Spice model
Fig 2. Cursor readouts of VOUT+ offset value (cursor A) and the peak of VDiff (cursor B) for Vocm = 3V
Fig 3. Magnitude response of VDiff with Vocm set to 3V
Now I changed the CM voltage from 3V to 1.5V as suggested and I see the following results:
Fig 4. Same VDiff as with CM = 3V, but now VOUT+ is lower at 1.5V which follows CM = 1.5V.
Any clarification would be greatly appreciated. I'll still change my circuit as you suggested, I'm just trying to understand completely what you mean before I implement on my next board for production.
Many thanks.
Mark
Hi DaveThib , I have revisited this response of yours and given it much more consideration. I'd like to summarise what I think you're saying, and what I think I have done wrong. Hopefully you can set me straight!
Have I now interpreted your advice correctly? Thank you again for your support. Hopefully after this I can share some success stories with you!
Kind regards,
Mark