Shop OBEX P1 Docs P2 Docs Learn Events
Is there a virtual propeller application? — Parallax Forums

Is there a virtual propeller application?

turbosupraturbosupra Posts: 1,088
edited 2015-02-09 05:19 in Propeller 1
Work is slow sometimes, and I can't bring my prop bread board in and have that hanging off of my desk.

Is there a virtual propeller application that I can load a program to, simulate some basic highs and lows to pins as if it was connected to the chip on a com port and then watch how the code interacts with that and outputs on pst?

Does viewport have this ability?

Comments

  • StefanL38StefanL38 Posts: 2,292
    edited 2010-06-17 18:42
    Hi,

    don't get catched doing private things at work

    http://sourceforge.net/projects/gear-emu/

    Propeller simulator in java
  • turbosupraturbosupra Posts: 1,088
    edited 2010-06-18 03:34
    I'll try not to idea.gif


    As usual Stefan, you are the man! I can't wait to try it out tomorrow.
  • VideomachineVideomachine Posts: 9
    edited 2015-02-09 03:36
    Testbench.spin mit PropellerSignalGenerator von Johannes Ahlebrand erzeugt an Pin 10 und 11 analoge Signale:
    S
  • PublisonPublison Posts: 12,366
    edited 2015-02-09 04:03
    Translation to English
    Testbench.spin with propeller signal generator of John Ahlebrand generated at pin 10 and 11 analog signals :
    Sawtooth, triangle , sine, square , etc.
    If you add in the program testbench , the two lines sco : "Spin Scope" and a sco.start so appear only digital
    but no analog signals.
    
    The program can be found at Speech / Sound Propeller signal generator Author: John Ahlebrand
    
    What can you do to make the analog signals visible?
    Yours sincerely
    video Machine
    
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2015-02-09 05:16
    Propeller Signal Generator

    http://obex.parallax.com/object/688
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2015-02-09 05:19
    TestBench.spin

    CON
    _CLKMODE = xtal1 + pll16x
    _XINFREQ = 5_000_000

    OBJ
    psg : "PropellerSignalGenerator"

    PUB main | i

    'Start "Propeller Signal Generator" and output signal on pin 10 (inverted signal on pin 11)
    psg.start(10, 11, 32) ' Sync pin = 32 = No pin

    'Point to an 8 samples big (2^3) U16 waveform in memory
    psg.setUserWaveform(@userWaveform, 3)

    repeat

    'Generate a 200 Hz saw wave for 2 seconds
    psg.setParameters(psg#SAW, 200, 0, 0)
    waitcnt(cnt + 80_000_000 * 2)

    'Generate a 100 Hz sinus wave for 2 seconds
    psg.setParameters(psg#SINE, 100, 0, 0)
    waitcnt(cnt + 80_000_000 * 2)

    'Generate a 300 Hz user defined wave for 2 seconds
    psg.setParameters(psg#USER, 300, 0, 0)
    waitcnt(cnt + 80_000_000 * 2)

    'Generate a 1 kHz sample and hold noise wave for 2 seconds
    psg.setParameters(psg#NOISE, 1000, 0, 0)
    waitcnt(cnt + 80_000_000 * 2)

    'Generate a 20 kHz sample and hold noise wave for 2 seconds
    psg.setParameters(psg#NOISE, 20000, 0, 0)
    waitcnt(cnt + 80_000_000 * 2)

    'Generate a 500 Hz square wave with 25% pulse width for 2 seconds
    psg.setParameters(psg#SQUARE, 500, 0, psg#PW25)
    waitcnt(cnt + 80_000_000 * 2)

    'Generate a 50 Hz square wave with 50% pulse width for 2 seconds
    psg.setParameters(psg#SQUARE, 50, 0, psg#PW50)
    waitcnt(cnt + 80_000_000 * 2)

    'Modulate the pulse width for a few seconds
    repeat i from 0 to (1<<31) step (1<<14)
    psg.setPulseWidth(i)

    'Generate a 80 Hz triangle wave for 2 seconds
    psg.setParameters(psg#TRIANGLE, 80, 0, 0)
    waitcnt(cnt + 80_000_000 * 2)

    'Sweep the frequency from 20 to 20000 hz
    repeat i from 20 to 20000
    psg.setFrequency(i)
    waitcnt(cnt + 10_000)

    dat
    userWaveform word -$7FFF, $0000, $7FFF, $4444, $1111, $2222, $3333, $4444
Sign In or Register to comment.