803
Stepper Motor Controller/Driver (Stepper-C/D)
Chapter 21
Preliminary User’s Manual U17566EE1V2UM00
21.3 Operation
In the following, the operation of the Stepper Motor Controller/Driver module as
a driver for external meters is described.
21.3.1
Stepper Motor Controller/Driver operation
This section describes the generation of PWM signals of the driver k for driving
external meters. Further, the achievable duty factor is explained and how
advanced precision can be gained by 1-bit addition.
(1)
Driving Meters
External meters can be driven both in H-bridge configuration and in half bridge
configuration:
• Driving meters in H-bridge configuration
Deflection of the needle of a meter in H-bridge configuration is determined
by the sine and cosine value of its desired angle. Since the PWM signals do
not inherit a sign, separate signals for positive and negative sine and cosine
values are generated.
The four signals at pins SMk1 to SMk4 of the driver k are:
– sine side, positive (sin +)
– sine side, negative (sin –)
– cosine side, positive (cos +)
– cosine side, negative (cos –)
Two output control circuits select which signal (sign) for sine side and cosine
side is output (bits MCMPCnk.DIR[1:0]). At the remaining two output pins,
the signal is set to low level.
To drive meter k in full bridge mode, set bit MCMPCnk.AOUT to 0.
• Driving meters in half bridge configuration
In this mode, the same signal is sent to both sine pins (SMk1 and SMk2)
and both cosine pins (SMk3 and SMk4), respectively. The setting of output
control bits MCMPCnk.DIR[1:0] is neglected.
To drive meter k in half bridge mode, set bit MCMPCnk.AOUT to 1.
(2)
Generation of PWM signals
Bit data corresponding to the length of the PWM pulses has to be written to the
compare registers MCMPnk0 (sine side) and MCMPnk1 (cosine side).
A timer counter is counting up. The rising edge of the PWM pulse is initiated at
the overflow of the counter. The falling edge of the PWM pulse is initiated when
the counter value equals the contents of the compare register.
The absolute pulse length in seconds is defined by the timer count clock (f
MC0
and f
MC1
, respectively). Various cycle times can be set via the timer mode
control registers MCNTCn0 and MCNTCn1.
electronic components distributor