beautypg.com

3 control status register (pcnh, pcnl) – FUJITSU MB91F109 FR30 User Manual

Page 328

background image

304

CHAPTER 14 PWM TIMER

14.3 Control Status Register (PCNH, PCNL)

The control status register (PCNH, PCNL) is used to control the PWM timer or indicate
the timer status. Note that the register has a bit that cannot be rewritten during PWM
timer operation.

Configuration of Control Status Registers (PCNH, PCNL)

The configuration of the control status register (PCNH, PCNL) is shown below:

Bit Functions of Control Status Registers (PCNH, PCNL)

[bit 15] CNTE: Timer enable bit

This bit enables or disables the 16-bit decrementing counter.

[bit 14] STGR: Software trigger bit

Setting this bit to "1" enables a software trigger.

A read instruction always reads "0" from this bit.

[bit 13] MDSE: Mode select bit

This bit selects PWM operation that outputs continuous pulses or one-shot operation that
outputs a single pulse.

PCNH

bit

15

14

13

12

11

10

9

8

Address: ch0

0000E6

H

ch1 0000EE

H

CNTE STGR MDSE RTRG CKS1

CKS0 PGMS

ch2 0000F6

H

ch3 0000FE

H

R/W

R/W

R/W

R/W

R/W

R/W

R/W

0

0

0

0

0

0

0

PCNL

bit

7

6

5

4

3

2

1

0

Address: ch0

0000E7

H

ch1 0000EF

H

EGS1

EGS0

IREN

IRQF

IRS1

IRS0

POEN

OSEL

ch2 0000F7

H

ch3 0000FF

H

R/W

R/W

R/W

R/W

R/W

R/W

R/W

R/W

0

0

0

0

0

0

0

0

Attribute

Attribute

Initial value

Initial value

Rewriting enabled/disabled

during operation

Rewriting enabled/disabled

during operation

0

Disable (Initial value)

1

Enable

0

PWM operation (Initial value)

1

One-shot operation