Usage of the same timer for 2 modules

Status
Not open for further replies.

alexsoad

New Member
Hello,

My dspic (dsPIC30F3014) does have only 3 timers.
For OC module ( output compare ) and IC module ( input capture ) there are available only 2 timers, Timer 2 and Timer 3.
I need to command 2 DC motors, and i use 2 OC modules, using a timer each.
Now, for my IC module, i do not have any timer left available. I need some help with this issue.

Thank you,
Alex.
 
To use the same timer you need to time slice the timer... work out a divisor that will suit both modules ie if module 1 needs 50ms and module 2 needs 100ms the obvious divisor is 2.. then have a post count that will control module 2 only... if you put the timer on a 10ms time slice you then have 2 control counters... first counts 5 the second counts 10
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…