Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

AD9850 Dev Board Serial Issue

Status
Not open for further replies.
MrAl , please see the link where in mr desai had done a successful work
he used Arduino
https://amoghdesai.com/technology/electronics/dds-vfo-using-ad9850-atmega328p/

Hey, thank you, i will look over the code and compare to mine and perhaps even try it out completely. With a quick view it looks similar to my code, but i wont assume anything yet until i have time to look it over carefully (later today).
The schematic is missing 3 connections however.

What was striking about this chip was that the comm protocol was so simple, even simpler than true I2C protocol which requires the data line to be read now and then as well as written to. This chip should be even easier to use.
 
Last edited:
Well spotted MrAl !
That code fragment send_a_byte is something recycled and modified from an earlier project which did indeed have a stop bit as per asynchronous communications.
The lines of code which send the stop bit were removed, but obviously not the comment.
Looks like I wrote the original about 16 years ago. Where does time go when you are enjoying yourself?

JimB

Hi Jim,

Oh ok, that clears that up then :)
I'll have to read next what KISS is talking about, about the possible stop bit. I didnt see one but i'll look again at the data sheet.
Thanks again :)
 
On PDF page 12, it certainly does mention a "start" and "stop" bit.

First you have to select serial mode with fixed voltages on pins 2,3 and 4.

The you enable serial mode with a pulse on FQ_UD
Clock in your 50 bits of data and another pulse on EQ_UD loads those 40 bits.

If you look closely at figure 10, it suggests a reset, but at that point I'm a little confused.

Hi KISS,

Are you by any chance talking about the WCLK and the FQUD signals?
I regard them both as "clocks", where one is the bit clock (WCLK) and one is the word clock (FQUD) where the word is 40 bits long (32 freq bits and 8 control bits).

Also, try this as a thought experiment: think about clocking in this 40 bit group i will write out one byte at a time:
0x00 0x00 0x18 0x00 0x00

notice how this is left and right symmetrical, and looking at that center byte we have in bits:
00011000

and this is also left and right symmetrical.

What this means is the order does not matter which way we sent the bits nor the bytes, it has to produce either one frequency or the other, and the two possible interpretations given reversed bytes only are:
0x00 0x00 0x18 0x00 [0x00]
[0x00] 0x00 0x18 0x00 0x00

where the control byte is in brackets.
These two frequencies can easily be calculated.
Now if the bits are reversed, then we would have a whole word as:
0x00 0x00 0x18 0x00 0x00
once again because that center byte is left to right and right to left symmetrical.
That means we have the same two possibilities if the bytes are also reversed:
0x00 0x00 0x18 0x00 [0x00]
[0x00] 0x00 0x18 0x00 0x00

Furthermore, if we send the word with the assumption that the first form above is the correct one and it is not, then we will get the 'other' frequency. Vice versa, if we send the second form and it's not right we would get the 'other' frequency. So if we send both 40 bit words (after purposely reversing the byte order for one), we should see both frequencies one way or the other, and we DO NOT see these frequencies.

Sending the bytes in parallel though works very well.

The code i use looks almost the same as the links i followed for various implementation, but i'll look this next link posted by mvs sarma and see what i can find.
I did notice though that in that link the three data lines that are supposed to be either pulled high or low are not connected, and they should be for clarity. That's how this gets into serial mode to begin with right (and a WCLK and FQUD clock too) ?
 
Last edited:
RESET = Resets the Chip. So you need control of this line too

FQ_UD = is basiccally a start and a stop "bit". Wrong word for it, but pulses on this line signify a load ia about to take place and the load is done.

W_CLK = IN SERIAL MODE is a SINGE BIT clock not a word clock.

In the serial mode you have to clock in ONE BIT AT A TIME with 40 clock pulses. The lease significant BIT goes first W0. Even though it's called W, it's a bit.

Hardware: pin2=0; pin 3=1; pin 4=1 at start-up; Sets serial mode

Pulse reset
Pulse FQ_UD ; basically a start bit
set/clear D7; Pulse W_Clock ; 40 times; The first time is for w0, the last for w39
Pulse FQ_UD basically a load bit
 
Hi,

Yes thats it.
 
Hello again,

Finally the problem shows it's ugly head :)

It was the data line...it was too long and picking up noise. This wasnt expected at all because the data was given plenty of time to settle down before clocking the bit into the chip.

At first it looked like a defective chip because the serial interface did not work and the seller did not ship the package in anti static packaging, so as soon as it didnt work i assumed it was bad.
I notified the seller of this little problem and i assume they will correct that.

Swapping jumpers did not help because they were all the same length. Only shortening (using shorter jumpers) fixed the problem.

I only tested a few different frequencies, but i saw right away that it was responding the way it should now. The first test pattern was the symmetrical one i talked about earlier, and this time the correct frequency was the result :)

And yes, the low order byte is sent first, the control byte last. I will probably do a quick review soon.
 
Bravo!

JimB
 
Bravo!

JimB

Ha ha.
I should also mention that it is not JUST the three jumpers on those three pins (one goes to ground, the other two to +5v) that puts the device into serial mode (as the data sheet implies) it is those three jumpers PLUS the uC bringing the FQ_UD line high and then low again (pulse) before anything else that puts it into serial mode. Just tying those jumpers to their respective supplies alone does not do it, because if you dont pulse the FQ_UD line (called FU_UD on the board) it stays in parallel mode and you can load it in parallel. So the FQ_UD line has to pulse right after the reset and before the W_CLK pulses for any reason.

So now i can run it in the serial mode using only four wires (yay!) finally :)

There is a disadvantage to this though, and that is the frequency can not be changed as fast as in parallel mode, in case you have to change it faster. The limit for changing the frequency is around 20MHz in parallel mode but i'll never need that anyway.

The uses for this kind of thing are unbounded. Radio transmitter, receiver, test generator (obviously).

Another disadvantage is it only puts out 0.5vac, so an added amplifier would be good for most purposes and also allow for some isolation between the output and the circuit under test, although i think the output is current limited to whatever it becomes due to the current set resistor (so like 20ma tops, 10ma on this board).

Oh one more little detail:
The two pins that get pulled up should not be tied to +5v really, they should be pulled up with 10k resistors or one 10k resistor tied to both pins. That's because there should not be any low impedance logic signal applied just in case the Vcc line is delayed by a small amount, which could cause a latch-up condition and so the chip would not function.
 
THis very pcb has been working for us.

However don't use breadboard location for RF section .
 
THis very pcb has been working for us.

However don't use breadboard location for RF section .

Hi again,


Yes i dont use a breadboard (solderless breadboard also called a plugboard) i keep it connected with four female to male jumpers and two for power and ground. I leave the output pins without any contact, except one where i use a jumper to either the scope probe or the frequency counter (and another for ground). I also suspect that plugging one of these boards into a plugboard will ruin the plugboard socket pins because the header pins are much thicker than a regular IC pin.

I never had any doubt that dev boards like this one work in general, i just had doubts that this particular single board worked because of the result i was getting and because it was not shipped in anti static packaging. If it was shipped properly i would not have jumped to the conclusion that it was bad so easily. I did notify the seller about this too.

Also, it is often said that once the IC chip is installed into a circuit that it is 'ok' and no longer so susceptible to static discharge, but that is not correct in every instance either. If there are any pins that do not connect to anything yet (such as this dev board) then it is equally subject to damage through static discharge into one or more pins. It's only when ALL the pins connect to relatively low impedance paths that they may be protected somewhat. It's always better to package correctly however during shipping or storage or any handling.

Oh another small point is that for the boards that use the 125MHz crystal (recommended for this chip) they must be run at 5v, not at 3.3v. The max crystal frequency recommended on the data sheet for operation at 3.3v is 110MHz.
 
if we work at 100MHz and 3v3 (both Arduino and DDS the life would be longer as you already know.
Perhaps we need to indicate the master clock is 100MHz if we choose so., then stability and heat tolerance would be better in my humble opinion
 
Hi,

Well i didnt think about the longevity issues, as i was just trying to get this to work period :)
But thanks just the same.

There is one more very tiny issue, and that is that the board came with male header pins installed. This makes the board much higher and so using it in a project means the box has to be a little bigger. Some products like this (dev boards) come with the pins but the pins are not yet soldered onto the board, so you have the option of using the pins or just connecting wires to the board. I guess you could cut the pins off though if you really needed the package to be shorter vertically, then solder wires to the board.
The special interface requires 4 lines plus power and ground for a total of 6 wires. Most IC2 stuff takes only 2 lines plus power and ground for a total of 4 wires. The interface for this chip however will be faster than IC2 because it does not require an ACK reply signal. I think the max for IC2 is 3.4MHz where with this the clock might go as high as 20MHz or a little higher. If you have a need for speed this might help :)

I also wanted to take a minute to thank everyone who replied here in this thread. It was good to hear other peoples ideas about this and what might be wrong.
 
Hola Mr Al

I even bought three of a similar chip. My problem was nor more nor less the filter (elyptic, IIRC) necessary at the output. Daunting task for me to design it (and test, being SMD). I abandoned the idea maybe until I get a more or less ready made solution for that.

Have to check the actual chip. It is one of those with many specific isntructions to set up sweeping modes.
 
Hola,

The board i purchased had the filter on board already. It may not be exactly the best filter for the job (i think units got shipped with a filter that was too high in frequency) but it works so there is nothing fancy that has to be designed.

As i think i may have mentioned, the most limiting factor is the output voltage which only goes as high as 0.5v and i think that is RMS, so that's pretty low. Some kind of wideband amplifier would be needed. I'll eventually have to do this with mine too.
 
Here's the amplifier used by VK5TM (https://www.vk5tm.com/homebrew/dds/dds.php ):
upload_2015-10-19_17-18-53.png


I have an LHM6609 in my parts box and think it should work with appropriate modifications (voltage feedback vs. current feedback for the 6703), particularly at the lower frequencies (<10 MHz) that I intend to use.

Edit: My concern is whether that chip, which dissipates up to 480 mW at 5V and 125 MHz, needs a heatsink?

John
 
Last edited:
Hi,

What kind of gain are you looking to get, and what kind of load do you intend to drive with the chip? That will dictate what power it will have to dissipate, and i guess we can assume a sine wave output (so voltage/current in the chip itself can be calculated and thus the power dissipation).

I see that 6609 chip requires at least a 6.6v power supply (like plus and minus 3.3v). I was hoping to get something that runs off of just +5v if that is possible.

I see that design is not good for low frequencies however, at least not as is. The low frequency cutoff is somewhere around 32kHz. The frequency generator chip goes down to sub Hertz values, like 0.04Hz or thereabouts. If we wanted to get down to low frequencies like 1Hz, we'd have to change the design a little.
I have a couple 800MHz chips around too but i think they require plus and minus 5 volts to operate well. I was hoping to get something that worked with a single +5v supply. Maybe we should look around a little.

It looks like the max power output with a sine wave and equal plus and minus supplies is:
Pmax=(2*Vcc^2)/(pi^2*Ro)

That's with Vout set to the worst case output voltage (that causes the maximum power to be dissipated in the chip).

So with a plus and minus 5v supply, the max chip power would be a little over 100mw with Vout set to worst case and Ro equal to 50 ohms, and that is with direct drive.
It's probably the same using a +10v power supply if the load is connected to a point at half of Vcc and the zero AC line is at half of Vcc also.

The chip max power point occurs with an output of about 3.2v peak. For peak voltages above that the chip voltage drop is less so chip power goes down, and for voltages below that the chip current is lower so the power goes down.
 
Last edited:
Got my AD9850 running today. Seemed that I needed to add a reset to get it started. Runs fairly stable. Only had to change the LSB by adding 0x02 to the tuning word to get the frequency close. Calculated frequency is 10.000 kHz:
upload_2015-10-21_16-37-14.png


Running temp with no appreciable load and reduced voltage is about 35°C (125 MHz); room temp = 20°C by IR non-contact thermometer.

EDIT: Forgot to add, P-P voltage is 1.16V for the sine wave.
John
 
Last edited:
Hi John,

Thanks for posting that. That's a different board than i have but it's the same chip i think.
Nice chips huh?

Is that voltage measurement at the reduced voltage of 4.27 volts or at 5.00 volts?
I will be running mine at 5 volts.
Also, you might want to measure the output at various frequencies because of the filter which is of fairly high order and not completely flat.
 
The output voltage was fairly constant over the range of 4.95 to 4.27 as shown. I reduced the voltage just to see how much it affected the temperature rise. Effect on tuning was very slight. Yes, there seem to be two versions of the ebay board floating around. This link shows both in the second image. Mine is the bottom version (https://nr8o.dhlpilotcentral.com/?p=83).

The crystal seems to start slowly/erratically regardless of voltage, which is the bug right now that concerns me.

John
 
Status
Not open for further replies.

Latest threads

Back
Top