![[Logo]](gif/logo.gif)
Command Interfaces
The CY545 supports two basic command interfaces, a parallel interface and a serial interface. These signals are similar to functions on other CYxxx controllers from Cybernetic Micro Systems.
The parallel interface uses two handshake lines, IO_REQUEST and BUSY. When you wish to send a command character to the CY545, you first check that it is not busy; the BUSY signal should be high.
You then place the character to send on the parallel data bus lines. Be sure to drive all 8 data lines.
Next, you drive the IO_REQUEST signal low, indicating that a character is available.
Now, wait for the CY545 to go busy, with a low level on the BUSY signal, indicating that the CY545 has read the command character.
Finally, you remove the character from the data bus and drive the IO_REQUEST line high again.
![[Diagram 3.1]](gif/545-8.gif)
This function is repeated until all command characters have been issued to the CY545. In direct command mode, the CY545 executes every command as it is received. This means that the CY545 will go busy for a longer period of time with the last character of a command, while the command is actually executed. For long time delays or long motions, this time could be many seconds.
This parallel interface is compatible to that of other CYxxx control chips. It is also compatible with the CY233 Network Controller, so you can command several CY545s from a computer serial port, using a CY233 as a network “front end” to each CY545.
For a CY233-based interface, the DAV signal from the CY233 is connected to the IO_REQUEST signal of the CY545, and the ACK signal of the CY233 is connected to the BUSY signal of the CY545. In addition, the FPL signal of the CY233 is connected to USRB6 of the CY545, which shares the FPL function on this line. An example applications schematic, provided with this manual, shows the connections. The relevant portion is reproduced below.
![[Diagram 3.2a]](gif/545-9.gif)
The CY233 Network Control chip allows you to connect up to 255 devices to a single RS-232 serial communications line such as an IBM-PC COM1 or COM2 port, with unique addresses assigned to each device. The CY233 Network is ideal for distributed systems where central control is required but very high speed communication is unnecessary.
![[Diagram 3.2b]](gif/545-10.gif)
The CY545 also provides a direct serial command interface, which may be connected to a host computer or terminal. Since the CY545 signals are all TTL voltage levels, external RS-232 line drivers and receivers must be provided, to translate the RS-232 voltage levels to the CY545 TTL levels. A Maxim MAX-233 does this function in a single chip, operating at +5 volts. This interface is also shown on the applications schematic.
The serial interface may be operated in one of two ways, with a fixed baud rate, selected at power up, or with an adaptive baud rate, selected by two carriage return characters from the host.
The fixed baud rate mode is selected by tying the BUSY line low, so the CY545 will read it as a zero value on power up. The CY545 IO_REQUEST line value will determine the baud rate as follows:
F ..9600
1.. 2400
0.. 300
When the IO_REQUEST line is left floating, 9600 baud is selected. When tied high, 2400 baud is selected, and when tied low, 300 baud is selected. For these fixed rates to be correct, the CY545 must be operated with an 11 MHz crystal clock. Other values will scale the baud rate linearly by the difference in crystal frequencies.
![[Fixed/Adaptive Serial Baud Rate]](gif/545-11.gif)
An alternative method of selecting the baud rate is through a parallel Mode command. For this command, nine baud rate selections are available, from 300 to 57600, plus the self adaptive rate. Details of the Mode command are described in a later section.
Note that the selection of fixed baud rate mode through the BUSY and IO_REQUEST lines, gives up the use of the parallel handshake interface, since the lines are used to select the baud rate. This is fine if only the serial interface will be used. However, if both interfaces must be used on the same CY545, the baud rate may only be set adaptively, or through a parallel Mode command.
The adaptive serial mode is chosen by default, when the BUSY signal is left floating, so the CY545 can drive it at power up. In this mode, the serial baud rate is not set until the CY545 receives two carriage return codes. Be sure to send these characters after power up or any reset (hardware or software). Once the two carriage returns have been received, normal CY545 commands may be sent.
When working with the serial interface, the best crystal frequency for the CY545 is 11 MHz. This will provide the largest baud rate operating range, with the least baud rate error. Internal timer resolution of the CY545 will limit the available rates, especially at the high end. At 11 MHz, standard rates up to 19200 baud may be selected. Note that other CY545 functions, such as the step rates and time delays, have been calibrated for a 12 MHz clock source. This means these functions will run somewhat slower when 11 MHz is used. Changes to the relevant parameter values can compensate for some of this difference. Alternatively, a 12 MHz clock will work fine, if the selected adaptive baud rates are always 4800 baud or less.
When operating the CY545 at 16 MHz, internal timer resolution still limits the reliable operation of the serial interface to 4800 baud or less. The error at higher baud rates may be too great for consistant communications.
However, there is a crystal frequency of 14.7456 MHz at which the CY545 can be operated in the adaptive mode. With this frequency, the internal resolution of the CY545 baud rate timer allows it to adapt to all standard baud rates from 300 to 19,200 baud, plus two higher, non-standard rates of 38,400 and 76,800 baud.
Also, the CY545 serial interface works on a fixed format character, which is always 8 data bits, with no parity bit, and one stop bit. All 8 data bits are used to interpret the command character values, so be sure to send the proper 8 bit codes for the various ASCII command characters.
Finally, the CY545 optionally implements a Clear to Send signal ("CTS/") which may be used by the host system to indicate when the CY545 is busy processing a command. No additional characters should be sent to the CY545 while CTS/ is off (TTL high). Once the CY545 has finished processing the current command, CTS/ will be enabled again, indicating that the CY545 is ready for more serial characters. The polarity of the CY545 CTS/ signal allows it to be connected directly to your host system CTS RS-232 signal, through a standard RS-232 line driver. No additional logic is required.
The CTS/ signal shares functions with User Bit 6, which is also the CY233 FPL/ signal. Since the signal has multiple functions, the CTS/ function is disabled at power on or any restart operation. You must issue a Mode command with MBit 5 set in order to enable the CTS/ signal. See the later section on the Mode Command for more details.
00 Contents ..|..
01 Intro ..|..
02 Pins & Packages ..|..
03 Cmd Interfaces ..|..
04 Commands..|..
05 Motor Cmds
06 Bit Cmds..|..
07 Memory Cmds..|..
08 Prog Branch Cmds..|..
09 Mode Cmds ..|..
10 Misc Cmds
11 Circuits ..|..
12 External Memory ..|..
13 Thumbwheel Switch
..|.. 14 Output
Display ..|..
15 Proto Boards
16 Timing & Control
..|.. 17 Rate
Tables ..|..
18 Electrical Specs ..|..
19 Examples ..|..
20 Up & Running
Back to CY545 Data Sheet
© 1988 - 1999 Cybernetic Micro Systems, Inc.
All rights reserved.
CY545 Manual 22MAR99