i am a beginner in this world of programming i want to switch the transistor in dc dc converter. for my knowledge the transistor can be switched by square wave, i need the sample code here on how to switch this transistor. anyone to help me please
i am a beginner in this world of programming i want to switch the transistor in dc dc converter. for my knowledge the transistor can be switched by square wave, i need the sample code here on how to switch this transistor. anyone to help me please
A square wave is simply turning it on and off. It goes from low to high and repeats.
For example:
This endless loop will turn the pin on and off with a 50msec delay. You could also use the TOGGLE command.Code:DO PORTA.0 = 1 'TURN ON PORTA.0 PAUSE 50 'PAUSE 50mSEC PORTA.0 = 0 'TURN OFF PORTA.0 PAUSE 50 LOOP
Hope this helps!
Search the picbasic manual and the forum for "PWM" and "HPWM"
Top right of the page, Advanced Search, type in HPWM and Enter.
I get 6 pages of threads about HPWM. I find it hard to believe there isn't one good example in all that.
And yes, that is how many of us find examples on how to do stuff. I know it takes a long time, it's tedious, but sorry, that's life.
You also get to pick up interesting tidbits about HPWM on the way through.
Robert
EDIT: If you do encounter problems getting some of the code to work, feel free to post it here along with your question and people will be happy to help you figure it out.
But people will not do all the work for you without you first putting in some effort.
Last edited by Demon; - 20th April 2012 at 18:34.
i got you demon and thanx for your help, i will come back to you if i feel any difficulties
Bookmarks