Do you have a question about the CY545 and is the answer not in the manual?
Questions and answers
Summary of Contents for ControlChips CY545
Page 1
CY545 High Performance Stepper System Controller...
Page 2
CY545 Stepper System Controller www.ControlChips.com Copyright and Disclaimer Notice Cybernetic Micro Systems, Inc. software products are copyrighted by and shall remain the property of Cybernetic Micro Systems, Inc. Duplication is subject to a license from Cybernetics. Cybernetic Micro Systems, Inc. reserves the right to improve design or performance characteristics.
CY545 Stepper System Controller www.ControlChips.com Table of Contents Table of Contents........................ii Table of Contents........................ii Chapter 1 - Introduction to the CY545 ..................1 CY545 Stepper System Controller..................1 Basic Features ....................... 1 Motion Control Functions....................2 Motor Support Signals ....................2 General Command Functions and Special Features............
Page 4
LED Display Details.......................39 Chapter 11 - CY545 Example Circuits..................40 Three Example Cases.......................40 CY545 Example Circuit – Minimum Serial Configuration ..........40 CY545 Example Circuit – Minimum Parallel Configuration..........41 CY545 Example Circuit – Maximum Configuration ............42 Chapter 12 - External Memory Support .................43 Memory Read/Write ......................43...
Stepper Motor Controller IC. While the CY545 is also capable of working with a host CPU in a closely coupled fashion, the CY545 contains extensions that allow it to function very well in a stand-alone system. In fact, it...
CY545 will not jog. However, if the signal is connected to ground, the CY545 will jog in the CW direction. The jog step rate is derived from the First Rate parameter and the normal Step Rate Table, by dividing the selected rate by 20.
Page 13
CY545. Addition of an RS-232 voltage level driver/receiver, such as the Maxim MAX233, allows any RS- 232 device, such as the IBM PC COM1 port to talk directly to the CY545. PLCC Pin Name...
Page 14
7 also have fixed alternative functions of CY233 FPL control and local parallel HP display selection if these features are used with the CY545. If the application does not use a CY233, CTS/, or HP display, these bits may be used for any other functions.
Page 15
During access to external thumbwheel switches, memory, or display, the lower byte of the device address is presented on these lines just prior to the data transfer. Parallel commands are also accepted by the CY545 on these lines, using the handshake control signals. These lines are open drain, so external pull-up resistors are required when they are used as outputs.
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.
Page 18
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).
Page 19
CY545 Stepper System Controller www.ControlChips.com 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.
CY545 Command Summary The following is a list of CY545 commands, including the command letter and argument structure. Arguments without a suffix should be single byte numeric values up to 255, while arguments with a "16" suffix may be two byte numbers up to 65535, and arguments with a "24"...
Binary format commands will usually take fewer characters than ASCII format commands. However, Binary format commands are more difficult for humans to read, and if the CY545 and host computer become unsynchronized in Binary mode, due to a faulty data count, it is extremely difficult to resynchronize the two without a hardware reset.
LSByte of the count, the MSByte of the count, then the branch address. More examples are shown below. The data bytes are shown as hex values, with a space separating each one for clarity, but they are issued to the CY545 as single 8 bit values, without the spaces.
For small values of slope, the CY545 can take a very large number of steps to go from the initial rate to the maximum rate. If the distance to travel is too short to allow the CY545 to reach the maximum rate, it will perform a partial acceleration, reaching the highest possible rate under the current slope parameter, before having to decelerate to stop at the target position.
If the CCW pin is being driven low by the CY545, it is a stronger sink device, and will require a very strong external signal to force the pin into the high state for CCW stepping. However, if the CCW pin is held high by the CY545, from a - command, it can easily be driven low for CW stepping.
If the target position is greater than the current position, the CY545 steps in the CW direction. If the target position is less than the current position, the CY545 steps in the CCW direction.
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.
6 and/or 7 will also be available. Finally, if the parallel command interface is not used, and there is no local memory or HP LED display, the CY545 data bus lines will also be free, and can be addressed as bits 8 to F of the Bit command. These special function lines can only be tested or changed on an individual basis.
Page 28
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 Y 100<cr>...
CW step direction in seeking the final home position. If the CY545 runs into one of the limits while looking for the home signal, it will abort the home command and stop stepping. The current position is not changed to zero in this case.
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.
When the current command is finished, the CY545 will read the next command from memory and execute it. This process continues until the CY545 finds a stop command.
Page 32
CY545 Stepper System Controller www.ControlChips.com You may also issue commands to the CY545 while it is running a program from external memory. The CY545 will process these commands between the commands read from the memory. The ability to issue direct commands while the CY545 is running an external memory program provides a degree of "live"...
The program takes two relative motions, with different numbers of steps, and in different directions. When the Stop command is seen, the CY545 goes back to direct command mode and waits for the next command. The program could be repeated by sending the Y and X commands again, since the program continues to reside in the external memory.
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.
Page 35
CY545 Stepper System Controller www.ControlChips.com Recall that the CY545 also supports a branch command using the bit instructions, the Til command. It tests the I/O signals against the specified bit parameter value, and jumps if the values do not match. Otherwise execution continues with the instruction after the Til command.
When you use Binary command mode, you must first issue an O command in ASCII mode that turns off the upper bit, to put the CY545 into Binary mode. All commands following the O command are then in the special Binary format: 0<cr>...
Page 37
LCD display device, controlled by the CY325 LCD Display Controller. When bit MB1 is zero, a standard serial display is used, and the CY545 does not perform any special formatting of the output. This is the power-on default option.
Page 38
Finally, if MB6 is one, the CY545 uses the lower four bits of the mode byte value to select the serial baud rate. This allows a parallel command to set the serial rate to a desired value, without tying the I/O Request and Busy lines to a particular state, and allows a parallel command source to set up the CY545 for serial communications, such as showing messages on a serial display.
Page 39
38,400 and 76,800 baud. The CY545 will set the baud rate during the execution of the Mode command, and the new rate will be in effect until a hardware reset occurs or another Mode command is issued, with B6 set.
Delay for specified milliseconds The parameter for the Delay command is a 16-bit value, calibrated in milliseconds when running at 12 MHz. This command simply causes the CY545 to wait for the specified time before going to the next command.
The above example will take 50 steps, with a delay of two seconds between steps. Other delay values will provide different step rates. Query Command Display CY545 Status Along with display strings, the CY545 allows you to query the values of various working parameters. The command is: ? Cmd Query specified parameter value The “Cmd”...
Parameters that only have 8-bit values will have leading zeros for the unused digits. This is a fixed format output while the CY545 is in the ASCII command mode. Since Position and Number of steps are 24-bit values, these two queries will output an 8-digit number, not the standard 5-digit number.
This HP Display command allows you to manipulate some special features of the HP display, such as brightness control or custom character fonts. Use of this command is optional, since it changes the defaults as set by the CY545. It is not required for normal operation of the HP display.
One address is treated specially by this command, address 30H, for the control register. If address 30H is followed by a zero data count, the CY545 default control value will be selected. Otherwise, the value of D1 will become the new control register value, and can be used to change the display intensity or turn on the blinking feature.
This represents a minimal CY545 design. The second example is similar, but uses the parallel input bus to send commands to the CY545, with the pulse and direction lines still sent to a power driver. The third diagram illustrates a full blown system with RS-232 serial input, external memory, display circuits, thumbwheel interface, and I/O lines, and is implemented on the CYB-545 prototyping board.
EPROM memory must be programmed separately from its use in a CY545 application, so the CY545 Enter command and the ability to define the contents of memory are given up when an EPROM is used. The other two forms of memory allow the CY545 to write to memory as well as read it.
It is best to have a time delay between each character in this case, or else use the CTS signal to hold off the communications until the CY545 is ready. Note that the parallel interface takes care of this time delay on its own, since the CY545 will stay busy while it is writing the character to the memory.
Page 50
CY545 Stepper System Controller www.ControlChips.com When the CY545 is reset, it will read the first three locations of the external memory. If the values read are 12H, 34H, and 56H respectively, the CY545 will then switch to the program execution mode, and start reading commands from location 00003 of the memory. This allows the CY545 to work in a stand alone mode, without any commands from a host computer or other source than the memory itself.
As a CY545 program, such an application is fairly simple. If the stepper motor controls the feeding of the stock, you must simply move the motor a specific number of steps that correspond to the desired length, then activate a cutting mechanism.
Page 52
CY545 data bus. All switches are positive BCD encoded. The CY545 reads the switch value from the lower four bits of the data bus, then converts the value into an ASCII decimal digit. The hex format is not supported for externally read parameter values.
Page 53
The following section gives the address values for each parameter the CY545 can read from external switches. The lowest number of the range corresponds to the least significant digit of the parameter, and is read last by the CY545. The highest number is the most significant digit address, and is read first.
3 digits Each parameter has been assigned a potential range of 8 addresses, to make the address decoding easier. Only the addresses shown are actually used to read digit values. The CY545 will not generate the unused address values. Any parameter that will not be read from switches does not require the 74LS156 or switches for that parameter.
Output to LCD (CY325-Based) When the CY325 based serial display is selected, the CY545 commands the CY325 to split the display into two sections. The right hand section is used for string outputs, and no modifications are made to the characters of a string. The left hand section of the display is used for the parameter values, with each parameter assigned a different line on the display.
IO_REQUEST, BUSY, and FPL (USRB6). When the CY545 receives a Query command or a string to send, it changes to the output mode internally, and lowers the FPL signal. It then waits for a low level on the IO_REQUEST signal, indicating that the host or CY233 is ready to take a character.
Page 58
CY545 Stepper System Controller www.ControlChips.com The CY545 takes care of any timing involved in running the HP display, and generates the proper control signals. Also, a special command ( [ ) allows you to customize the display control for your desired intensity or other functions.
PROM, EPROM or EEPROM. It is possible for such a system to operate without the use of a host computer. The CY545 with local memory can contain the routines required to run the system, while the display provides the mechanism for system control by the operator.
The CY545 can be commanded directly through its own serial port connection, or serially through the CY233 and the parallel CY545 interface. With this second option, it is possible to control multiple CY545s through one host serial port, as a network of motor controllers. The CY233 acts as the network communications controller, recognizing commands meant for the local CY545, while the CY545 runs the stepper motor as commanded by the host.
The CYB-003 Prototyping Board Those CY545 applications that use the CY325 and liquid crystal display, are well supported by a second prototyping board from Cybernetic Micro Systems, the CYB-003 board. This board contains the interface circuits and connections to support the CY325 and display unit. The board is the same size as the popular 711 LCD display, which is 8 lines by 40 characters.
BUSY is brought back high also. In the ASCII command mode, the FPL signal will continue to stay low as long as the CY545 has data to generate. This is an indication that the host should continue reading data bytes from the CY545.
Page 65
CY545 Stepper System Controller www.ControlChips.com In the CY545B, the FPL signal is driven low when the CY545B has data to output, and it is removed after the host has read the last character, and brought I/O Request high again, but before the CY545B brings Busy high.
Page 66
CY545 Stepper System Controller www.ControlChips.com the immediate command, the CY545B resumes external memory execution, unless the immediate command was the "0" command, which stops the execution. Note that the first handshake, without driving the data bus, is only required by the parallel interface during immediate commands, issued while the CY545B is also running a program from the local external memory.
RxD and is sent on TxD. Note that when the parallel interface is not used, IO_REQUEST and BUSY may be tied to select a fixed baud rate for the CY545. Otherwise, the adaptive mode will be used, or a parallel mode command can select a fixed baud rate (either from the local external memory, or from a parallel-connected command source).
Mode command to the CY545 to enable this signal, which shares functions on USRB6. With this signal enabled, the CY545 indicates to the host system when it is ready for more serial data. The CTS signal will be turned off when the CY545 is busy executing a command. For long duration commands, such as time delays or motions, this will inhibit the host from sending more commands until the CY545 is ready for them, providing an automatic serial handshake.
Page 69
This value is latched into the other 74LS373, using the ALE signal. Then the actual data transfer occurs. For a write, the CY545 generates the write data on the data bus, along with a write strobe, WR. For a read, the data bus is floated, and a read strobe is generated, using RD, so the memory can now drive the bus.
It is best to have a time delay between each character in this case, or else use the CTS signal to hold off the communications until the CY545 is ready. Note that the parallel interface takes care of this time delay on its own, since the CY545 will stay busy while it is writing the character to the memory.
HP_SEL signal. When the CY545 reads or writes to the display, it starts by driving HP_SEL low. The read or write is then broken into two steps. First the lower address byte is generated on the data bus.
The two primary control signals for the motor are PULSE and CCW, which provide the step and direction indications to the motor. These signals are connected to the external power driver that actually runs the motor. Every time the CY545 directs the motor to take a step, a signal is generated on the PULSE line.
Page 73
This means the PULSE waveform will vary from the slower rate to the faster rate as the CY545 accelerates the motor up to the slew rate, and then will be stable for the duration of the slewing period. The CY545 will determine when to begin deceleration so that the motor will slow down again to the starting rate as the desired number of steps has expired.
Note that once a Position or Go command is executed by the CY545, it will wait indefinitely for the INHIBIT_ABORT signal to be high. There is no signal to terminate the motion until it has been allowed to start.
There will be no deceleration before the stop; the CY545 simply abandons the motion. Also, if a limit signal is low at the beginning of a motion, the motion will not be taken. The CY545 immediately aborts the motion without taking any steps. Normal motions are allowed in the opposite direction.
When the line is left floating, so the CY545 can drive it both ways, the jog function is disabled, and stepping only occurs when the CY545 is commanded to take a motion.
Automatic Position Display Also, when bit 4 of the Mode Register is set, the CY545 will display the current position at the end of every jog or Home command step. The position is output to the currently enabled display device, and will affect the step rate.
Page 79
If the CY545 runs into one of the limits while looking for the home signal, it will abort the home command and stop stepping. The current position is not changed to zero in this case. As with the jog function, the current position will be displayed after every step, if bit 4 of the Mode Register is set.
R parameter is achieved. The CY545 will then slew at this rate until it is time to decelerate back to the selected starting rate as the specified number of steps is taken.
Acceleration Curve as a Function of R Another feature of the CY545 acceleration algorithm is that the shape is fixed by the value of the Slope parameter (S). The acceleration curve is always the same for a given value of S. The step rate parameters merely determine where the CY545 starts stepping, and where it stops accelerating and starts slewing in the motion profile.
Slope and Elapsed Time While it is difficult to provide an exact formula for the CY545 acceleration behavior, due to the complex nature of the stepping algorithm, we can provide an approximate formula. This should be used as a general guide only, with actual values determined experimentally. The formula is...
The data bus pins must have external pull-up resistors to output a high value. Where appropriate, an input line will be considered in the floating state if the CY545 can drive it both high and low.
Note that 11.0 MHz, such as a CTS Knights MP110 or equivalent will work fine. The CY545 requires an 11 MHz clock in order to generate the standard baud rates, although any crystal in the allowable range can be used with the adaptive mode, within the timing resolution limits of the CY545.
Next, the CY545 waits for a signal that indicates stock is available. This is tested on User Bit 3. When stock is available, the CY545 moves the motor 200 steps from the initial position. Notice that this move is fixed by the command in the program.
Page 93
CY545 Stepper System Controller www.ControlChips.com Y 100<cr> Select external memory or location E<cr> Write the following commands to memory R 175<cr> Commands will start at address 100 F 12<cr> First set up stepping parameters S 200<cr> A 0<cr> Declare current position as zero W 3<cr>...
User Bit 2 signal to cut the strip. Now the CY545 returns the motor to the starting position. It then tests User Bit 4, and if the signal is low, the program repeats from the Wait instruction. If the signal is high, the program stops with the Zero command, and the CY545 returns to the command mode.
Page 95
CY545 Stepper System Controller www.ControlChips.com The data outputs from the PROM are then connected to the power driver circuit itself, generating the proper phase patterns for the motor. Note that such a design not only handles motors of various phases, but can also implement stepping schemes such as half-step or quad- step, as well as the standard full-step pattern.
Page 96
CY545 Stepper System Controller www.ControlChips.com The second basic type of driver circuit is the bipolar design. In this case, the motor is driven only from the ends of each winding, with switching logic used to control the direction of current through the winding.
In the example shown in Figure 19.9 below, the CY545 is operating in the parallel ASCII input mode. In this mode, bit 7 is always zero and b7 line of the CY545 data bus may be tied to ground. Since the user will normally transfer bytes of data from memory to the output port, the most significant bit of the data byte may be used to generate the IO_REQUEST strobe, thus allowing only one 8 bit output port to suffice.
CY545s. Each of the separate BUSY lines (pin 15 of each CY545 must be monitored individually and each IO_REQUEST line (pin 13) must be activated separately. This technique effectively uses the IO_REQUEST line as a chip select (CS).
The one to receive the part waits at the receiving position until the CY545 which has the part signals that it has arrived. The two arms then move together in a coordinated motion, reaching a point at which the distance between them is a minimum.
CY545 Stepper System Controller www.ControlChips.com Example Programs and Waveforms The use of the “loop TIL” instruction is illustrated in the following example. The program loops until the USERBIT 1 line (pin #22) goes high, then fetches the next instruction. The effect of the INHIBIT_ABORT input on the STOPPED output is also shown.
If the same sequence is issued in the Binary command mode, the command letters are the same, but the data values are given to the CY545 in binary form, not as ASCII decimal values. In the Binary command mode, the equivalent sequence is:...
2. Be sure RESET (pin 9) is high for at least 10 milliseconds after power stabilizes. The CY545 can be reset at any time. 3. Upon proper reset, all outputs should be at logic 1, and the CY545 should be testing the JOG signal (pin 6).
Page 103
The following steps may be used with the Serial Command Interface. 12. Connect your serial port to the CY545 RxD and TxD signals, pins 10 and 11, with the proper voltage translation buffers. 13. Send two carriage return codes to adapt the CY545 baud rate. The CRT emulation program at the end of this section is useful for this purpose.
The following BASIC language program emulates a CRT for direct serial communications with the CY545A. It starts by sending the two carriage returns to set the CY545 baud rate. It then sends the Mode command to enable the CTS/ signal. These are both done with CTS monitoring disabled.
CY545 Stepper System Controller www.ControlChips.com Changes from CY545 to CY545A Please note: the CY545 is obsolete. The CY545 did not have Clear-to-Send ("CTS"). The CY545A implements CTS function on pin Changes from CY545A to CY545B Please note: the CY545A is obsolete. Added Features:...
Need help?
Do you have a question about the CY545 and is the answer not in the manual?
Questions and answers