NEC PD754144 User Manual page 168

4-bit single-chip microcontrollers
Table of Contents

Advertisement

(3) Application of CG mode
To use the timer counter as a carrier generator for remote controller signal transmission
The examples shown below apply to the operation of the µ PD754244 at f
operation of the µ PD754244 and f
periods are different even if the settings are the same.
<1> To generate a carrier clock with a frequency of 38.0 kHz (cycle of 26.3 µ s) and a duty factor of 1/3
• Set the higher 4 bits of the timer counter mode register (TM2) to 0011B and select 61.0 µ s as the
longest set time.
• Set the lower 4 bits of TM2 to 1111B, and select the CG mode and count operation. Then, issue
the timer start command.
• Set the timer counter output enable flag (TOE2) to "1" to enable timer output.
• Set the high-level period setting timer counter modulo register (TMOD2H) as follows.
26.3 µ s
1
.
3
238 ns
• The set value of the timer counter modulo register (TMOD2) is as follows.
26.3 µ s
2
.
3
238 ns
<Program example>
SEL
MB15
MOV
XA, #024H
MOV
TMOD2H, XA
MOV
XA, #49H
MOV
TMOD2, XA
MOV
XA, #00111111B
MOV
TM2, XA
168
CHAPTER 6 PERIPHERAL HARDWARE FUNCTION
= 1.0 MHz operation of the µ PD754144, the cycles and signal output
CC
– 1 = 36.8 – 1
36 = 24H
– 1 = 73.7 – 1
73 = 49H
;
or CLR1 MBE
;
Sets modulo (high-level period)
;
Sets modulo (low-level period)
;
Sets mode and starts timer
User's Manual U10676EJ3V0UM
= 4.19 MHz. With f
= 6.0 MHz
X
X

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pd754244

Table of Contents