Hello, I am using an AD7770 ADC and I am getting the error "Clock not switched over" in the bit 4 of the GEN_ERR_REG_2 register. Is this because my clock source doesn't work or could it be because of something else? Any way to fix it?
You can verify the error by reading conversions from the ADC. If the switch over from internal to external clock didn't take place correctly, for instance the clock source may have been applied after the device has initialized, then no conversion would take place. By just issuing a reset to the device would let the AD7770 work properly.
If this is not the case, what's the clock source you are using, its frequency and how are you setting the configuration registers and XTAL/MCLK pins?
First, thanks for the answer Lluis.
It is not solved when I reset the device, so I guess there is some problem with the clock source. I have two clock sources to choose but both of them give me error: a crystal and a CMOS clock source. I change from one source to the other, to test how both work, with some switches that I have and by setting the CLK_SEL pin either 0 or 1.
However, now I am not sure if I connected correctly the crystal, because I didn't include any capacitors between the pins of the crystal and ground, do you know if this is necessary? They don't include any capacitors or resistors in the evaluation board for this ADC.
When I use the crystal, it is connected between XTAL1 and XTAL2 and when I use the cmos clock source, its output is connected to XTAL2/MCLK and XTAL1 to ground. The frequency of both clocks sources is 4.096MHz.
About the registers, I am not setting any value related to the clock, I think.
By resetting the device, did you mean a pulse on the reset pin?
By the way, would it be possible to share your schematic so I can have a look and see if we are missing something else? When you switch among clock sources, either of them are showing the same error flagged?
With regards to connecting correctly the crystal, I would suggest having a look to our Evaluation Board schematic as well as table 3 for guidance.
Thank you so much for the help! The problem is now solved because I realized that I was connecting the CLK_SEL the other way around and now that I connected it right, it works!
Thank you and regards,
Retrieving data ...