S12XE TIM Input Capture

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

S12XE TIM Input Capture

跳至解决方案
570 次查看
rayhall
Contributor V

Hello,

 

I cannot get the TIM input capture interrupt to work. I have a square wave signal connected to pin PP0. I want an interrupt on both edges.

 

I have made a simple test project. I have attached the code.

 

Please do not mark this question as "Assumed Answered" until I confirm the answer is correct or solved.

 

Thank you,

 

Ray.

Original Attachment has been moved to: TIM_Capture.zip

标签 (1)
0 项奖励
1 解答
421 次查看
kef2
Senior Contributor IV

Have a look at PTRRR register. By default TIM is routed to port R.

在原帖中查看解决方案

0 项奖励
2 回复数
422 次查看
kef2
Senior Contributor IV

Have a look at PTRRR register. By default TIM is routed to port R.

0 项奖励
421 次查看
rayhall
Contributor V

Edward,

Thank you. I am using the 144 pin S12XE so it has no Port R.

I have attached the working version as it may help others.

Ray.

0 项奖励