Does anybody know how to count the PWM pulses generated by the ccp module (in Flowcode 4.2) ? I want for example to generate 100 pulses from a certain frequency.
Thank you,
Sorin
PWM count
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: PWM count
Hello Sorin,
You should be able to use a delay to do this. eg a count of 100 with a PWM running at 100 hz would take 1 second, at 1000hz would take 100ms etc.
You should be able to use a delay to do this. eg a count of 100 with a PWM running at 100 hz would take 1 second, at 1000hz would take 100ms etc.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: PWM count
Indeed is a great idea. I turn on pwm then I put a desired delay and then I disable pwm and so I will have a defined number of pulses. Thank you very much Benj!
Best regards,
Sorin
Best regards,
Sorin