prescale timer -ADC

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

prescale timer -ADC

2,516 次查看
Halom
Contributor I
Hi ,
I would like to know how should I prescale the AD converter if the timer has been prescale at 4 Mhz instead to 8 Mhz. 
I am using the MC9S12C32 in a program involving timer interrupt.
 I have some problem to understand it because the ADC has a max clock of 2 Mhz.
 
Thank you
 
标签 (1)
0 项奖励
回复
1 回复

693 次查看
kef
Specialist I
You should select ATD prescaler so that busclock divided by prescaler is not higher than 2MHz (see ATD specs) and not less than 0.5MHz (again see ATD specs).
Suppose you use 8MHz crystal and no PLL. Then busclock is 4MHz. You can divide this at least by 2 and 2MHz. At the other hand you can divide 4MHz bus clock not more than 8 times, 4MHz /8=0.5MHz.
In datasheet table 8-8 you may see that Prescale Value bits are from binary 00000 to 00011.
0 项奖励
回复