Post Go back to editing

# AD9959 frequency linear sweep down

Category: Choose a category

Hi guys, I'm trying to use the linear sweep mode of AD9959 to sweep the frequency down. It seems that it can sweep from s0 to e0 but the e0 frequency must be larger. I tried to let p0 always 1 (I'm using channel 0) such that it starts at e0 but obviously it still has to finish the sweep up. Correct me if I'm wrong since I'm really interested in achieving this sweeping-down function!

[edited by: zyli at 2:19 AM (GMT -4) on 10 Aug 2022]
Parents
• Hi  ,

Can you send me a screenshot of your setting from the evaluation software? Just want to check your values and settings to check if there are errors or I can suggest better solution to achieve the linear sweep that you want. Also what frequencies are you trying to achieve?

Regards,

Jules

• Basically, I just want to sweep from 100MHz to 90MHz and that's it, using the linear sweep function.

• Yes E0 must be greater than S0.

That said, you can accomplish the desired down sweep by taking advantage of the fact that the DDS is a sampled system. Normally, we think of operating only in the 1st Nyquist zone (0 to 1/2 the system sample rate). Therefore, we typically think of the useful range of FTWs as being from FTW = 0 to FTW = 1/2 of the maximum value. However, the DDS will accept FTWs in the 2nd Nyquist zone. That is, FTWs from greater that 1/2 the maximum value up to the maximum value.

When you program a frequency in the 2nd Nyquist zone, you will see its image in the 1st Nyquist zone. Specifically, the 2nd Nyquist zone frequency and 1st Nyquist zone frequency appear as two frequencies "reflected" about the Nyquist frequency (1/2 the system clock sample rate).

For example, let FTW0 represent a frequency in the 1st Nyquist zone and FTW1 represent the corresponding image frequency in the 2nd Nyquist zone. The FTWs relate as follows:

FTW1 = FTWmax - FTW0, and

FTW0 = FTWmax - FTW1

Where FTWmax is the maximum FTW value (that is, all bits = 1).

The clue is the negative sign imposed on the FTW on righthand side of the equations due to the subtraction operation.

This means you can fool the DDS into doing a down sweep in the 1st Nyquist zone by programming an up sweep in the 2nd Nyquist zone. This will satisfy the E0 > S0 requirement, but still allow for a down sweep (in 1st Nyquist zone) by executing an up sweep (in 2nd Nyquist zone).

• Ah I see, that's funny and working. Thank you! (though this means I need a low pass filter now)

• I have a follow-up question: can I ramp two channels at the same time? Or they can start slightly different but the two sweeps overlap with each other? (Like trigger the p0 and p1 at different times, leaving enough time in the middle for the DDS to communicate?)

• Each channel has a dedicated sweep generator and DDS, so you can independently program sweep parameters on a per channel basis. Furthermore, the sweep generators respond independently to their respective Px pin. As such, you should be able to do completely independent sweep operations on a per channel basis..

• Thank you! I guess I didn't explain myself adequately. I know the linear sweep function can sweep all channels independently from S0 to E0, based on when the Px pin = 1. The question is, can I set up a different S0 and E0 for two different channels? (I can also try to use other methods like RU/RD though I don't understand those yet).

Note there are four copies of Channel Registers (Table 29) and four copies of Profile Registers (Table 30). That means there are four copes of CFTW0 and CW1 registers, which equate to S0 and E0, respectively.

• I see! So I just send two successive commands with different CSR right?

• Yes, you would program the specific channels by setting the corresponding CSR bit for a particular channel. Once they are programmed, you can use to P0-P3 pins to control each channel independently.

• Hi, thanks for your help, my problem is solved. Just one more question: can I set the amplitude of the frequency sweep?

• Amplitude is a global control parameter that applies to all channels. That is, the amplitude is programmable, but not on a per-channel basis. Because the ACR is not channel specific, it will only be useful to you if the sweep duration of each channel does not overlap (in time) the sweep duration of any other channel.

Assuming the channel sweeps do not overlap in time, then amplitude control may be implemented as follows...

Manual amplitude control must be enabled via the ACR register: ACR[12:11]=10. The 10-bit amplitude scale is controlled via ACR[9:0]. That is, programming the scale followed by assertion of IO_UPDATE applies the amplitude setting to the output signal level.

Because the scale factor is not channel specific, you would need to pre-program the scale factor between channel sweeps. That is, while one channel is sweeping, program a new scale factor but DO NOT assert IO_UPDATE. Then, upon (or just prior to) triggering the sweep of the next channel, assert IO_UPDATE. That will invoke the pre-programmed scale factor for the new sweep. Repeat for each successive sweep of a channel.