EasyManua.ls Logo

Panasonic MN103S

Panasonic MN103S
552 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 8
8-bit Timer
Interval Timer VIII - 33
Setting a Timer Base Register
Set the generation cycle of a timer interrupt to the base register TMnBR.
Timer interrupt = (TMnBR setting + 1) × Count clock source cycle
Count Timing of Timer Operation
The binary counter counts down with the selected count source as a count clock. The basic operation of the whole
function of 8-bit timer is as follows:
Figure:8.4.1 Count Timing of Timer Operation (1)
(A) When initialization (“1”) is written to the TMnLDE flag, the value of the base register is loaded into the
binary counter and the timer output (TMnIO) is reset to “L”. Reset the TMnLDE flag to “0” after setting.
(B) When setting the TMnCNE flag to operation enabled (“1”), the binary counter starts to count down. The count
is operated at the rising edge of the count clock.
(C) The underflow interrupt request is generated at the binary counter underflow. The value of the base register is
loaded into the binary counter and counting down restarts. The timer output (TMnIO) changes from “L” to “H”.
(D) When the TMnCNE flag is set to operation disabled (“0”), counting down is stopped. The statuses of the
binary counter and the timer output (TMnIO) are retained after the timer is stopped, unless the TMnCNE flag is
set to be initialized (“1”). The counting down operation can be resumed from the statuses before the timer was
stopped if the TMnCNE is set to (“1”).
(E) When the value of the base register is changed during the counting down operation, the value is loaded into
the binary counter as initial value at the next underflow generation.
..
Set TMnLDE to “0” before manipulating the TMnLDE flag.
..
(A)
(D)
(B) (C)
(E)
N N-1 N-2 01 00 M M-1
NM
Count clock
TMnLDE flag
TMnCNE flag
Base register
Binary counter
Timer output
TMnIO
Interrupt request
flag

Table of Contents

Other manuals for Panasonic MN103S

Related product manuals