CY545 Stepper System Controller
www.ControlChips.com
Example Programs and Waveforms
The use of the “loop TIL” instruction is illustrated in the following example. The program loops
until the USERBIT 1 line (pin #22) goes high, then fetches the next instruction. The effect of the
INHIBIT_ABORT input on the STOPPED output is also shown.
PRESET:
B 16<cr>
R 90<cr>
S 200<cr>
F 10<cr>
N 3<cr>
clear USER BIT O Line
set RATE = 90
set SLOPE = 200
set FIRSTRATE = 10
set NUMBER steps = 3
set memory address
Y 100<cr>
ENTER PROG:
E<cr>
B 0<cr>
set USER BIT 0
set CW direction
PROGRAM
CODE
+<CR>
G<cr> GO,
B 16<cr>
-<cr>
begin stepping
clear output line
set CCW direction
G<cr> GO,
T 1,100<cr>.
B 0<cr>
begin stepping
repeat above prog Til USER BIT 1 = HI
set USER BIT 0 line
B 16<cr>
0<cr>
clear USER BIT 0 line
stop run mode, enter command mode
QUIT:
Q<cr>
EXECUTE:
Y 100<cr>
X<cr>
reset pointer
EXECUTE
© 2002 Cybernetic Micro Systems
95
Chapter 19 - Circuits and Examples