Chapter 6 8-bit Timers

6-11-2 Setup Example

„Remote Control Carrier Output Setup Example (Timer 0, Timer 5)

Here is the setting example that the RMOUT pin outputs the 1/3 duty carrier pulse signal with "H" period of 36.7 kHz, by using timer 0. The source clock of timer 0 is set to fosc (at 8 MHz).

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

Base period set by timer 0 (36.7 kHz)

Base period set by timer 0

RMOUT output (1/3 duty)

Figure 6-11-3 Output Wave Form of RMOUT Output Pin

 

 

Setup Procedure

 

 

Description

 

 

 

 

(1)

Disable the remote control carrier

(1)

Set the RMOEN flag of the remote control

 

output.

 

 

 

carrier output control register (RMCTR) to "0"

 

RMCTR (x'3F6E')

 

 

to disable the remote control carrier output.

 

bp3

: RMOEN

= 0

 

 

(2)

Select the base cycle setting timer.

(2)

Set the RMBTMS flag of the RMCTR register

 

RMCTR (x'3F6E')

 

 

to "0" to set the timer as a base cycle setting

 

bp0

: RMBTMS

= 0

 

timer.

(3)

Select the carrier output duty.

(3)

Set the RMDTY0 flag of the RMCTR register to

 

RMCTR (x'3F6E')

 

 

"1" to select 1/3 duty.

 

bp1

: RMDTY0

= 1

 

 

(4)

Stop the counter.

 

(4)

Set the TM0EN flag of the timer 0 mode

 

TM0MD (x'3F54')

 

 

register (TM0MD) to stop the timer 0 counting.

 

bp3

: TM0EN

= 0

 

 

(5)

Set the remote control carrier output of

(5)

Set the P1OMD0 flag of the port 1 output mode

 

the special function pin.

 

 

register (P1OMD) to "1" to set P10 pin as a

 

P1OMD (x'3F2F')

 

 

special function pin.

 

bp0

: P1OMD0

= 1

 

Set the P1DIR0 flag of the port 1 direction

 

P1DIR (x'3F31')

 

 

control register (P1DIR) to "1" for output mode.

 

bp0

: P1DIR0

= 1

 

Set the TM0RM flag of the RMCTR register to

 

RMCTR (x'3F6E')

 

 

"1" to select the remote control carrier output.

 

bp4

:TM0RM

= 1

 

 

VI - 44 Remote Control Carrier Output

Page 258
Image 258
Panasonic MN101C77C, F77G user manual Rmoen, Rmbtms, RMDTY0, TM0RM