Panasonic MN101C00 User Manual

Page 88

Advertising
background image

Chapter 4 Timer Functions

74

16-bit Timer Operation (timer 4)

[

5-2-3 "Serial Interface

Transfer Timing"]

Setting the Added Pulse Position

The upper 8 bits of compare register 4 (TM4OCH) set the position of the added pulse. If the

TM4OCH register is set to X'00', an additional bit is not appended to the basic PWM

component. If the TM4OCH register is set to X'FF', an additional bit is repeatedly appended

to the 255 basic PWM components during the period. The relation between the value set in

the TM4OCH register and the added pulse is shown in the table below. If X'03' is set in the

TM4OCH register, bits are appended to pulse positions for X'01' and X'02', shown in table

4-3-1. The relation between the value set in the TM4OCH register and the position of the

added bit is shown in figure 4-3-5.

Table 4-3-1 Pulse-Added PWM OutputFigure

Figure 4-3-5 Pulse Added Type PWM Output

TM4OCH

Register setting
value

X '00'

X '01'

X '02'

X '10'

X '08'

X '04'

0

X '40'

X '80'

X 'C0'

X 'FF'

PWM basic component

Repeated 256 times

Position of
added pulse

Position of added pulse X'87'

Position of added pulse X'88'

Value Set in TM4OCH Register

Added Pulse Position (value of Tn)

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 1

1 0 0 0 0 0 0 0

0 1 0 0 0 0 0 0

0 0 1 0 0 0 0 0

0 0 0 1 0 0 0 0

0 0 0 0 1 0 0 0

0 0 0 0 0 1 0 0

0 0 0 0 0 0 1 0

(MSB)

(LSB)

X'80'

X'40',X'C0'

X'20',X'60',X'A0',X'E0'

X'10',X'30',X'50',X'70',X'90',X'B0',X'D0',X'F0'

X'08',X'18',X'28',X'38',X'48',X'58' . . . . .,X'E8',X'F8'

X'04',X'0C',X'14',X'1C',X'24',X'2C' . . . . .,X'F4',X'FC'

X'02',X'06',X'0A',X'0E',X'12',X'16' . . . . .,X'FA',X'FE'

X'01',X'03',X'05',X'07',X'09',X'0B' . . . . .,X'FD',X'FF'

Advertising