Re: 中斷時間怎麼算呢?
|
||||
---|---|---|---|---|
資深會員
|
1.請問主振盪器接Crystal,那Fosc就是Crystal的頻率嗎?
那麼計時器使用內部指令週期計數的話,是不是就要Fosc/4呢? 是的 ! 除非你有使用 PLL 倍頻 不然 Fosc 就是 Crystal 的頻率
發表於: 2007/5/1 2:08
|
|||
|
Re: 中斷時間怎麼算呢?
|
||||
---|---|---|---|---|
中級會員
|
1.請問主振盪器接Crystal,那Fosc就是Crystal的頻率嗎?
那麼計時器使用內部指令週期計數的話,是不是就要Fosc/4呢? 謝謝版大!
發表於: 2007/4/30 17:37
|
|||
|
Re: 中斷時間怎麼算呢?
|
||||
---|---|---|---|---|
版主
|
1. 若Timer0使用外部Clock輸入,TOCKI 是直接進入到 Timer0 不需再除四。
2. 不是,那是主振盪器要接Crystal用的。
發表於: 2007/4/30 10:13
|
|||
|
Re: 中斷時間怎麼算呢?
|
||||
---|---|---|---|---|
中級會員
|
想請教一下
就是 1.如果把T0CS設為1(使用TOCKI腳位脈波變化) 使用Externl Clock Input的話 那在計算指令週期時的Fosc還要除以4嗎? 還是就以送進去多少的Fosc直接計算呢? 2.請問外部的時脈,是從OSC1/CLCKI/RA7及OSC2/CLCKO/RA6這2隻腳位送進去的嗎?
發表於: 2007/4/28 18:06
|
|||
|
Re: 中斷時間怎麼算呢?
|
||||
---|---|---|---|---|
版主
|
看 Timer0 的方塊圖,PSA=1 使用 1:1 的輸入,所以送到 Timer0 的頻率為 Fosc/4= Fcy (指令週期)。
(48MHz/4) / 65536 = 183.1Hz = 5.46mS 中斷一次
發表於: 2007/4/27 11:47
|
|||
|