Can each channel have different duty cycles?
This is quite a bit over my head, could you post a code example?
Can each channel have different duty cycles?
This is quite a bit over my head, could you post a code example?
Best Regards,
Kurt A. Kroh
KrohTech
“Goodbye and thanks for all the fish”
As many as can be had. Only limitation is processor cycles. Depending on what freq the PWM gets run at, you end up running out of enough cycles to adjust all of the channel's PWM's in the main loop and might run out of cycles in the interrupt loop to update all of the channels before the next interrupt hits.
I need at least 16-24 channels, i will investigate more on the forum, if anyone have spotted something useful please be nice to post it here
That's exactly what I've done in C but that wasn't refresh at the same speed at yours... i was running the outputs @ 220.4 hz but the effects that i need to do with the leds wasn't good , kinda jerky sometimes even with 48mhz (12mips) clock, I ran out off juice :S !Just a simple Tmr0 overflow running as fast as it can... When the interrupt hits, I update the channels/pins according to their duty cycle 'register' variable. Outside the interrupt sub, in the main loop, I update the duty cycle 'register' itself depending on whatever I'm doing.
Btw,skimask why not post it to the code examples or a little example here? I respect your work, if you don't want to share your code it's ok i understand that...
Have a nice day you guys!
You really helped me
I really love this forum, every time i come, i learn something :P
Best Regards,
Laurent
Last edited by ELCouz; - 9th February 2008 at 10:27.
Exactly which piece of work do you respect the most?
Most people don't respect my work at all, if only because it's basically unreadable, as I'm sure it would be to you. The style of coding I've chosen and use is almost unreadable to the person that's not used to it. Ask anybody that's been around awhile, they'll tell you the same thing. The High Colonic Master...yep...that's me...![]()
And: what : makes : your : coding : style : different : than : anyone : elses :....;o}
Last edited by Archangel; - 9th February 2008 at 20:35.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Hi Laurent
I have had great sucess with Darrel's DT_INTS-18 and SPWM_INT . I am doing 16 ch of PWM on a pic 18F2410 32 MHz. The pwm is running at 100Hz 8 bit resolution.
Thanks Darrel (I never tire of saying that)
take a look at this thread:
http://www.picbasic.co.uk/forum/showthread.php?t=8088
Best Regards,
Kurt A. Kroh
KrohTech
“Goodbye and thanks for all the fish”
Hi,
Just a little update, sorry for being late to answer I've be on a road trip to Quebec all the weekend ... yeah rock - on :P
Well I'm tired so i will investigate further your nice posts guys tomorrow.
See ya kids :P hehe
Best Regards,
Laurent
It works !!!
I'm using the Darrel Taylor's DT_INTS-18 & SPWM_INT code.
Everything is running smooth!
Thanks everyone for the help!
Have a nice day,
Best Regards,
Laurent
Bookmarks