Usage of the same timer for 2 modules

Status
Not open for further replies.

alexsoad

Newbie level 6
Joined
Apr 4, 2011
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,384
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.
 

Now, for my IC module, i do not have any timer left available.
Yes, obviously. You can either go for software PWM generation or software event capture, depending on your required timing accuracy. Or use a processor with more independant working timers, e.g. a dsPIC33 motor controller.
 
"bit 7 ICTMR: Input Capture Timer Select bits
1 = TMR2 contents are captured on capture event
0 = TMR3 contents are captured on capture event
Note: Timer selections may vary. Refer to the device data sheet for details. "


What should i do with this if i use a software timer?
It looks like IC module must have a hardware timer configurated in ICxCON: Input Capture x Control Register
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…