Shop OBEX P1 Docs P2 Docs Learn Events
Read Frequency generated by freqout with count and pulse. — Parallax Forums

Read Frequency generated by freqout with count and pulse.

DrigoDrigo Posts: 3
edited 2008-11-03 17:48 in BASIC Stamp
Hello, I am trying to see if I can read a frequency generated by freqout with the pulsin and count command.
I generate the frequency (around 440 Hz) and the piezo speaker sound and I connect it to another input pin to see if there is a count value for it but I dont get any. Also, how can pulsin help me?
Thank and I hope to get an answer.

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-11-03 06:18
    Drigo -

    The Stamp is a single threaded device. It can only do one thing at a time. You are attempting to do two things at a time - output a signal AND inspect it. With two Stamps you could do it, but not with one. You'd be much better off with an oscilloscope to view the output if that was what you were trying to do.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When all else fails, try inserting a new battery.

    Post Edited (Bruce Bates) : 11/3/2008 6:30:20 AM GMT
  • DrigoDrigo Posts: 3
    edited 2008-11-03 17:48
    Thank you Bruce, this makes sense. Well my main focus is to read some frequency in the basic stamp because I want to build a simple guitar tuner. I found a great forum that talks about it but I am still confuse on the schematic for it. the forum I found is:

    http://forums.parallax.com/forums/default.aspx?f=5&p=1&m=90954

    It looks that they are using an opamp to square off the signal and amplify it for the BS2 to read it. However, there are some RC filters explained and this confuses me with the schematics presented in that forum. Can you help me relate both of these?
    Thanks!
    PS: I am attaching the schematic and also the RC filter is:

    Here is a table based on the values for E6 to E1

    Hz C R Frequency Range
    E6 82.41 .1uF 19.313K 67-110
    A5 110.00 .1uF 14.468K 90-150
    D4 146.00 .1uF 10.901K 124-178
    G3 196.00 .1uF 8.120K 171-245
    B2 246.94 .1uF 6.470K 178-324
    E1 329.63 .1uF 4.837K 276-398


    High Pass Filter Low Pass Filter

    Input >---o----[noparse][[/noparse]Cap]-->......>---o----[noparse][[/noparse]Res]--> Output
    | |
    [noparse][[/noparse]Res] [noparse][[/noparse]Cap]
    | |
    GND >---o
    >......>---o
    > GND



    What are the >.....> refer to?
    696 x 654 - 27K
Sign In or Register to comment.