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
Channel Name Abbreviation R/W Value Address
1 Timer control register TCR R/W H'38 H'FFC0
Duty register DTR R/W H'FF H'FFC1
Timer counter TCNT R/(W)* H'00 H'FFC2
2 Timer control register TCR R/W H'38 H'FFC4
Duty register DTR R/W H'FF H'FFC5
Timer counter TCNT R/(W)* H'00 H'FFC6
3 Timer control register TCR R/W H'38 H'FFC8
Duty register DTR R/W H'FF H'FFC9
Timer counter TCNT R/(W)* H'00 H'FFCA
* 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'FFC2, H'FFC4, H'FFCA
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 76543210
Initial value 00000000
Read/Write R/W R/W R/W R/W R/W R/W R/W R/W
229
Downloaded from Elcodis.com electronic components distributor