![](http://datasheet.mmic.net.cn/90000/M30101F3FP_datasheet_3496100/M30101F3FP_64.png)
Under
development
Tentative Specifications REV.C1
Specifications in this manual are tentative and subject to change.
Mitsubishi microcomputers
M30100/M30101/M30102 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Timer
64
(2) Programmable waveform generation mode
In programmable waveform generation mode, the microcomputer, while counting the set values of
timer Y primary and timer Y secondary alternately, outputs from the TYOUT pin a waveform whose
polarity is inverted each time timer Y underflows.
When operating in this mode, always be sure to set the timer Y write control bit to 1, thereby choosing
to write to only the reload registers. In this mode, said pin is always directed for output regardless of
how the direction register for the port P32 that is shared with the output pin is set.
The polarity of the output waveform is set by using the timer Y output level latch. If the timer Y output
level latch is set to 0, the microcomputer outputs a high for the period equal to the set value of timer Y
primary and a low for the period equal to the set value of timer Y secondary alternately. When the timer
starts the output is high at the beginning and when it stops the output returns low. If the timer Y output
level latch is set to 1, the microcomputer outputs a low for the period equal to the set value of timer Y
primary and a high for the period equal to the set value of timer Y secondary alternately. When the
timer starts the output is low at the beginning and when it stops the output returns high. If the Timer Y,
Z Output Control Register’s timer Y programmable waveform generation output switching bit is set to
1, the Port P32 Register value is output synchronously when timer Y secondary underflows.
In this mode also, the waveform output primary period and secondary period can each be extended
0.5 cycles of the count source by setting the timer Y primary waveform extension and timer Y second-
ary waveform extension control bits to 1. This helps to output waveforms with higher resolution.
When using the waveform extension control bits, the frequency and duty cycle of the output waveform
become as shown below.
Waveform frequency: FYOUT=(2xTMYCL)/((2xTYPR+1)+2x(TYSC+1)+(EXPYPR+EXPYSC))
Duty: DYOUT=(2x(TYPR+1)+(EXPYPR)/((2x(TYPR+1)+EXPYPR)+(2x(TYSC+1)+EXPYSC))
TMYCL: Timer Y count source (frequency)
TYPR: Timer Y primary (8-bit)
TYSC: Timer Y secondary (8-bit)
EXPYPR: Timer Y primary waveform extension control bit (1 bit)
EXPYSC: Timer Y secondary waveform extension control bit (1 bit)
In programmable waveform generation mode, if the value of the timer Y primary, timer Y secondary, or
primary or secondary waveform extension control bit is altered, control is exercised in such a way that
the output waveform changes from the beginning of the waveform period (i.e., the timer Y primary
waveform period).
To alter the count value, set the timer Y secondary, primary waveform extension control bit, secondary
waveform extension control bit, and finally the timer Y primary. The values thus set are reflected
collectively at the beginning of the next waveform period after writing to the timer Y primary. (Even
when writing while the timer is idle, the timer Y primary is always the last register to be written.)
In programmable waveform generation mode, an interrupt is generated by only an underflow of the
secondary period.