I would like to produce exact 1Hz resolution frequencies (or power-of-2 divisors 1/2, 1/4, 1/8 Hz etc) while clocking the device at 2500MHz. In Programmable Modulus Mode, can I set B to 2500e6, giving a modulus of 1.0737e19. How do I solve for A and FTW to produce arbitrary frequencies between say 100 and 200MHz?

If I understand your requirement, you want to generate frequencies with integer-Hz values anywhere from 100 Hz to 200 MHz using a 2.5 GHz system clock.

Firstly, the DDS output frequency (fout) is not a specific frequency, but rather a prescribed fraction of the system clock frequency (fs), per the digital tuning word (or words, in the case of programmable modulus). That said, if you want fout to be exactly 1 Hz, then the system clock frequency must be EXACTLY some known value. That is, any variation of the system clock from some exact known value will show up as a proportional variation on the output.

With regard to specific output ratios, standard DDS operation will yield fout/fs ratios that result in uniform spacing of fout given by fs/(2^32). Hence, for fs = 2.5 GHz you get 0.582076609134674072265625 Hz spacing. The FTW value scales this spacing value by some integer from 1 to 4,294,967,295 (i.e., (2^32) - 1).

Programmable modulus yields non-uniform spacing of fout, which has the benefit of offering fout/fs ratios like 1/10, or 7/3002 (not possible with standard DDS). That said, not all integer-Hz output frequencies are possible, only certain ones due to the limits on FTW, A and B.

You find FTW, A and B as follows:

First, define the desired fout/fs ratio. As an example, we'll use 150 MHz. The resulting fout/fs ratio is:

150,000,000 / 2,500,000,000, which reduces nicely to 3 / 50.

In the datasheet description, this corresponds to M = 3 and N = 50.

To find the FTW, divide (2^32) x M by N. Be careful with this calculation, as it can result in very large integers, which most computers cannot handle properly. Some programs, like Python, allow you to do large integer computations without rounding or truncation problems. When all else fails, do long-hand multiplication and division on paper!

First, (2^32) x M = 12,884,901,888

Divide this by N: 12,884,901,888 / 50

Which yields 257,698,037 with a REMAINDER of 38. Hence, FTW = 257,698,037.

A and B are found as the ratio of the REMAINDER and N. That is, A/B = REMAINDER / N:

A / B = 38 / 50 = 19 / 25

Hence A = 19 and B = 25.

You must go through this process for each desired fout/fs ratio to determine FTW, A and B for each desired fout value.

Some fout/fs ratios will work out, but in your case M is always an integer less than 200,000,000 and N is at most 2,500,000,000. This means you should never run into a scenario where A or B violate their upper bound of 2^32 - 1. So you should be able to generate any desired integer-Hz value over the 100 Hz to 200 MHz range.