Panasonic MN101C77C, F77G user manual Count Timing of Timer Operation Timers 0, 1, 4

Models: F77G MN101C77C

1 544
Download 544 pages 59.61 Kb
Page 230
Image 230

Chapter 6 8-bit Timers

„Count Timing of Timer Operation (Timers 0, 1, 4 and 5)

Binary counter counts up with selected clock source as a count clock. The basic operation of the whole function of 8-bit timer is as follows ;

Count

 

 

 

 

 

clock

 

 

 

 

 

TMnEN

 

 

 

 

 

flag

 

 

 

 

 

Compare

M

N

 

 

M

register

 

 

 

 

 

 

 

 

 

 

 

 

(D)

Binary

00

01 02

N-1 N

00

01 02 03

counter

 

 

 

 

 

 

(A)

(B)

 

(C)

(E)

Interrupt

 

 

 

 

 

request flag

 

 

 

 

 

Figure 6-3-1 Count Timing of Timer Operation (Timers 0, 1, 4 and 5)

(A)If the value is written to the compare register during the TMnEN flag is "0", the binary counter is cleared to x'00', at the writing cycle.

(B)If the TMnEN flag is "1", the binary counter is started to count.

The counter starts to count up at the falling edge of the count clock.

(C)If the binary counter reaches the value of the compare register, the interrupt request flag is set at the next count clock, then the binary counter is cleared to x'00' and the counting is restarted.

(D)Even if the compare register is rewritten during the TMnEN flag is "1", the binary counter is not changed.

(E)If the TMnEN flag is "0", the binary counter is stopped.

When the binary counter reaches the value in the compare register, the interrupt request flag is set and the binary counter is cleared, at the next count clock. So set the compare register as:

Compare register setting = (count till the interrupt request - 1)

If the compare register is set the smaller than the binary counter during the count operation, the binary counter counts up to the overflow, at first.

If the interrupt is enabled, the timer interrupt request flag should be cleared before timer operation is started.

The timer n interrupt request generation (at TMnOC = x'00') has the same waveform at TMnOC = x'01'.

VI - 16 8-bit Timer Count

Page 230
Image 230
Panasonic MN101C77C, F77G user manual Count Timing of Timer Operation Timers 0, 1, 4