Hello Srig,
Srig>>I have read the PWM listing that was posted earlier this month and have considered that in my code. I am trying to imitate the fading and slowly turning on effect using pbp using SOFTWARE PWM because the PIC that I am using does not have a HARDWARE PWM. I am running my PIC at 20Mhz. please help.. any advise is greatly appreciated... here is what I am doing....<<
Ok, I will up load my Homemade PWM to you as soon as I get home tonight... It is already tested and working. Can be used on any output pin you want.
One other thing... A Software PWM is different than a Hardware PWM. A Hardware PWM is continous...your chip can be doing things while your PWM is outputting. On a Software PWM, this is not so... You have to complete your PWM before moving on to the next phase of your program.
I notice you are switching between two diodes... in the *middle* of your homemade PWM.... that could be a problem, and could explain your "Flickering". I did not sort through your code, I just noticed this.
Dwayne
Last edited by Dwayne; - 31st August 2004 at 20:02.
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
Bookmarks