
12.1.4 Register Configuration
The PWM timer module has three registers for each channel as listed in table12-2.
Table 12-2 PWM Timer Registers
Initial
Value
H'38
H'FF
H'00
H'38
H'FF
H'00
H'38
H'FF
H'00
Channel
1
Name
Timer control register
Duty register
Timer counter
Timer control register
Duty register
Timer counter
Timer control register
Duty register
Timer counter
Abbreviation
TCR
DTR
TCNT
TCR
DTR
TCNT
TCR
DTR
TCNT
R/W
R/W
R/W
R/(W)
*
R/W
R/W
R/(W)
*
R/W
R/W
R/(W)
*
Address
H'FEC0
H'FEC1
H'FEC2
H'FEC4
H'FEC5
H'FEC6
H'FEC8
H'FEC9
H'FECA
2
3
*
The timer counters are read/write registers, but the write function is for test purposes only.
Application programs should never write to these registers.
12.2 Register Descriptions
12.2.1 Timer Counter (TCNT)—H'FEC2, H'FEC4, H'FECA
The PWM timer counters (TCNT) are 8-bit up-counters. When the output enable bit (OE) in the
timer control register (TCR) is set to 1, the timer counter starts counting pulses of an internal
clock source selected by clock select bits 2 to 0 (CKS2 to CKS0). After counting from H'00 to
H'F9, the timer counter repeats from H'00.
The PWM timer counters can be read and written, but the write function is for test purposes only.
Application software should never write to a PW timer counter, because this may have
unpredictable effects.
Bit
7
6
5
4
3
2
1
0
Initial value
0
0
0
0
0
0
0
0
Read/Write
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
235