Shop OBEX P1 Docs P2 Docs Learn Events
frequency out BS2 — Parallax Forums

frequency out BS2

hippalatorhippalator Posts: 12
edited 2010-04-23 12:15 in BASIC Stamp
Is there a way to have the freqout to be constant?
The whats a microcontroller doesnt say if the freqout can remain constaint. It shows only a fre / duration.
Will a do loop command work or will there be a pause using this method?

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2010-04-22 20:52
    "Will a do loop command work or will there be a pause using this method?"

    Plug it in and find out.· How hard is that?
  • irkris77irkris77 Posts: 10
    edited 2010-04-23 00:33
    if you dont know just say so. no reason to be impolite
  • NWCCTVNWCCTV Posts: 3,629
    edited 2010-04-23 01:15
    I agree. PJ, That was quite rude. Many people (myself included) are new to this kind of thing and would rather ask before doing something that could maybe ruin expensive parts, etc.
  • hippalatorhippalator Posts: 12
    edited 2010-04-23 02:04
    Yea considering I was at work when I posted the message. Really kind of hard to plug it in and test when you are not home to plug it in and test. But anyway it doesnt matter.
    My next question is the freq a sine wave or what?
    Is a pulsout a square wave? If so, I can easily run the sig through a butterworth 6th order filter I have laying around to get the sinewave.
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2010-04-23 03:57
    The FREQOUT has a duration up to 65535 milliseconds, so for some purposes that would be "constant". If FREQOUT is in a loop, there will be about one millisecond of pause between one duration and the next. Keep in mind that the PBASIC program can't be doing anything else while it executes one duration. If you make the duration relatively short so that it executes frequently, say 20 or 200 times per second, you can hear the pauses as a sub-frequency that might remind you of a cricket or a motorboat.

    FREQOUT produces a sine wave made by varying pulse frequency modulation. That is, it is made of pulses that go from 0 to 5 volts at a much higher frequency, and the density of the pulses is a good sine wave. A low-pass filter will remove the high frequency and leave the sine wave.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • hippalatorhippalator Posts: 12
    edited 2010-04-23 12:15
    Thanks Tracy
Sign In or Register to comment.