![](http://datasheet.mmic.net.cn/330000/MB90P224BPF_datasheet_16438137/MB90P224BPF_45.png)
45
MB90220 Series
6. PWC (Pulse Width Count) Timer
The PWC (pulse width count) timer is a 16-bit multifunction up-count timer with an input-signal pulse-width count
function and a reload timer function. The hardware configuration of this module is a 16-bit up-count timer, an
input pulse divider with divide ratio control register, four count input pins, and a 16-bit control register. Using
these components, the PWC timer provides the following features:
Timer functions:
An interrupt request can be generated at set time intervals.
Pulse signals synchronized with the timer cycle can be output.
The reference internal clock can be selected from among three internal clocks.
The time between arbitrary pulse input events can be counted.
The reference internal clock can be selected from among three internal clocks.
Various count modes:
“H” pulse width (
↑
to
↓
)/“L” pulse width (
↓
to
↑
)
Rising-edge cycle (
↑
to
↑
/Falling-edge cycle (
↓
to
↓
)
Count between edges (
↑
or
↓
to
↓
or
↑
)
Cycle count can be performed by 2
2n
division (n = 1, 2, 3, 4) of the input
pulse, with an 8 bit input divider.
An interrupt request can be generated once counting has been performed.
The number of times counting is to be performed (once or subsequently) can
be selected.
Pulse-width count functions:
The MB90220 series has four channels for this module.
(1) Register Configuration
bit15
STRT
bit14
STOP
bit13
EDIR
bit12
EDIE
bit11
OVIR
bit10
OVIE
bit9
ERR
POUT
bit8
000051
H
000053
H
000055
H
000057
H
bit7
CKS1
bit6
CKS0
bit5
PIS1
bit4
PIS0
bit3
S/C
bit2
MOD1
bit1
MOD1
MOD0
bit0
000050
H
000052
H
000054
H
000056
H
001F01
H
001F03
H
001F05
H
001F07
H
001F00
H
001F02
H
001F04
H
001F06
H
PWCSR0
PWCSR1
PWCSR2
PWCSR3
00000000
B
PWCSR0
PWCSR1
PWCSR2
PWCSR3
00000000
B
PWCR0
PWCR1
PWCR2
PWCR3
00000000
B
PWCR0
PWCR1
PWCR2
PWCR3
00000000
B
bit7
bit6
bit5
bit4
bit3
bit2
bit1
bit0
Register name Address
Register name Address
Register name Address
Register name Address
(R/W)
(R/W)
(R)
(R/W)
(R/W)
(R/W)
(R)
(R/W)
Initial value
Initial value
Initial value
Initial value
bit15
bit14
bit13
bit12
bit11
bit10
bit9
bit8
(R/W)
(R/W)
(R/W)
(R/W)
(R/W)
(R/W)
(R/W)
(R/W)
(R/W)
(R/W)
(R/W)
(R/W)
(R/W)
(R/W)
(R/W)
(R/W)
(R/W)
(R/W)
(R/W)
(R/W)
(R/W)
(R/W)
(R/W)
(R/W)
PWC Control Status Register 0 to 3 (PWCSR0 to PWCSR3)
PWC Data Buffer Register 0 to 3 (PWCR0 to PWCR3)