Darrel's SPWM and LCDOUT


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Wirecut View Post
    I never stop to thaks Darrel for he very useful SPWM.
    You are very Welcome Leo. Glad you could use it.

    Using it, I have found the necessity to stop and then later start or restart restart the SPWM having the same value for each SPWM channel.

    During the stop period all the channels/pin should be set high or low a desidered.

    Could you please suggest the best way to stop and start the SPWM.
    Well,
    Just stopping the Timer or Disabling the interrupt will leave everything in mid-cycle.
    Then turning the Timer back on later will cause all channels to finish the cycle it was in the middle of, and continue with the dutycycle last assigned.

    I think the best way is to set all the DutyCycles to either 0 or the Max Res +1. Which will give an orderly "Stop" at the end of the Cycle.

    If the DutyCycle variables are grouped in an array like shown in my original examples, then you can just do a FOR loop, to assign them all to the same value.

    Code:
    For i = 0 to 4
        DutyVars[i] = 0
    Next i
    <br>
    DT

  2. #2
    Join Date
    Feb 2007
    Posts
    37


    Did you find this post helpful? Yes | No

    Default

    Hi Darrel,

    many thanks for your suggestion.

    I will try to implement both solution either 0 or the Max Res +1.

    Ciao

    Leo

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