PWM

Started by clauja81 November 19, 2003
I am working on a proyect where I need to generate four PWM's. As
you know I can generate two of them with pin 26 and 27, but I need
two additionals. Does anybody has a program to generate this
additional PWM ?



--- In , "clauja81" <claudiaj@u...> wrote:
> I am working on a proyect where I need to generate four PWM's. As
> you know I can generate two of them with pin 26 and 27, but I need
> two additionals. Does anybody has a program to generate this
> additional PWM ?

I would consider using the Dallas DS1050. There is sample code at
http://www.phanderson.com/basicx/

Peter H Anderson, http://www.phanderson.com


From: clauja81 <>

> I am working on a proyect where I need to generate
> four PWM's. As you know I can generate two of them
> with pin 26 and 27, but I need two additionals.
> Does anybody has a program to generate this
> additional PWM ?

Pin 25 is also available, by using Timer2. That makes 3
hardware-based PWM channels. A 4th channel would need to be
software-based.

You could of course set up a task for the 4th channel. Although
not as nice as a hardware PWM, it could execute in the background
from a software point of view, since it's a separate task.

-- Frank Manning
-- NetMedia, Inc.