need help!!! >> 2 channel SPWM variable duty cycle.


Closed Thread
Results 1 to 13 of 13
  1. #1
    Join Date
    Sep 2013
    Location
    Dhaka, Bangladesh
    Posts
    20

    Question need help!!! >> 2 channel SPWM variable duty cycle.

    I modified SPWM software and add a more SPWMpin but I need a variable duty cycle. (see the photo)
    Name:  1.JPG
Views: 1090
Size:  154.2 KB
    Code:
    define OSC 10
    SPWMpin var PORTC.2       
    SPWMpin1 var PORTC.3
    Include "SSPWM.INC" 
    
    START:
    Freq = 50                     
    DutyCycle = 50                  
    gosub StartSPWM
    
    MAIN:
    'MY CODE HERE
    GOTO MAIN
    sspwm.zip

    HOW I ADD VARIABLE CODE TO MY PROJECT????
    HELP ME ANYBODY PLZ.......

  2. #2
    Join Date
    Sep 2013
    Location
    Dhaka, Bangladesh
    Posts
    20


    Did you find this post helpful? Yes | No

    Default Re: need help!!! >> 2 channel SPWM variable duty cycle.

    I hoped that is site is useful but I never get any help from this site. So this is my last post if I will not get any response I never post in this site.


    Proteus File: Attachment 7283

  3. #3
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: need help!!! >> 2 channel SPWM variable duty cycle.

    Antorbd,

    to add a variable to your code you simply declair it at the beginning like this...

    AdjustPWM VAR BYTE


    Then you can read the AD converter connected to your variable resistor like this...

    ADCIN 5, AdjustPWM

    then you can use the value you read in to your variable "AdjustPWM" in your PWM adjust command, something like the...

    HPWM 1, AdjustPWM, 500


    --------------------------------------

    are you using PicBasic ?? or some other basic language??

    If PicBasic do you have the manual?

    ----------------------------------

    for a beginner it is extremely helpful to read and study other working code examples.
    Use the search function at the top of the forum and enter a couple of search terms and you will find lots of examples.

    Also go to the WIKI section at the top also and look at the projects there.

    Good luck and keep asking questions.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

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


    Did you find this post helpful? Yes | No

    Default Re: need help!!! >> 2 channel SPWM variable duty cycle.

    Quote Originally Posted by Antorbd04 View Post
    HOW I ADD VARIABLE CODE TO MY PROJECT????
    SSPWM was only for 1 channel.

    For multiple channels, use Multi_SPWM
    http://www.pbpgroup.com/modules/wfse...p?articleid=12
    DT

  5. #5
    Join Date
    Sep 2013
    Location
    Dhaka, Bangladesh
    Posts
    20


    Did you find this post helpful? Yes | No

    Default Re: need help!!! >> 2 channel SPWM variable duty cycle.

    Quote Originally Posted by darrel taylor View Post
    sspwm was only for 1 channel.

    For multiple channels, use multi_spwm
    http://www.pbpgroup.com/modules/wfse...p?articleid=12
    i want a pwm which as output as:
    Name:  1.jpg
Views: 907
Size:  20.8 KB

    but multi_spwm give me a output which as:
    Name:  2.jpg
Views: 749
Size:  20.1 KB

    how i will get my expected output from multi_spwm????

  6. #6
    Join Date
    Sep 2013
    Location
    Dhaka, Bangladesh
    Posts
    20


    Did you find this post helpful? Yes | No

    Default Re: need help!!! >> 2 channel SPWM variable duty cycle.

    Quote Originally Posted by darrel taylor View Post
    sspwm was only for 1 channel.for multiple channels, use multi_spwmhttp://www.pbpgroup.com/modules/wfse...p?articleid=12
    i expect output from this project as picture for inverter slow pwm:::::Attachment 7287

  7. #7
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,597


    Did you find this post helpful? Yes | No

    Default Re: need help!!! >> 2 channel SPWM variable duty cycle.


  8. #8
    Join Date
    Sep 2013
    Location
    Dhaka, Bangladesh
    Posts
    20


    Did you find this post helpful? Yes | No

    Default Re: need help!!! >> 2 channel SPWM variable duty cycle.

    Quote Originally Posted by Demon View Post
    I unable to find something helpful from your link.

  9. #9
    Join Date
    Sep 2013
    Location
    Dhaka, Bangladesh
    Posts
    20


    Did you find this post helpful? Yes | No

    Default Re: need help!!! >> 2 channel SPWM variable duty cycle.

    Quote Originally Posted by Darrel Taylor View Post
    SSPWM was only for 1 channel.

    For multiple channels, use Multi_SPWM
    http://www.pbpgroup.com/modules/wfse...p?articleid=12
    Multi_SPWM not suitable for Inverter project & I tested this for Inverter and the result was worst. Plz modify this Multi_SPWM software.

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


    Did you find this post helpful? Yes | No

    Default Re: need help!!! >> 2 channel SPWM variable duty cycle.

    What else ???

    a cup of "Nespresso" ???

    May be you want to rent someone's knowledge ???

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

  11. #11
    Join Date
    Sep 2013
    Location
    Dhaka, Bangladesh
    Posts
    20


    Did you find this post helpful? Yes | No

    Default Re: need help!!! >> 2 channel SPWM variable duty cycle.

    Quote Originally Posted by Acetronics2 View Post
    What else ???

    a cup of "Nespresso" ???

    May be you want to rent someone's knowledge ???

    Alain
    hello bro,
    I just need help that I post. But you mean something different. I don't want to rent someone knowledge.

  12. #12
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: need help!!! >> 2 channel SPWM variable duty cycle.

    What he is trying to say is, when you make a statement like the following:
    "Multi_SPWM not suitable for Inverter project & I tested this for Inverter and the result was worst. Plz modify this Multi_SPWM software."
    it makes us think you want us to do the project for you. You got the routine for free but you don't understand how it works. Now you want someone to please fix it for you. Don't you know any thing about the language? Don't you understand the processor you are working with. People are here to help but, not to re-write someone elses code to suite you. I see this all the time, someone asking for the forum members to write there code for them.

    Just my 2 cents worth.....
    Dave Purola,
    N8NTA
    EN82fn

  13. #13
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,597


    Did you find this post helpful? Yes | No

    Default Re: need help!!! >> 2 channel SPWM variable duty cycle.

    Quote Originally Posted by Antorbd04 View Post
    I unable to find something helpful from your link.
    You want channel 2 to be the exact opposite of channel 1 and don't see how an inverter could be handy?

    I suggest you google <electronic tutorial logic gates>.

    Robert

Similar Threads

  1. Duty Cycle
    By Gord11 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 29th September 2011, 08:53
  2. 3 channel PWM with customize duty cycle
    By photoelectric in forum mel PIC BASIC Pro
    Replies: 56
    Last Post: - 16th May 2011, 13:49
  3. How can I measure Duty cycle ?
    By MaxiBoost in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 28th December 2006, 15:02
  4. PWM _ Duty Cycle in Tenths
    By rwskinner in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 17th May 2004, 12:09
  5. Duty Cycle Dilemmas
    By crankshaft in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 27th February 2003, 12:40

Members who have read this thread : 1

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