NEC PD754144 User Manual

Page 168

Advertising
background image

CHAPTER 6 PERIPHERAL HARDWARE FUNCTION

168

User’s Manual U10676EJ3V0UM

(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

X

= 4.19 MHz. With f

X

= 6.0 MHz

operation of the

µPD754244 and f

CC

= 1.0 MHz operation of the

µPD754144, the cycles and signal output

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.

– 1 = 36.8 – 1

36 = 24H

•

The set value of the timer counter modulo register (TMOD2) is as follows.

– 1 = 73.7 – 1

73 = 49H

<Program example>

SEL

MB15

;

or CLR1 MBE

MOV

XA, #024H

MOV

TMOD2H, XA

;

Sets modulo (high-level period)

MOV

XA, #49H

MOV

TMOD2, XA

;

Sets modulo (low-level period)

MOV

XA, #00111111B

MOV

TM2, XA

;

Sets mode and starts timer

1

26.3

µs

3

238 ns

2

26.3

µs

3

238 ns

.

.

Advertising
This manual is related to the following products: