A PWM question


Closed Thread
Results 1 to 6 of 6

Thread: A PWM question

  1. #1
    Join Date
    Oct 2008
    Posts
    52

    Default A PWM question

    If I am using this statement, PWM portb.7, 127,100.

    Is there a way to stop it before it finishes?

    Thanks, Don

  2. #2
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Yes, remove power from the PIC

    Once you start a pwm software based pwm, it will complete before it moves on.
    http://www.scalerobotics.com

  3. #3
    Join Date
    Oct 2008
    Posts
    52


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by scalerobotics View Post
    Yes, remove power from the PIC

    Once you start a pwm software based pwm, it will complete before it moves on.
    Thats what I thought. I guess I will use HPWM.

    Thanks,

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,614


    Did you find this post helpful? Yes | No

    Default

    Objection ...

    an asm interrupt can stop it ... but with an external action ! ( also possible with a timer ... but what the real use ? )

    Alain
    Last edited by Acetronics2; - 20th January 2011 at 12:56.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  5. #5
    Join Date
    Oct 2008
    Posts
    52


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Objection ...

    an asm interrupt can stop it ... but with an external action ! ( also possible with a timer ... but what the real use ? )

    Alain
    Hi Acetronics,

    I want to output a pulse train to a stepper driver controller to turn a rotary table. If I make a mistake in entry or part way through the router cut I want to stop it. I realize I can just turn it off but wanted something different.

    Thanks, Don

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Timmer interrupt, HPWM would work. A huge "safety Break" button in serie is never a bad idea in case the driver goes nuts. Current read from the motor, feed into the pic and all plah plah is also a nice extra... Even better if you keep track of every "events" around...

    Originally Posted by Acetronics
    Objection ...
    - Objection acceptée
    - Merci votre honneur
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts