3-2 setup example – Panasonic MN101C77C User Manual

Page 214

Advertising
background image

Chapter 5 Prescaler

V - 12

Operation

Enable the prescaler counting by the PSCEN flag of the prescaler control register (PSCMD). The

prescaler counting is started after it is enabled.

Start the timer operation after the prescaler is set. Also, the selection of the prescaler output should

be set by the timer mode register.

(1)

Select the prescaler output to fosc/16 by the

TM0PSC1-0, TM0BAS flag of the timer 0

prescaler selection register (CK0MD).

(2)

Enable the prescaler counting by setting the

PSCEN flag of the prescaler control register

(PSCMD) to "1".

Setup Procedure

(1)

Select the prescaler output.

CK0MD (x'3F56')

bp2-1

: TM0PSC1-0 = 01

bp0

: TM0BAS

= 0

(2)

Enable the prescaler output.

PSCMD (x'3F6F')

bp0

: PSCEN

= 1

Description

5-3-2

Setup Example

„

Prescaler Setup Example (Timer 0 count clock)

Select the clock of fosc/16 that is output from the prescaler 0, to the count clock of the timer 0.

An example setup procedure , with a description of each step is shown below.

Advertising
This manual is related to the following products: