2 Attachment(s)
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)
Attachment 7281
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
Attachment 7282
HOW I ADD VARIABLE CODE TO MY PROJECT????
HELP ME ANYBODY PLZ.......
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
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.
Re: need help!!! >> 2 channel SPWM variable duty cycle.
Quote:
Originally Posted by
Antorbd04
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
2 Attachment(s)
Re: need help!!! >> 2 channel SPWM variable duty cycle.
Quote:
Originally Posted by
darrel taylor
i want a pwm which as output as:
Attachment 7285
but multi_spwm give me a output which as:
Attachment 7286
how i will get my expected output from multi_spwm????
Re: need help!!! >> 2 channel SPWM variable duty cycle.
Quote:
Originally Posted by
darrel taylor
i expect output from this project as picture for inverter slow pwm:::::Attachment 7287
Re: need help!!! >> 2 channel SPWM variable duty cycle.
Re: need help!!! >> 2 channel SPWM variable duty cycle.
Quote:
Originally Posted by
Demon
I unable to find something helpful from your link.
Re: need help!!! >> 2 channel SPWM variable duty cycle.
Quote:
Originally Posted by
Darrel Taylor
Multi_SPWM not suitable for Inverter project & I tested this for Inverter and the result was worst. Plz modify this Multi_SPWM software.
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
Re: need help!!! >> 2 channel SPWM variable duty cycle.
Quote:
Originally Posted by
Acetronics2
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.
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.....
Re: need help!!! >> 2 channel SPWM variable duty cycle.
Quote:
Originally Posted by
Antorbd04
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