English
Language : 

CY525 Datasheet, PDF (26/107 Pages) List of Unclassifed Manufacturers – Stepper System Controller
CY545 Stepper System Controller
www.ControlChips.com
CCHHAAPPTTEERR 66 - BIITT FUUNNCCTTIIOONN COOMMMMAANNDDSS
Bit Function Commands
Several commands allow you to specify which User Selectable Bits are used by the command.
The CY545 has at least six general purpose signals available, even if all hardware support
options are used. More bits are available when some hardware support, such as the Hewlett
Packard LED display, the CY233, or the parallel interface are not used. Each of these
commands includes a parameter which specifies which bit or combination of bits to use with the
command. The specific values are discussed with the relevant commands.
User Bits
One command allows you to set or clear specified bits. It is:
B Bit
Set or clear specified bits
When in the ASCII mode, this command also allows a special format, using a complement prefix
to mean the inverted value of the specified bit parameter. The prefix is the “/” character, and is
used as follows:
B 2<cr>
Set User Selectable Bit 2 high
/B 2<cr>
Clear User Selectable Bit 2 low
The same function may be performed by the bit parameter value. When a “/” character is
detected, it simply complements the fourth bit of the bit value parameter, so the same functions
as above can be specified by:
B 02H<cr>
Set Bit 2
B 12H<cr>
Clear Bit 2
The “/” character is equivalent to performing an exclusive OR (XOR) of the bit number
parameter and the value 10H (16 decimal).
The value of the Bit parameter will determine what action to take, as follows:
00H to 07H
08H to 0FH
10H to 17H
18H to 1FH
20H to 3FH
40H to 7FH .
80H to 0BFH.
0C0H to 0FFH.
( ..0-7)
( .8-15)
( 16-23)..
( 24-31)..
( 32-63).
( 64-127).
(128-191).
(192-255).
Set one of user bits 0 to 7
Set one of data bus bits 0 to 7
Clear one of user bits 0 to 7
Clear one of data bus bits 0 to 7
(Same as 00H to 1F)
Set user bits 0 to 5 at one time
AND user bits 0 to 5
OR user bits 0 to 5
As seen from the above values, the bit argument is composed of an “opcode” part and an
“operand” part. The general coding of bit arguments is shown below:
© 2002 Cybernetic Micro Systems
21
Chapter 6 - Bit Function Commands