Regarding Timer value calculation

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

Regarding Timer value calculation

1,255 次查看
maharajsankaran
Contributor I

Hi All,

We are using Freescale MPC5534.

we nedd to configure the timer for 2ms.

crystal value=16Mhz.we didn't get that formula.

Please share us, if any one known.

Thanks in advance.

标签 (1)
0 项奖励
回复
1 回复

1,103 次查看
martin_kovar
NXP Employee
NXP Employee

Hi,

the general formula is next:  comparation value = (oscilator_frequency / prescaler) * time.

In your case it could be for example:  (16 000 000 / 256)*0.002 = 125 = 7DH.

Martin

0 项奖励
回复