Shop OBEX P1 Docs P2 Docs Learn Events
displaying incoming signals — Parallax Forums

displaying incoming signals

loser_1982loser_1982 Posts: 2
edited 2007-05-26 16:20 in Propeller 1
hi!!! i would like to know how i could make a graph be display·of an ·incomin signal from any pin...?????? the signal could be audio, pulse train etc. if someone knows please let me know

Comments

  • Dennis FerronDennis Ferron Posts: 480
    edited 2007-05-25 09:00
    We need a bit more info. How do you want to display the graph? On the television, using the Propeller's video capability? On the computer, by uploading data? Or some other method?

    If you want to display a digital signal (low or high only) then you can record it directly. But if you have an analog signal, you will need an analog to digital converter chip (ADC). Someone started a thread in this forum a few months ago about how to use an ADC with the prop, and there is a Spin object for that, so it is doable. Just be aware that it will take more work than getting a digital signal.
  • rjo_rjo_ Posts: 1,825
    edited 2007-05-25 16:32
    There is no graphing object... but that is a great suggestion.
    My guess is that if you are patient... someone will roll it into an object.
    There IS an object that will allow you to export to an Excel spreadsheet, but of course I don't know where it is[noparse]:)[/noparse]


    Rich
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2007-05-25 16:50
    I have a graphing object though it's a little specialized I'll try to find time this afternoon to dig it up and see how generalized I can make it for release. It is set up to plot/display 2 channels though the sweep is based on the system counter so is limited to 32 seconds.

    -Martin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    StampPlot - GUI and Plotting, and XBee Wireless Adapters
    Southern Illinois University Carbondale, Electronic Systems Technologies
  • rjo_rjo_ Posts: 1,825
    edited 2007-05-25 17:29
    See?

    And you didn't have to be very patient, either.

    Rich
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2007-05-26 16:17
    Attached is a test file and "TV_Plot_obj".· It can plot 2 channels of analog data, either floating point or integer.

    Here's some usage from the comments (the actual code isn't commented great, sorry):
    Example usage:
      Plot    : "TV_Plot_obj" 
      Plot.start
      Plot.MaxTime(20)            ' Set max time in seconds, approximate value
      Plot.MaxVal(100)            ' Set max Y value
      Plot.freshscreen            ' Clean up plot area
      
      Plot.PlotA(5.2)             ' plot data - floats
      Plot.PlotB(fp.ffloat(x))
      Plot.UpdateText(chA,ChB)    ' Updates time and values in text area using float value
      
      Plot.PlotIntA(5)            ' plot data - Integers
      Plot.PlotIntB(X)
      Plot.UpdateIntText(chA,ChB) ' Updates time and values in text area using integers
    
    


    Time can be any value, though not very accurate, it at least gives you a rough time base.

    I tried to take a picture to post, but the picture scan wasn't cooperating.

    Hope it helps, it's adopted from a research project I was involved in, which with luck, will be presented at a NATO conference this year!· This was also my 1st attempt working with graphics video.... crash course for the project [noparse]:)[/noparse]

    -Martin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    StampPlot - GUI and Plotting, and XBee Wireless Adapters
    Southern Illinois University Carbondale, Electronic Systems Technologies
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-05-26 16:20
    Take a look at microphone_to_vga.spin in the Big Mass of Miscellaneous Objects in the Object Exchange: http://ww1.parallax.com/Default.aspx?tabid=65

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
Sign In or Register to comment.