Shop OBEX P1 Docs P2 Docs Learn Events
Another "Is this possible? " question — Parallax Forums

Another "Is this possible? " question

LaggLagg Posts: 4
edited 2006-01-30 15:54 in BASIC Stamp
I was wondering if makeing a pulse like this is possible with a basic stamp.

pwm.jpg



Each of those "steps" being of a different frequency.

(I really have no idea how to generate such a thing anyhow, but I thought it maybe easier with a stamp)

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-01-27 23:57
    You need to give more information like the time scale and voltage and current range. From the label "STEP CHARGING BEGINS" it sounds like you're charging something like a capacitor or rechargable battery. The outputs of a Stamp are strictly +5V/0V and limited in how much current they can switch (about 20ma). You will likely need external circuitry to do the actual switching of the power, but the Stamp can provide logic level pulses to turn the switch on and off (look at PULSOUT command). It can also provide a voltage reference to set the output voltage and/or current (look at PWM command). You can also drive external devices to produce the control voltages.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-28 00:55
    Checkout the PWM instruction -- that might do the trick for you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • LaggLagg Posts: 4
    edited 2006-01-28 07:27
    Thanks
  • LaggLagg Posts: 4
    edited 2006-01-28 21:43
    I looked into the PWM command

    I found some stuff and I was wonder if paring this piece of code

    counter var word
    
    do
    for counter = 255 to 0 
    pwm, 12, counter, 1
    next
    loop
    
    
    



    with this
    diagram

    www.emesystems.com/images/bs2/BS2PWM2.gif

    would do what I'm what that picture is showing?

    And yes, it it for charing something via toroidal coil.
  • Tom WalkerTom Walker Posts: 509
    edited 2006-01-30 15:54
    Keep in mind that the Stamp's PWM is not "true" PWM but can perform the same function in certain situations with additional hardware to integrate (smooth out) the signal. This is covered in the documentation.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
Sign In or Register to comment.