CY545 Stepper System Controller
www.ControlChips.com
© 2002 Cybernetic Micro Systems
Chapter 7 - External Memory Commands
25
External Memory Support Commands
Several CY545 commands provide support for the optional external memory. They control the
addressing, data entry, and execution of commands from the memory.
External Memory Address Pointer
The first command is used to set the address pointer. It is:
Y Addr16
Set external memory address pointer
The 16 bit argument to the Y command is placed into the memory address register of the
CY545. Other commands may use this value for their functions.
The Y command does not change modes or other features of the CY545, so when issued as a
direct command, it simply sets up the address pointer. The CY545 will then wait for the next
command. However,
when the Y command is executed from external memory
, redefining
the address pointer causes the CY545 to execute commands from the new address, so
the Y
command becomes a 16-bit jump command
. This dual function allows you to specify the
working address when defining the memory contents, and jump to any location of the memory
when running from the memory contents.
Writing Commands into Memory
The two commands that control the entry of data into memory are:
E
Enter following commands to memory
Q
Quit entering commands to memory
The
Enter
command is issued to the CY545 in the direct command mode. Once this command
is executed, the CY545 changes to the program entry mode. All following commands will be
written to the external memory. The CY545 will not execute any of the commands, it simply
writes them into the memory.
Commands will be written to memory starting at the current address
set by the Y command, and the address pointer will increment once
after writing each command character.
The memory contents consist of a string of characters, and are identical to the characters
issued to the CY545 in direct command mode. Every character sent to the CY545 will be
recorded in memory exactly as it is sent to the part.
The memory writing function continues until the CY545 receives a Quit command. It then
returns to the direct command mode, in which every command is executed immediately as it is
received. The address pointer value now contains the address where the next character would
have been written, and the difference between the starting value and ending value will indicate
C
C
C
H
H
H
A
A
A
P
P
P
T
T
T
E
E
E
R
R
R
7
7
7
-
-
-
E
E
E
X
X
X
T
T
T
E
E
E
R
R
R
N
N
N
A
A
A
L
L
L
M
M
M
E
E
E
M
M
M
O
O
O
R
R
R
Y
Y
Y
C
C
C
O
O
O
M
M
M
M
M
M
A
A
A
N
N
N
D
D
D
S
S
S