Darrel's SPWM: Frequency, processor time..


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2013
    Posts
    1

    Default Darrel's SPWM: Frequency, processor time..

    Hi,

    I am playing with SPWM and instant interupts. Great thing!! I am progressing slowly and have few questions. Is it possible to change SPWM frequency when code is running, like with SSPWM? Also, what is the best way to disable unused PWM channels to free some processing time? Is it enough to set duty cycle to 0?

    Thanks,

    Dan,

  2. #2
    Join Date
    Mar 2014
    Location
    England
    Posts
    16


    Did you find this post helpful? Yes | No

    Default Re: Darrel's SPWM: Frequency, processor time..

    Hi Dan,

    Just bumping your thread because I'm keen to know the answers to your questions myself.

    Especially regarding any workaround the issue of how to change the frequency on the fly.

    I have been wondering whether the 'define' can reference an EEPROM address to this end ... but I don't know whether this is foolish ignorance on my part.

    Regards,

    T o n y

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


    Did you find this post helpful? Yes | No

    Default Re: Darrel's SPWM: Frequency, processor time..

    Quote Originally Posted by dran11 View Post
    Is it possible to change SPWM frequency when code is running, like with SSPWM?
    No, the frequency is calculated at Compile-Time by the assembler.
    As is ... you cannot change the frequency at Run-Time, and all channels run at the same frequency.

    Also, what is the best way to disable unused PWM channels to free some processing time? Is it enough to set duty cycle to 0?
    The number of channels are also fixed at Compile-Time.
    It takes the same amount of processing when the dutycycle is 0 as it does at any other value.
    DT

Similar Threads

  1. Spwm signals
    By sangaboy in forum Test Area
    Replies: 3
    Last Post: - 7th January 2012, 19:09
  2. Spwm
    By sangaboy in forum General
    Replies: 0
    Last Post: - 23rd December 2011, 06:09
  3. DT-int and SPWM
    By Macgman2000 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 20th October 2011, 19:39
  4. SPWM and DEBUG
    By Homerclese in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 2nd August 2010, 00:07
  5. Darrel's SPWM and LCDOUT
    By Wirecut in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 23rd April 2008, 22:30

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