欢迎访问ic37.com |
会员登录 免费注册
发布采购

CY327 参数 Datasheet PDF下载

CY327图片预览
型号: CY327
PDF下载: 下载PDF文件 查看货源
内容描述: 步进系统控制器 [Stepper System Controller]
分类和应用: 控制器
文件页数/大小: 107 页 / 1095 K
品牌: ETC [ ETC ]
 浏览型号CY327的Datasheet PDF文件第30页浏览型号CY327的Datasheet PDF文件第31页浏览型号CY327的Datasheet PDF文件第32页浏览型号CY327的Datasheet PDF文件第33页浏览型号CY327的Datasheet PDF文件第35页浏览型号CY327的Datasheet PDF文件第36页浏览型号CY327的Datasheet PDF文件第37页浏览型号CY327的Datasheet PDF文件第38页  
CY545 Stepper System Controller
www.ControlChips.com
C
HAPTER
8
- P
ROGRAM
B
RANCH
C
OMMANDS
C
HAPTER
8
ROGRAM RANCH OMMANDS
Jump and Loop
Several CY545 commands control program branching and flow while the CY545 is executing a
program from external memory. These commands normally are used only within a program, not
as direct CY545 commands. The CY545 will however execute the commands in the direct
mode, but the result may be different than if the commands were run from a program. The
commands are:
J Addr
L Cnt,Addr
Z Cnt16,Addr
Jump to byte location of current page
Loop to byte address for count times
Zloop to byte address for count times
In addition to the above commands, the Y command, when executed from a program, provides
a 16 bit jump that can reach any address of the external memory.
The above listed commands all use an 8 bit address value. This restricts the range of addresses
to the 256 bytes of the current memory page. When a jump is taken, the lower byte of the
current address pointer is replaced by the 8-bit address parameter value, and program
execution continues at this new 16-bit address. If one of the above commands lies on a page
boundary, the address pointer is incremented before the command is executed, so the branch
would be taken into the new page of the memory, not the previous page that started the
command.
The
Jump
command simply provides a short version of the branch function. It can reach any
address on the current memory page.
The
Loop
command provides a repeated branch, with a specified number of iterations. Both
parameters are byte values, so a loop may be repeated 255 times, and the branch must be to
an address on the current page.
The
Zloop
command also provides a repeated branch. However, the repeat count is a 16-bit
value, so the Zloop may be repeated up to 65535 times. The branch is still restricted to an
address on the current page.
For both loop commands, the instruction following the loop is executed when the loop count is
exhausted.
Nested Loops
The combination of the Loop and Zloop commands provides two levels of nesting to loops. Only
one of each type of loop may be active at a time. That is, a number of loops may reside within
one zloop, or a number of zloops may reside within one loop.
However, one loop may not reside within another loop, and one zloop may not reside within
another zloop. This is shown below:
© 2002 Cybernetic Micro Systems
29
Chapter 8 - Program Branch Commands