Shop OBEX P1 Docs P2 Docs Learn Events
Running two freqout commands — Parallax Forums

Running two freqout commands

abcdefgabcdefg Posts: 10
edited 2007-06-10 23:07 in General Discussion
Is there any way to run two simultaneous freqout commands and a routine controling them at the same time with an SX chip?

Comments

  • JonnyMacJonnyMac Posts: 8,940
    edited 2007-06-06 16:23
    You would need to synthesize the frequencies in an ISR so that you can run two simultaneously.
  • abcdefgabcdefg Posts: 10
    edited 2007-06-06 17:14
    Is there any example codes for interrupts out there I can use?
  • JonnyMacJonnyMac Posts: 8,940
    edited 2007-06-06 17:23
    You may want to download the Al Williams book for specifics on generating frequencies; it shows how to do DTMF encoding in an ISR -- perhaps this is what you're after; if not, simply use two output pins.

    http://www.parallax.com/detail.asp?product_id=70014
  • pjvpjv Posts: 1,903
    edited 2007-06-06 23:51
    Hello abc;

    The attached code runs two independent sine waves out of a single SX28.

    Read the whole article if you like on the Parallax SX contest (last year's) web site.

    Cheers,



    Peter (pjv)
  • abcdefgabcdefg Posts: 10
    edited 2007-06-10 23:07
    That's awesome. I only need two square waves, and then a simple block of code to control them based on a few inputs. I should be able to use that as a starting point.
Sign In or Register to comment.