20.07.2015 Views

M16C/62 Group DATASHEET

M16C/62 Group DATASHEET

M16C/62 Group DATASHEET

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Timers’ functions for three-phase motor controlMitsubishi microcomputers<strong>M16C</strong> / <strong>62</strong> <strong>Group</strong>SINGLE-CHIP 16-BIT CMOS MICROCOMPUTERTriangular wave modulationTo generate a PWM waveform of triangular wave modulation, set “0” in the modulation mode select bit(bit 6 at 034816). Also, set “1” in the timers A4-1, A1-1, A2-1 control bit (bit 1 at 034916). In this mode, eachof timers A4, A1, and A2 has two timer registers, and alternately reloads the timer register’s content to thecounter every time timer B2 counter’s content becomes 000016. If “0” is set to the effective interruptoutput specification bit (bit 1 at 034816), the frequency of interrupt requests that occur every time the timerB2 counter’s value becomes 000016 can be set by use of the timer B2 counter (034D16) for setting thefrequency of interrupt occurrences. The frequency of occurrences is given by (setting; setting ≠ 0).Setting “1” in the effective interrupt output specification bit (bit 1 at 034816) provides the means to choosewhich value of the timer A1 reload control signal to use, “0” or “1”, to cause timer B2’s interrupt request tooccur. To make this selection, use the effective interrupt output polarity selection bit (bit 0 at 034816).An example of U phase waveform is shown in Figure 1.18.6, and the description of waveform outputworkings is given below. Set “1” in DU0 (bit 0 at 034A16). And set “0” in DUB0 (bit 1 at 034A16). Inaddition, set “0” in DU1 (bit 0 at 034B16) and set “1” in DUB1 (bit 1 at 034B16). Also, set “0” in the effectiveinterrupt output specification bit (bit 1 at 034816) to set a value in the timer B2 interrupt occurrencefrequency set counter. By this setting, a timer B2 interrupt occurs when the timer B2 counter’s contentbecomes 000016 as many as (setting) times. Furthermore, set “1” in the effective interrupt output specificationbit (bit 1 at 034816), set “0” in the effective interrupt polarity select bit (bit 0 at 034816) and set "1" inthe interrupt occurrence frequency set counter (034D16). These settings cause a timer B2 interrupt tooccur every other interval when the U phase output goes to “H”.When the timer B2 counter’s content becomes 000016, timer A4 starts outputting one-shot pulses. In thisinstance, the content of DU1 (bit 0 at 034B16) and that of DU0 (bit 0 at 034A16) are set in the three-phaseoutput shift register (U phase), the content of DUB1 (bit 1 at 034B16) and that of DUB0 (bit 1 at 034A16)___are set in the three-phase shift register (U phase). After triangular wave modulation mode is selected,however, no setting is made in the shift register even though the timer B2 counter’s content becomes000016.___The value of DU0 and that of DUB0 are output to the U terminal (P80) and to the U terminal (P81)respectively. When the timer A4 counter counts the value written to timer A4 (038F16, 038E16) and whentimer A4 finishes outputting one-shot pulses, the three-phase shift register’s content is shifted one posi-___tion, and the value of DU1 and that of DUB1 are output to the U phase output signal and to U phase outputsignal respectively. At this time, one-shot pulses are output from the timer for setting dead time used for___setting the time over which the “L” level of the U phase waveform does not lap over the “L” level of the Uphase waveform, which has the opposite phase of the former. The U phase waveform output that startedfrom the “H” level keeps its level until the timer for setting dead time finishes outputting one-shot pulseseven though the three-phase output shift register’s content changes from “1” to “0” by the effect of theone-shot pulses. When the timer for setting dead time finishes outputting one-shot pulses, "0" alreadyshifted in the three-phase shift register goes effective, and the U phase waveform changes to the "L"level. When the timer B2 counter’s content becomes 000016, the timer A4 counter starts counting thevalue written to timer A4-1 (034716, 034616), and starts outputting one-shot pulses. When timer A4 finishesoutputting one-shot pulses, the three-phase shift register’s content is shifted one position, but if thethree-phase output shift register’s content changes from “0” to “1” as a result of the shift, the output levelchanges from “L” to “H” without waiting for the timer for setting dead time to finish outputting one-shotpulses. A U phase waveform is generated by these workings repeatedly. With the exception that thethree-phase output shift register on the U phase side is used, the workings in generating a U phasewaveform, which has the opposite phase of the U phase waveform, are the same as in generating a U106

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!