LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Old July 13th 03, 10:11 AM
 
Posts: n/a
Default


If anyone has build a radio using a dds/pll vfo, I'd like to know how
they handled
the user interface in software, which micros they used and how they
handled the
math to calculate the divisor constants.


Heres the way I do a simple integer division ...

j = i / 0.66 ... that's what we want, both i & j are int's

The same as ..

j = i * (1 / 0.66)

The same as ..

j = i * 1.5151

Have the 1.5151 as a look up in rom but scaled up by *256 (388 in int terms)

So you have ..

j = i * 388

Then you divide the result by 256 (a simple shift right by 8 bits)


eg ..

i = 54
i = i * 388
j = i asr 8 .... this gets rid of the scale up

or

j = i shr 8 .... for unsigned calcs

..

j now equals 82 (as near as you can get to 81.84375)


If the divisor is variable then you prolly have no choice but to do a proper
division at some point, but still use scaled up int's to get your result.


Clive

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Noise and Loops Question Tony Angerame Antenna 4 August 24th 04 10:12 PM
Stacking Distance Question. More Information ab5mm Antenna 8 June 5th 04 08:18 AM
transmitter question - its a dousy duckman Equipment 0 December 8th 03 11:51 PM
Yagi / Beam antenna theory question... Nick C Antenna 12 October 5th 03 12:15 PM
Question about attenuators ... Doug McLaren Antenna 2 August 31st 03 04:20 AM


All times are GMT +1. The time now is 08:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 RadioBanter.
The comments are property of their posters.
 

About Us

"It's about Radio"

 

Copyright © 2017