Shop OBEX P1 Docs P2 Docs Learn Events
Freqout & pwm — Parallax Forums

Freqout & pwm

ArchiverArchiver Posts: 46,084
edited 2001-10-22 18:00 in General Discussion
I was looking up some frequency stuff in my BS1 manual, and I noticed that (for
the BS2 only) freqout generates a sine wave using a pwm algorithm. My question?
Where, on the internet, can I find information on algorithms? I have not gotton
that far in my education and and seeing that word more and more in electronics.
Any help is always appreciated.


[noparse][[/noparse]Non-text portions of this message have been removed]

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-10-22 18:00
    >I was looking up some frequency stuff in my BS1 manual, and I
    >noticed that (for the BS2 only) freqout generates a sine wave using
    >a pwm algorithm. My question? Where, on the internet, can I find
    >information on algorithms? I have not gotton that far in my
    >education and and seeing that word more and more in electronics. Any
    >help is always appreciated.

    Hi astro,

    An algorithm is simply the programming steps required to achieve a
    desired result. A recipe. A way to "skin the cat". Often there is
    more than one way.

    One objective of PWM is to have an output turned ON part of the time
    and OFF part of the time, in such a way that the average is some
    desired percentage of the time. There are several ways to do it.
    Say you want an average value of 50% over a time period of one
    second. One way is to leave the output ON for 1/2 second and OFF for
    1/2 second. Alternatively, turn the output ON and OFF one hundred
    thousand times in that same second. (that is close to the way the
    stamp does it.) Or something in between. You don't even have to
    have the ON and OFF spaced evenly across the one second. You could
    turn the output ON and OFF 100,000 times in the second, but bunch
    them up so that the average value looks like a sine wave with a
    frequency of, say, 400 hertz. (That is how the stamp does Freqout).

    http://www.emesystems.com/BS2PWM.htm <--- more on PWM algorithm.


    -- regards,
    Tracy Allen
    electronically monitored ecosystems
    mailto:tracy@e...
    http://www.emesystems.com/BS2PWM.htm <--- more on PWM algorithm.
Sign In or Register to comment.