SPWM_INT - Multiple Software PWM Question


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    Join Date
    Jan 2011
    Location
    Sydney, Australia
    Posts
    172


    Did you find this post helpful? Yes | No

    Default Re: SPWM_INT - Multiple Software PWM Question

    You may need to limit the decrement counter so that it never goes below 0
    Code:
    If DutyVar3 > 0 then
        DutyVar3 = DutyVar3 -1
    else
        DutyVar3 = 0
    endif
    Cheers
    Barry
    VK2XBP

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: SPWM_INT - Multiple Software PWM Question

    Quote Originally Posted by Aussie Barry View Post
    You may need to limit the decrement counter so that it never goes below 0
    Code:
    If DutyVar3 > 0 then
        DutyVar3 = DutyVar3 -1
    else
        DutyVar3 = 0
    endif
    Cheers
    Barry
    VK2XBP
    Ah! You think DutyVar3 is ending with -1? I can hook up my serial LCD and see for sure, but that looks to be what's happening. Thanks Barry!

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: SPWM_INT - Multiple Software PWM Question

    That was it. I should have learned by now to go over my loop code in more detail.

    Any ideas on combining SPWM and blinking LEDs?

Similar Threads

  1. Darrel's Multiple Software PWM
    By passion1 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 15th October 2013, 15:21
  2. Replies: 1
    Last Post: - 4th March 2013, 21:57
  3. DT Multiple Software PWM and 18F2321 issue
    By microuser in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 20th December 2012, 08:23
  4. General Question About Multiple Interrupts
    By grzeh666 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 31st August 2008, 17:09
  5. Multiple HPWM question
    By Johan in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 17th October 2007, 13:00

Members who have read this thread : 0

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