I have a small project which is based on 56F803. I am going to use Timer A0 as a free running 1 ms clock, and Timer A1 and Timer A2 are both based on Timer A0 output. Anyone know how to set the beans for Timer A1 & A2?
There are two possible approaches.
1) Task approach - Processor Expert is generally task-orinted so unless it's really necessary you should not ask "how to connect two timers", but the questions should be "how to produce 1ms periodic interrupt" or "how to ouptut PWM pulses on a specific pin with given period etc..". This way you can use beans like TimerInt, PPG, FreeCntr etc... that allow to use chained timers for achieving long times. PE generates initialization code and runtime methods for you.
2) Peripheral approach - If it's necessary or you really want to handle low-level peripheral configuration including advanced fuatures, you can use peripheral init beans.They are peripheral specific. In your case, you can add three Init_TMR beans into the project (one for each timer) and configure their properties (Primary and secondary clock source, operation mode etc.)
best regardsPetr HradskyProcessor Expert Support Team
Hi Petr Hradsky,
The reason I am asking how to connect two timers is because I have many timers and the DSP is not able to provide enough resources to do it if they are not shared. For example, I want to have timers of 1ms, 1s, 5s, ... 1hours. In order to save resources, I need to let TimerA0 does 1ms, and TimerA0 & TimerA1 do 1s, ... However, if I use Processor Expert to configure TimerA0 for 1ms free run, I am not able to use TimerA01 for 1s (it says the TimerA0 has already been used).
I am not familiar with Peripheral approach, but I think I will try it. Thank you for your help.
you can do it with one single timer.
Retrieving data ...