800
Chapter 21
Stepper Motor Controller/Driver (Stepper-C/D)
Preliminary User’s Manual U17566EE1V2UM00
Caution
In register MCNTCn0, bits 3 and 6 must be 0.
In register MCNTCn1, bits 3, 6 and 7 must be 0.
Power save mode
preparation
Before entering any power save mode the Stepper-C/D must be shut down in
advance in order to minimize power consumption.
Apply following sequence to shut down the Stepper-C/D:
1. Stop the counter CNT1 by setting MCNTCn1.PCE = 0.
2. Stop the counter CNT0 by setting MCNTCn0.PCE = 0.
3. Disable the Stepper-C/D operation by setting MCNTCn0.CAE = 0.
Note that the MCNTCn0.PCE and MCNTCn0.CAE bits must not be cleared to
0 by a single write instruction. Perform two write instructions as shown above.
(2)
MCMPnk0 - Compare registers for sine side (k = 1 to 6)
The 8-bit MCMPnk0 registers hold the values that define the PWM pulse width
for the sine side of the connected meters.
The contents of the registers are continuously compared to the timer counter
value:
• Registers MCMP10 to MCMP40 are compared to CNT0.
• Registers MCMP50 to MCMP60 are compared to CNT1.
When the register contents match the timer counter contents, a match signal is
generated. Thus a PWM pulse with a pulse width corresponding to the
MCMPnk0 register contents is output to the sine side of the connected meter.
Access
These registers can be read/written in 8-bit units.
Address
<base> + 2
H
, 4
H
, 6
H
, 8
H
, 16
H
, 18
H
Initial Value
00
H
. This register is cleared by any reset.
Note
1.
New data must only be written to registers MCMPnk0 if the corresponding
bit MCMPCnk.TEN = 0.
2.
Don't write to the compare register MCMPnk0, until the corresponding bit
MCMPCnk.TEN has been reset to 0 automatically.
3.
To enable master-to-slave register copy upon next CNTm overflow set
MCMPCnk.TEN = 1.
7
6
5
4
3
2
1
0
sine DATA
R/W
electronic components distributor