AD9854 with ATMEGA32 and USB - Page 1
Forum section: electronics / beginners

author: rthorntn
author_rank: Frequent Contributor
timestamp: January 04, 2013, 02:45:32 am
content: Here goes, another impulse Ebay buy finally arrived.http://www.ebay.com/itm/160832604912It's different to the picture and schematic because it is USB and its an ATMEGA32 not a 16.Switch 1 is set to openE1,E3,E4,E5 and E6 SMAs are unplugged.5v and USB are attachedLED 2,4 and 5 are litThe VR1 pot is untouchedNow I can't figure out how to use it, no surprises there!So the module control software runs and it opens the port to the COM port I setup but I can't figure out the interface (it shows the interface in the ebay link above).Basically I want to generate signals to see on my DS1102E. Right now I connect in to the E2 SMA and I see a 1Mhz wave, changing stuff and hitting "Send Datas" doesn't seem to change that but the RX LED does flash momentarily on send.I can't see the TX LED flashing ever.Ideally I want to put this in an enclosure with some switches and dials and drive it without a PC but I am not sure this is going to be possible as I only have a 6-pin JP2 and 10-pin JTAG.Thanks.Richard

author: ve7xen
author_rank: Super Contributor
timestamp: January 04, 2013, 03:06:01 am
content: Interesting board. I've been working on something kind of similar around AD9951 for a while now, and become a bit hung up on what I want to do about the output buffer, but anyways...I think your understanding of the control program must be correct, there doesn't seem to be much to it. That leaves either a hookup problem or a broken gizmo. I'd have a look at how the DB9 connector is wired to the micro and make sure you're seeing data on the micro's RX pin. If not, try disconnecting and looking on the DB9 pin connected to TX. Some gizmos are one way and others are the opposite w.r.t TX/RX. There's supposed to be some kind of standard for this, but not everything is the same.If you want to make an interface for this you can add a second microcontroller to drive a display and some buttons, just use the UART for communication with the serial port. Or you could modify the firmware on the onboard AVR to use SPI over the ISP connector instead if that's more convenient / faster.

author: rthorntn
author_rank: Frequent Contributor
timestamp: January 04, 2013, 06:53:00 am
content: Thanks ve7xen!To add to my original post, I guess I have some more detailed questions:Has anyone used the chinese app that comes with these, what is the configuration workflow, any idea on the baud rate, the send string is like $80000002048N# and seems to change when you change a value, do you have to "send datas" every time you change a single setting?What do all the app options mean:Comp PDQDAC PDDAC PDDIG PDPLL rangeBypass PLL...When would I switch S1 from open to close?Does anyone have the pinouts for JP2?What does the VR1 pot set, do I need to touch it?Why does it have 6 SMA ports, I have tried E1 and E2 and both have a freq of 1.000mhz and a prd of 1.000us what do e3 thru e6 do?Thanks.Richard

author: rthorntn
author_rank: Frequent Contributor
timestamp: January 04, 2013, 07:22:59 am
content: Actually this one looks the same as the one that I have:http://www.ebay.com.au/itm/280993325242

author: rthorntn
author_rank: Frequent Contributor
timestamp: January 04, 2013, 07:53:25 am
content: Just in case somebody is interestedS1 is a power switchUsing different software (VB instead of VC) I can control it, it is acting a bit screwy (I input 10Mhz and it gives me 20Mhz sometimes

author: ve7xen
author_rank: Super Contributor
timestamp: January 04, 2013, 08:26:56 am
content: So you've got the USB version then? I guess no chance you've got it hooked up wrong in that case... I'd contact the seller and make sure you've got the board set up right, I find they're usually pretty helpful if you can get through the language barrier.As far as the labels in the program, this thing seems to be a very rudimentary 'bridge' to the AD9854, and it looks like you basically just send the configuration registers to the board, which forwards them to the '9854. Doesn't seem like there's much smarts in the ATmega itself, though the listed library functions imply it might have at least simple things baked in. It's more of a development board than a useful product.Anyway, you can find rudimentary descriptions of all the register fields in the AD9854 datasheet (pg 38), and the software seems to use the same names they use there. However I've never found Analog's DDS (or other parts, for that matter) datasheets to be of the 'read register descriptions and understand how to use the chip' type. To grok what they're about you usually have to carefully read the entire datasheet several times, and then make a bunch of inferences. Here's a quick rundown:PD is power down - Comp is comparator, QDAC is the Q-DAC (this is a quadrature DDS so has both I and Q DACs and outputs), DAC is both DACs, DIG is 'digital logic' - not sure why you'd turn this off, read the datasheet, PLL range adjusts the VCO gain to support > 200MHz PLL operation, Bypass PLL disables the PLL and runs directly from the REFCLK input (30MHz on this board), 'CLR ACC1' commands the DDS to clear its accumulator, forcing a phase jump to 0, 'CLR ACC2' holds both accumulators to 0 while set, 'triangle' causes an up / down sweep when in swept FSK mode (I assume the default is a up / up sweep), SCR QDAC causes the Q-DAC to operate independently from the DDS with a user-set value in its register (when clear the Q-DAC if enabled will be coupled to the DDS). Without reading the datasheet I'm not sure what I/E update clock is about. Bypass inv sinc will bypass the internal digital filter, OSK EN and INT control output shaped keying (basically ramping on / off), LSB first controls the serial interface bit order and probably must match how the AVR is programmed, but it's wired for both serial and parallel so it might not be using serial at all..., SDO active sets the serial interface on or off. The 30MHz at the top is the input frequency (used to calculate the frequency registers I guess) and the 4 beside it is the PLL multiplier.I downloaded the software / data package and poked at it and the way it operates seems a bit weird. When you change something in the upper 'setup' block you'll see the command (hex) at the bottom change to match. It seems there are separate commands for the control registers and for the frequency, phase etc. registers though as if you change any of those values and click the corresponding button the command changes totally.So I think the way you use it isa) open portb) Set up the control section at the top as you want it, then click 'send datas'c) To change frequency or phase, enter value in the box (e.g. Fre_TW1) and click the button beside, it complains about not being open so I don't think you need to click 'send datas' again to update these registers, just the button beside.You really need to understand how this chip works to use the software as-is.

author: rthorntn
author_rank: Frequent Contributor
timestamp: January 05, 2013, 12:37:17 am
content: Thanks again ve7xen, very useful info!Any ideas how i get a square wave, according to the datasheet:"The (externally filtered) sine wave output can be converted to a square wave by the internal comparator for agile clock generator applications"The "AD9854 Control_Softwear" I am using now (AD9854_Software.exe from the souce code\For_VB directory) allows me to set the following:Frequency1Frequency2Delta FrequencyRamp Rate ClockReference ClockOutput Amplitude checkbox with I and Q slidersTriangle checkboxMultiplication Frequency dropdown with X0-X10 optionsWork Mode dropdown with Single Tone, FSK, Ramped FSK, Chirp and BPSKThe fourth image here:http://item.taobao.com/item.htm?id=9044735744shows an updated software with the following settings that I don't have, I think this guy Zhang Lihua 88 might be the designer of the board:Looks like Wave Set, this could be a crucial one!CLR ACC1CLR ACC2FunctionTime valueAnybody got this updated software?Thanks again.Richard

author: ve7xen
author_rank: Super Contributor
timestamp: January 05, 2013, 01:07:16 am
content: Enable the comparator and presumably there is a comparator output somewhere you can use to get the square wave. The trimpot is probably to set the comparator threshold (which will set duty cycle).

author: Mechatrommer
author_rank: Super Contributor
timestamp: January 05, 2013, 04:33:05 am
content: have you considered this thread?https://www.eevblog.com/forum/reviews/ad9854-100-mhz-function-generator-from-ebay

author: rthorntn
author_rank: Frequent Contributor
timestamp: January 05, 2013, 05:38:48 am
content: Thanks ve7xen, how would I "enable" the comparator?Thanks Mechatrommer, I did read this, on a reread the schematic was useful:https://dl.dropbox.com/u/28207218/generator/Schematic%20Prints.pdfThe schematic is missing the E6 SMA, I am guessing that is for an external clock because it's right beside the 30Mhz crystal and seems to be plugged on the ebay and taobao images?I can't tell what the E3 SMA is used for it looks like it is only connected to 36 and 42 on the AD9854:36 VOUT Noninverted Output of the Internal High Speed Comparator. Designed to drive 10 dBm to 50 ? load as well as standard CMOS logic levels.42 VINP Voltage Input Positive. The noninverting input of the internal high speed comparator.So E3 is a comparator SMA connector, not sure if its an input or an output, how would I use this?Also can somebody help me understand the theory behind pins 48,49,51 and 52, what are the complimentary pins all about, all 4 pins seem to each have a seperate SMA connected E1 thru E4:48 IOUT1 Unipolar Current Output of I, or the Cosine DAC.49 IOUT1 Complementary Unipolar Current Output of I, or the Cosine DAC.51 IOUT2 Complementary Unipolar Current Output of Q, or the Sine DAC.52 IOUT2 Unipolar Current Output of Q, or the Sine DAC. This DAC can be programmed to accept external 12-bit data in.When would I use the outputs, I assume IOUT1 and IOUT2 are both capable of independently outputting a wave, if so, I will need a second SMA to BNC to attach the board to my oscilloscope CH2?JP2 looks like it is an ISP programming interface for the ATMEGA. I am slightly annoyed that the only pins I have are JTAG and ISP, I though there might be some of the spare ADC pins on the ATMEGA (like ADC0-ADC3) would be broken out so I could attach switches and maybe a rotary encoder, having to add a second MCU to it to accomplish this is a PITA. I guess adding an LCD, rotary encoder and some function switches would probably need more than the remaining pins on the ATMEGA anyway?Thanks again, between the forum, datasheets and google... I am getting there.Richard

author: ve7xen
author_rank: Super Contributor
timestamp: January 06, 2013, 12:20:16 am
content: Quote from: rthorntn on January 05, 2013, 05:38:48 amMake sure Comparator power-down isn't set in the registers. The VB software has a checkbox for this.QuoteProbably, I'd ask the seller. The schematic is for a slightly different board as it doesn't have USB etc. either, but the AD9854 part is probably the same.QuoteE3 is the comparator output. I'm not sure why it's connected to the VINP(42) pin through the 1K resistor, but this pin is also connected via the net named VINP to a node on the E2 output, to use the main output as the input to the comparator.QuoteThis is a differential current output DAC. Each DAC has two outputs, which should be exactly complementary (ie. when the + pin is sinking 1mA the - pin will source 1mA). This increases the signal to noise ratio and also (if used in a differential system) allows the elimination of common mode effects. This board doesn't use a differential to single-ended buffer or anything though, so you get a separate output for the + and - sides of the DAC. The signals should be identical but inverted with respect to each other. I'm a little puzzled by the use of a 1k load resistor though, the datasheet schematic for the AD evaluation board uses 50R here, but it may have to do with the impedance of their output filter or something.As mentioned before, this chip has two such DACs, the inphase (I) and quadrature (Q) signals, which will have a 90 degree phase offset.QuoteFor your purposes you can probably just use one or the other. If you needed the noise improvement and common mode rejection you could add a differential to single-ended converter of some kind. It could also be useful if you needed to remove the DC offset and wanted to use it for low frequencies.QuoteYou might be able to cheat and use an SPI GPIO chip to accomplish this via the ISP connector, something like the MCP23S17.

author: jrevard
author_rank: Newbie
timestamp: January 12, 2014, 08:20:43 am
content: May I reopen this thread for just a moment...I bought one of these, on impulse as well, and see a lot of chatter about quality vs price vs other options for signal generation. I am still too new to formulate an opinion and have barely touched the product since its arrival.Has anyone decided if this is a rip-off or not??Also, I don't remember it coming with any software and I don't see a link on the listing. Anyone know where I can find that?http://www.ebay.com/itm/1HZ-100MHz-AD9854-DDS-Function-Signal-Generator-Module-PC-Control-Software-/151006544962?pt=LH_DefaultDomain_0&hash=item2328b10442Thanks!

author: hessaacd
author_rank: Newbie
timestamp: December 05, 2014, 12:21:36 am
content: I found this link and thought it may be of use to people having trouble finding the software for this ebay item. I haven't tested the software but the documentation looks good.http://kc-kwan.com/supports/AD9854_Kit_For_V4V5/