pwm 2+2
Posted: Mon Dec 28, 2009 10:36 pm
Hello,
this is more of a PIC specialist question:
I am using dsPIC33fj128mc802, and I need to generate 4 PWM signals:
to drive 2 DC brushed motors (same frequency around 10 kHz but independent duty cycle)
and 2 "modeller" servos (same frequency 50Hz but independent duty cycle)
my question is: is it possible to generate 2 PWM on one PWM module each with different frequency?
I have tried it out, but I have got error from the compiler (I do not have my DevKit with me right now, so HW testing is not possible at the moment).
Please excuse me, I am quite a beginner...
I will appreciate any help and/or advices
Thanks
Kind regards
Josef
UPDATE: I have tried removing second servo PWM (removed PWM2_motor block) and it was compiled without an error (having on PWM1_motor block 3 channels with 2 different frequencies) On one hand this may mean that it can be done, but on the other: I am more confused: why it does not work?
this is more of a PIC specialist question:
I am using dsPIC33fj128mc802, and I need to generate 4 PWM signals:
to drive 2 DC brushed motors (same frequency around 10 kHz but independent duty cycle)
and 2 "modeller" servos (same frequency 50Hz but independent duty cycle)
my question is: is it possible to generate 2 PWM on one PWM module each with different frequency?
I have tried it out, but I have got error from the compiler (I do not have my DevKit with me right now, so HW testing is not possible at the moment).
Please excuse me, I am quite a beginner...
I will appreciate any help and/or advices
Thanks
Kind regards
Josef
UPDATE: I have tried removing second servo PWM (removed PWM2_motor block) and it was compiled without an error (having on PWM1_motor block 3 channels with 2 different frequencies) On one hand this may mean that it can be done, but on the other: I am more confused: why it does not work?