CY325 ETC, CY325 Datasheet - Page 28

no-image

CY325

Manufacturer Part Number
CY325
Description
Stepper System Controller
Manufacturer
ETC
Datasheet
For these commands, the bit value parameter is treated as follows:
Both commands compare the value of the I/O signal to the value specified by the parameter.
Note that USRB0 to USRB5 can be treated as a single group of six bits, with the value test
comparing all six bits to the lower six bits of the parameter. Any other bits can only be tested on
an individual basis.
The Til command will jump to the specified byte address until the signal(s) match the parameter
value, either a low or high level. When there is a match in value, the Til command does not take
the jump, and execution falls through to the command after the Til command.
The Til command is only used in an external memory program, since it will jump or fall through,
depending on the bit value. The address of the jump is a single byte, limiting the jump to an
address on the same 256 byte page as the command after the Til command. The TIL command
may jump to itself.
The Wait command simply waits for a match of the bit(s) against the parameter value. When
there is no match, the CY545 stays in the Wait command, and continually tests the signals until
a match occurs. Once a match is detected, the CY545 will continue with the next command.
If you issue a new command either in parallel or serial format while the CY545 is stuck in a Wait
command, the CY545 will abort the
Wait function and act on the new
command. This is a mechanism for
breaking out of Wait commands that
are stuck because the proper bit
pattern does not occur.
The Wait command is normally used
in an external memory program, to
synchronize the CY545 with some
external control or status signal. For
example, move a part into place,
activate some operation by changing
a user bit, wait for a signal back from
the operation indicating operation
complete, then remove the part.
The example illustrates the use of
Wait and Til commands for the
operation described above:
© 2002 Cybernetic Micro Systems
00H to 07H
08H to 0FH
10H to 17H
18H to 1FH
80H to 0BFH
Test one of user bits 0 to 7 for 1
Test one of data bus bits 0 to 7 for 1
Test one of user bits 0 to 7 for 0
Test one of data bus bits 0 to 7 for 0
Test user bits 0 to 5 for a group match
Y 100<cr>
E<cr>
W 1<cr>
+ <cr>
G<cr>
/B 2<cr>
W 11h<cr>
– <cr>
G<cr>
B 2<cr>
T 10h,100<cr> Test USRB0 & jump unless it is 0
0<cr>
Q<cr>
Y 100<cr>
X<cr>
23
Program start address.
Next instructions go into memory.
Wait til USRB1 = 1.
Go (200 steps by default).
Drive USRB2 = 0 as signal.
Wait til USRB1 = 0.
Return same number of steps.
Drive USRB2 = 1 again.
then fall thru and stop the program
by returning to command mode.
End of program definition.
Reset the address.
eXecute the above program.
Chapter 6 - Bit Function Commands
www.ControlChips.com

Related parts for CY325