Chapter 6 8-bit Timers
VI - 44
Remote Control Carrier Output
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.
(1) Set the RMOEN flag of the remote control
carrier output control register (RMCTR) to "0"
to disable the remote control carrier output.
(2) Set the RMBTMS flag of the RMCTR register
to "0" to set the timer as a base cycle setting
timer.
(3) Set the RMDTY0 flag of the RMCTR register to
"1" to select 1/3 duty.
(4) Set the TM0EN flag of the timer 0 mode
register (TM0MD) to stop the timer 0 counting.
(5) Set the P1OMD0 flag of the port 1 output mode
register (P1OMD) to "1" to set P10 pin as a
special function pin.
Set the P1DIR0 flag of the port 1 direction
control register (P1DIR) to "1" for output mode.
Set the TM0RM flag of the RMCTR register to
"1" to select the remote control carrier output.
Setup Procedure Description
(1) Disable the remote control carrier
output.
RMCTR (x'3F6E')
bp3 : RMOEN = 0
(2) Select the base cycle setting timer.
RMCTR (x'3F6E')
bp0 : RMBTMS = 0
(3) Select the carrier output duty.
RMCTR (x'3F6E')
bp1 : RMDTY0 = 1
(4) Stop the counter.
TM0MD (x'3F54')
bp3 : TM0EN = 0
(5) Set the remote control carrier output of
the special function pin.
P1OMD (x'3F2F')
bp0 : P1OMD0 = 1
P1DIR (x'3F31')
bp0 : P1DIR0 = 1
RMCTR (x'3F6E')
bp4 :TM0RM = 1
Base period
set by timer 0
RMOUT output
(1/3 duty)
Base period set
by timer 0 (36.7 kHz)
Figure 6-11-3 Output Wave Form of RMOUT Output Pin