801
Stepper Motor Controller/Driver (Stepper-C/D)
Chapter 21
Preliminary User’s Manual U17566EE1V2UM00
(3)
MCMPnk1 - Compare registers for cosine side (k = 1 to 6)
The 8-bit MCMPnk1 registers hold the values that define the PWM pulse width
for the cosine side of the connected meters.
The contents of the registers are continuously compared to the timer counter
value:
• Registers MCMP11 to MCMP41 are compared to CNT0.
• Registers MCMP51 to MCMP61 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
MCMPnk1 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> + 3
H
, 5
H
, 7
H
, 9
H
, 17
H
, 19
H
Initial Value
00
H
. This register is cleared by any reset.
Note
1.
New data must only be written to registers MCMPnk1 if the corresponding
bit MCMPCnk.TEN = 0.
2.
Don't write to the compare register MCMPnk1, 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.
(4)
MCMPnkHW - Combined compare registers (k = 1 to 6)
The 16-bit MCPMnkHW registers combine the sine and cosine registers
MCMPnk0 and MCMPnk1. Via these registers it is possible to read or write the
contents of MCMPnk0 and MCMPnk1 in a single instruction.
Access
These registers can be read/written in 16-bit units.
Address
<base> + 2
H
, 4
H
, 6
H
, 8
H
, 16
H
, 18
H
Initial Value
0000
H
. This register is cleared by any reset.
Note
1.
New data must only be written to registers MCMPnk1 if the corresponding
bit MCMPCnk.TEN = 0.
2.
Don't write to the compare register MCMPnk1, 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
cosine DATA
R/W
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
cosine DATA
sine DATA
R/W
electronic components distributor