Whilst working on my DDS digital VFO I have been trying to get the AD9850 working (see other posts).
I have the formula working now and delivering what I expect each time. I checked the variable value in the watch window. However when I select display hex values in that window I get a very weird result. Is this a Bug?
hi Paul,
Dont forget your Fout is Dimmed as Single Value
The Hex value
9A68A71D == 2590549789 decimal
Are your two screen shots taken for the same sim run conditions.?
I would suggest you put a known Hex dummy value in Fout just after the actual Fout has been calculated by the program.
Then use Watch in Hex and then Decimal, see if its what you expected
ericgibbs and SwingeyP I do not get this... The long data variable isn't big enough to do the calculation..
I know you are using a single for fout, but the calculation 7Mhz + 10khz + 6hz * 125mhz cannot be calculated this way.. as the containers for the calculation are longs... Or am I missing something!!!
hi Paul,
In your program I changed fout to LONG
and then changed this bit of code.
Try it and use Watch, run it and lets see if you get the same as me,, no fout increment