Hi,
Ah, it's that AD9850 DDS chip again, I've got a couple of those on their way to play with as well.
pow(2,32) simply means 2 raised to the power of 32, sometimes written as 2^32 (not in PBP though) or, spelled out, 4 294 967 296. So in reallity your formula looks like unsigned long tuning_word = (frequency * 4294697296) / 125000000

Knowing that you could shorten it to Tuning_Word = frequency * 34.3597 (where 34.3597 simply is 2^32/125M). Obviosuly non integer numbers like that 34.3597 won't fly with PBP but we could do Tuning_word = frequency */ 8796 which would be like saying tuning_word = frequency * 8796 / 256.

Now, lets see if this works out, first with the original formula for a frequency of 500Hz
Tuning_Word = (500 * 4294697296) / 125M = 17179
And then for our PBP way of doing it
Tuning_Word = 500 * 8796 / 256 = 17179

Now, this would still only allow frequencies up to around 1900Hz after which a WORD variable will overflow. There might be a way around this but before I spend more time on it would be nice if
A) You could verifu that the above actually works in frequencies <1900Hz and
B) Let me know it you don't concider switching to an 18F device would be easier.

/Henrik.