![](http://datasheet.mmic.net.cn/30000/M30102F3TFP_datasheet_2358625/M30102F3TFP_77.png)
Under
development
Tentative Specifications REV.E1
Specifications in this manual are tentative and subject to change.
Mitsubishi microcomputers
M30100/M30102 Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Timer Y
76
(2) Programmable waveform generation mode
In this mode, the microcontroller, while counting the set values of Timer Y primary and Timer Y sec-
ondary alternately, outputs from the TYOUT pin a waveform whose polarity is inverted each time Timer
Y primary or Timer Y secondary underflows. (See Table 1.14.9) A counting starts by counting the set
value in the Timer Y primary. Figure 1.14.18 shows Timer Y, Z mode register in programmable wave-
form generation mode. Figure 1.14.19 shows the operation example.
Item
Specification
Count source
f1, f8, ring oscillator output, fC32
Count operation
Down count
When the timer underflows, it reloads the contents of primary reload register and sec-
ondary reload register alternately before continuing counting.
When a counting stops, the timer reloads the content of the reload register before it
stops.
Divide ratio
fi/(n+1)/((m+1)+(l+1))
n : Set value of Prescaler Y, m: Set value of Timer Y primary, l: Set value of Timer Y secondary
Count start condition
Count start flag is set (=1)
Count stop condition
Count start flag is reset (=0) (Note 1)
Interrupt request generation timing When Timer Y underflows during secondary period
TYOUT pin function
Pulse output (Note 2)
Read from timer
Count value can be read out by reading Timer Y primary register.
Same applies to Prescaler Y register. (Note 3)
Write to timer
When a value is written to Timer Y primary register, it is written to only reload register.
Same applies to Timer Y secondary register and Prescaler Y register. (Note 4)
Select function
Output level latch select function
The output level of a waveform being counted during primary and secondary periods is
selectable.
Programmable waveform generation output switching function
Can select either programmable waveform or the value of Port P32 register for output.
(Note 5)
Waveform extend function (Note 6)
The waveform output primary period and secondary period can each be extended 0.5
cycles of the count source
Frequency when waveform extended: 2xfi/((2x(m+1))+(2x(l+1))+TYPUM0+TYPUM1)
Duty: (2x(m+1)+TYPUM0)/((2x(m+1)+TYPUM0)+(2x(l+1)+TYPUM1))
m: set value of Timer Y primary, l: set value of Timer Y secondary
TYPUM0: Timer Y primary waveform extension control bit
TYPUM1: Timer Y secondary waveform extension control bit
Note 1: When the count is stopped, the Timer Y interrupt request flag becomes "1" and an interrupt may occur. Thus,
interrupts must be disabled before the count is stopped. Furthermore, set the Timer Y interrupt request flag to "0"
before starting counting again.
Note 2: When the counting stopped, the pin is the secondary period output level.
Note 3: Even when counting the secondary period, read out the Timer Y primary register.
Note 4: The set value of Timer Y secondary register and waveform extension control bits as well as Timer Y primary
register are made effective by writing a value to the Timer Y primary register. The written values are reflected to
the waveform output from the next primary period after writing to the Timer Y primary register.
Note 5: The output is switched in sync with timer Y secondary underflow.
Note 6: When using the waveform extend function, the Prescaler Y register must be set to "0016".
Table 1.14.9. Specifications of programmable waveform generation mode