SwingeyP
Member
Hello,
Still working on the AD9850 and now have it working with a fixed frequency.
I want to break the fout variable into 4 8 bit words.
My thinking is something like this, (however it doesn't compile) is this the correct way to go about this?
ad9850_freq = ad9850_mhz + ad9850_khz + hz
fout = ad9850_freq * 34.3597383 '7 makes it too long!
'Ok so now we have the frequency we need to break it down to 4 8 bit words.
For x = 1 To 4
shifted = 0
For i = 0 To 7
shifted = shifted + ShiftRight(fout)
word_array(x) = shifted
Next i
Next x
Cheers - Paul
Still working on the AD9850 and now have it working with a fixed frequency.
I want to break the fout variable into 4 8 bit words.
My thinking is something like this, (however it doesn't compile) is this the correct way to go about this?
ad9850_freq = ad9850_mhz + ad9850_khz + hz
fout = ad9850_freq * 34.3597383 '7 makes it too long!
'Ok so now we have the frequency we need to break it down to 4 8 bit words.
For x = 1 To 4
shifted = 0
For i = 0 To 7
shifted = shifted + ShiftRight(fout)
word_array(x) = shifted
Next i
Next x
Cheers - Paul