Shop OBEX P1 Docs P2 Docs Learn Events
Basic Stamp and NJQRP DDS Daughtercard — Parallax Forums

Basic Stamp and NJQRP DDS Daughtercard

jim rogersjim rogers Posts: 4
edited 2005-09-10 22:29 in BASIC Stamp
I would appreciate any information anyone has on this subject. The DDS daughter card uses a 40bit programming word, represented by the formula: dphase = (fout * 2^32)/100^6. For 7040000hz dphase resolves to $001205BC01. Not a problem in VB6, but how to procede in PBasic with the 65535 limitation has me a bit perplexed. I fear I am mathematically challenged here smilewinkgrin.gif

Jim, W4ATK

Comments

  • Ryan ClarkeRyan Clarke Posts: 738
    edited 2005-09-07 14:19
    Use shiftout if you know the values already.

    Like in their example:
    shiftout 7,8,0,[noparse][[/noparse]$02,$BC,$05,$12,$00]

    In fact I would suggest reading this page: http://www.njqrp.org/quickielab/index.html




    Ryan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ryan Clarke

    Parallax Tech Support
    rclarke@parallax.com

    Post Edited (Ryan Clarke (Parallax)) : 9/7/2005 2:18:32 PM GMT
  • jim rogersjim rogers Posts: 4
    edited 2005-09-07 16:01
    Thanks Ryan for the very quick response,
    I think I have an approach, since I can use the VB to get "digit weights", i can store tables using DATA, access the tables with the symbol + digit and then build an add that accomodates carrys to build the 40bit stream a word at a time and use the SHIFTOUT as you suggest. I had lost sight of how valuable tables can be in a small controller.

    Jim Rogers

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim Rogers, W4ATK

    j.t.rogers@charter.net
    w4atk@charter.net
    w4atk@arrl.net
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2005-09-07 22:30
    I recall this came up some time ago on the yahoo groups list, to compute the multiplier for the AD9850 DDS. It is possible to do it with a direct computation. These URLs should get you started...

    groups.yahoo.com/group/basicstamps/message/44347
    groups.yahoo.com/group/basicstamps/message/35802
    groups.yahoo.com/group/basicstamps/message/35256

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • jim rogersjim rogers Posts: 4
    edited 2005-09-08 00:41
    Thanks Tracy-I have your website bookmarked for the info on the multi-precision multiply and divide. Being a bit mathematically challenged, I have not given that approach the focus it deserves. The tables I built are quite extensive providing 10hz resolution up to 15mhz. The associated program to do the look-ups and 32bit add is quite small, but then I have not plugged in all the bells and whistles yet.

    Jim Rogers

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim Rogers, W4ATK

    j.t.rogers@charter.net
    w4atk@charter.net
    w4atk@arrl.net
  • jim rogersjim rogers Posts: 4
    edited 2005-09-10 20:34
    Thanks to Tracy, This is resolved. Moving on to the hardware. Be happy to share what I did with Tracy's generous help

    Jim Rogers, W4ATK

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim Rogers, W4ATK

    j.t.rogers@charter.net
    w4atk@charter.net
    w4atk@arrl.net
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2005-09-10 22:29
    Hi Jim,

    I'm pleased that worked out! Can you post the algorithm you ended up with, that works? It might be good to have it here for reference.

    I'm not clear on where your desired frequency input is coming from. In earlier stuff referenced above from Yahoo groups, the desired frequency was being entered on thumbwheels, read by the Stamp and converted to a control word for the AD9850. The thumbwheel problem was easy with 5 wheels and 10khz steps, but gets into a higher precision algorithm if you need to interpolate to the 0.03 Hertz precision (up to 65 mhz) the AD9850 is capable of.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
Sign In or Register to comment.