overflow interrupt??

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

overflow interrupt??

2,626 Views
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.
 
 
Labels (1)
0 Kudos
1 Reply

297 Views
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 Kudos