Chapter 4 Timer Functions

4-5 Time Base Operation

4-5-1 Overview

The clock source for the time base timer can be set to fosc or fx. Also, the interrupt period for time base timer (TBIRQ) can be set to 1/27, 1/28, 1/29, 1/210, or 1/213 of the clock source.

4-5-2 Operation

Time Base Function

Settings for the time base function are listed below.

(1)Use the TM5CK0 flag of the timer 5 mode register (TM5MD) to select fosc or fx as the clock source.

(2)Use the TM5IR2 to 0 flags of the TM5MD register to select the time base timer interrupt source.

(3)When the selected time interval passes, the interrupt request flag of the time base interrupt control register (TBICR) is set.

Time base operation cannot be halted.

 

 

Table 4-5-1

Base Time Settings

 

 

 

TM5IR2 to 0

000

001

010

011

1XX

Clock Source

1

1

1

1

1

27

28

29

210

213

 

20MHz

6.4s

12.8s

25.6s

51.2s

409.6s

fosc

 

 

 

 

 

 

 

8.38MHz

15.2s

30.5s

61.0s

122.0s

976.4s

fx

32.768kHz

3.9ms

7.8ms

15.6ms

31.2ms

250ms

Time Base Operation 77

Page 91
Image 91
Panasonic MN101C00 user manual Time Base Operation, Base Time Settings TM5IR2 to, Clock Source