Interupt driven servo PWM output


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: Interupt driven servo PWM output

    Hi,
    OK, so you're running at 64MHz, that gives it bit more time but I still think that interrupting at 4us intervals is way to fast, there's only 64 instruction cycles between each interrupt and I think it takes more than that for the DT-Ints system just to save and later restore the system variables. And, even if it does work the code would spend most of its time in transit to and from the interrupt handler.

    /Henrik.

  2. #2
    Join Date
    Aug 2013
    Posts
    2


    Did you find this post helpful? Yes | No

    Post Re: Interupt driven servo PWM output

    The time between transit and interrupt handler is the main culprit here in your servo pulse width modulation. Sometimes the turn around time makes us wait more and it doesn't work in the end even though everything seems right. Happens with me all the time. Connected a lipo battery once as a power supply and it never worked because of misconfiguration.
    Good luck to you.

  3. #3
    Join Date
    Aug 2013
    Posts
    2


    Did you find this post helpful? Yes | No

    Default Re: Interupt driven servo PWM output

    Quote Originally Posted by LettyLocke View Post
    The time between transit and interrupt handler is the main culprit here in your servo pulse width modulation. Sometimes the turn around time makes us wait more and it doesn't work in the end even though everything seems right. Happens with me all the time. Connected a lipo battery once as a power supply and it never worked because of misconfiguration.
    Good luck to you.
    No more updates regrading the issue? I think the interval time of interrupts must be increased in order for it to work. Interrupt handlers are very tricky to work with.

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


    Did you find this post helpful? Yes | No

    Default Re: Interupt driven servo PWM output

    ************************************************** ***********************
    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 " !!!
    *****************************************

Similar Threads

  1. Servo and pwm
    By Meriachee in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 29th May 2009, 14:26
  2. how to change servo motor PWM
    By dboy in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 21st September 2008, 07:02
  3. Help needed - MOSFET driven by PWM
    By bcd in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 2nd April 2008, 05:02
  4. 16F877a Interupt driven Hserin
    By RFsolution in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd November 2006, 00:38
  5. 16f73 pwm capture interupt
    By EDWARD in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 22nd July 2005, 22:22

Members who have read this thread : 0

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

Tags for this Thread

Posting Permissions

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