AN2364 Freescale Semiconductor / Motorola, AN2364 Datasheet - Page 20

no-image

AN2364

Manufacturer Part Number
AN2364
Description
Using the Table Stepper Motor TPU Function (TSM) with the MPC500 Family
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Generating Step Patterns
In half-step four-channel mode (see Figure 7), the PIN_SEQUENCE parameter should be initialized to
$E0E0 or a shifted version of this value such as $C1C1 or $8383. Master channel host sequence bit 1 should
be set to select two rotates of PIN_SEQUENCE between channels. The initial value of PIN_SEQUENCE
written to parameter RAM defines the starting point of the step sequence.
To generate a step, the PIN_SEQUENCE is rotated left or right once, depending on the motor direction. The
master channel pin level at the end of the step (i.e. when the next match occurs) is defined by the MSB of
the rotated PIN_SEQUENCE. The new PIN_SEQUENCE value is stored in parameter RAM. The pin level
of the first slave channel is obtained by further rotating a copy of the new PIN_SEQUENCE right twice.
The value of the resulting MSB determines slave 1 pin level. Similarly, the pin levels of the first and second
slaves are determined by the MSB after further right-rotating the copy of PIN_SEQUENCE two times and
four times, respectively. Figure 7 shows the effective positions of the bits that determine the pin levels of
the master and slave channels.
20
PIN_SEQUENCE FOR FIRST STEP
PIN_SEQUENCE FOR FIRST STEP
MASTER
SLAVE
MASTER
INITIAL PIN_SEQUENCE
INITIAL PIN_SEQUENCE
SLAVE
INITIAL
CONDITION
STEP NUMBER
STEP NUMBER
INITIAL
CONDITION
Figure 6. Two-Channel Mode—Full Step Generation
Freescale Semiconductor, Inc.
Using the Table Stepper Motor TPU Function
For More Information On This Product,
1
1
1
0
1
1
0
0
Go to: www.freescale.com
0
0
2
0
0
1
0
2
DIRECTION OF ROTATION "A"
1
1
1
1
3
1
1
3
1
0
0
0
0
4
0
DIRECTION OF ROTATION "B"
4
0
0
0
1
5
1
1
1
5
1
6
1
1
1
0
6
0
0
0
0
7
0
0
0
1
7
1
1
1
1
8
8
1
1
1
0
0
9
0
0
0
9
0
0
0
10
1
10
1
1
1
1
MOTOROLA
ETC
= $3333
= $3333
ETC

Related parts for AN2364