PDA

View Full Version : PWM and I2C



GRob
- 16th December 2004, 14:24
Hi

I have an application where I want to dim 4 LED circuits (all at different intensities and continually changing) using PWM. The two options I am looking at as a micro have a maximum of two HPWM outputs, so I am looking for a chip that will talk I2C and drive 2 or 4 PWM outputs. I have located the Philips PCA9530 but it seems hard to come by in small quantities, likewise with a Mitsubishi/Renesas M66242. Any ideas? I could go down the line of a I2C DAC and then a seperate Analogue driven PWM but it seems a roundabout way to do it.

Cheers
Grant

NavMicroSystems
- 16th December 2004, 17:44
Probably this helps:

http://www.picbasic.co.uk/forum/showthread.php?s=&threadid=622&highlight=hpwm

regards

mister_e
- 16th December 2004, 19:00
Hum... great link if your application do only that. Simple and easy to do indeed.

In case you want to do something else than fading in/out, you can use internal timer to produce as many outputs as you want.

In the main program you set the Duty Cycle and then in the Interrupts you set the outputs regarding the duty you set. By this way you don't need any external parts too.

GRob
- 17th December 2004, 10:03
Cheers

I am using a picaxe (maybe this is not the best forum to be on??) so my speed is not fast and I have been led to believe through web searching that it would be a struggle to do 4 software PWM alongside other processing on a picaxe (4Mhz). I do not have the programming skills to do this project with assembly code on a std pic, - hence my roundabout way of approaching it with an external quad PWM device.

GR