overflow interrupt??

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

overflow interrupt??

2,718件の閲覧回数
gautier
Contributor II
hello
 
I use a MC9S12A256B microcontroller with codewarrior.
I use the microcontroller to interface a compactflash card to a Digital analog converter.
My routine turn correctly but I want to timing it.
actually the rythm of the transfert depend of the number of lignes in my program.
I want to regulate it by a software timing.
 
I want to enter in a interrupt software every 5us, but I don't understand the principe of the overflow timer (I think I must use it to do this regulation).
 
Can someone help me to do this or guide me to a other solution.
 
I precise that must using the SCI interface in the same time.
 
Thanks for your assistance.
 
Excuse me for spelling mistakes.
 
 
ラベル(1)
0 件の賞賛
返信
1 返信

389件の閲覧回数
imajeff
Contributor III
5 uS is very short, so you certainly do not need the overflow interrupt.

After you initialize the interrupt for TC0, you can say such as "TC0 = TC0 + 120". The +120 means to flag 5 uS from last time, assuming the timer prescaler is 0 (default) and the bus freq is 24 MHz
0 件の賞賛
返信