Shop OBEX P1 Docs P2 Docs Learn Events
Parallax USB Oscilloscope — Parallax Forums

Parallax USB Oscilloscope

USMCinfinityUSMCinfinity Posts: 150
edited 2010-07-22 23:09 in BASIC Stamp
I'm trying to do stampwork's ex16 which is about measuring frequency, I'm trying to use the oscilloscope but nothing really happens? How do I plot its data?

Comments

  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-07-21 23:35
    ' =========================================================================
    '
    ' File....... SW21-EX16-Freq_Measure.BS2
    ' Purpose.... Measuring frequency using COUNT
    ' Author..... (C) 2000 - 2005, Parallax, Inc.
    ' E-mail..... support@parallax.com
    ' Started....
    ' Updated.... 01 SEP 2005
    '
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    '
    ' =========================================================================


    '
    [noparse][[/noparse] Program Description ]
    '
    ' This program counts the number of events in one second and calculates
    ' frequency from it. Since frequency in Hertz is cycles per second, the
    ' number of cycles counted is the input frequency.


    '
    [noparse][[/noparse] I/O Definitions ]

    FreqIn PIN 15 ' frequency input pin


    '
    [noparse][[/noparse] Constants ]

    OneSec CON 1000 ' capture window = 1 sec


    '
    [noparse][[/noparse] Variables ]

    cycles VAR Word ' counted cycles


    '
    [noparse][[/noparse] Program Code ]

    Main:
    DO
    COUNT FreqIn, OneSec, cycles ' count for 1 second
    DEBUG HOME,
    "Frequency: ", DEC cycles, " Hz" ' display
    LOOP
  • hover1hover1 Posts: 1,929
    edited 2010-07-22 00:30
    Are you getting the BS2 program reading the frequency from the 555?

    Jim
    USMCinfinity said...
    ' =========================================================================
    '
    ' File....... SW21-EX16-Freq_Measure.BS2
    ' Purpose.... Measuring frequency using COUNT
    ' Author..... (C) 2000 - 2005, Parallax, Inc.
    ' E-mail..... support@parallax.com
    ' Started....
    ' Updated.... 01 SEP 2005
    '
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    '
    ' =========================================================================


    '
    [noparse][[/noparse] Program Description ]
    '
    ' This program counts the number of events in one second and calculates
    ' frequency from it. Since frequency in Hertz is cycles per second, the
    ' number of cycles counted is the input frequency.


    '
    [noparse][[/noparse] I/O Definitions ]

    FreqIn PIN 15 ' frequency input pin


    '
    [noparse][[/noparse] Constants ]

    OneSec CON 1000 ' capture window = 1 sec


    '
    [noparse][[/noparse] Variables ]

    cycles VAR Word ' counted cycles


    '
    [noparse][[/noparse] Program Code ]

    Main:
    DO
    COUNT FreqIn, OneSec, cycles ' count for 1 second
    DEBUG HOME,
    "Frequency: ", DEC cycles, " Hz" ' display
    LOOP
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-07-22 00:58
    Yup.
  • USMCinfinityUSMCinfinity Posts: 150
    edited 2010-07-22 23:09
    HELP?
Sign In or Register to comment.