CY325 ETC, CY325 Datasheet - Page 104

no-image

CY325

Manufacturer Part Number
CY325
Description
Stepper System Controller
Manufacturer
ETC
Datasheet
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. The host serial port id then reconfigured to enable the CTS monitoring function, and all
other commands use CTS/. The program is a simple terminal emulator, which takes any
command entered from the keyboard and sends it to the CY545, while also displaying any serial
data sent by the CY545.
100 '
110 '
120 '
130 '
140 '
150 '
160 '
170 '
180 '
190 '
200 '
210 '
220 '
230 '
300 CLS
310 LF$=CHR$(10)
320 '
330 '
340 '
350 '
360 OPEN "COM1:9600,N,8,1,CS0,DS0,CD0" AS #1
370 '
380 '
390 '
400 PRINT #1,CR$;CR$
410 '
420 '
430 '
440 PRINT #1,"O 0A0h";CR$
450 FOR I% = 1 to 5000
460 NEXT I%
470 '
480 '
490 '
500 CLOSE #1
510 OPEN "COM1:9600,N,8,1,CS30000,DS0,CD0" AS #1
520 LOCATE 5,5,1
530 PRINT "Ready to Go!"
540 '
550 '
560 '
570 OPEN "SCRN:" FOR OUTPUT AS #2
600 '
610 '
© 2002 Cybernetic Micro Systems
This program configures the CY545A for serial commands,
by sending two carriage returns to set the adaptive
rate, then sending a Mode command to enable the Clear
To Send signal.
computer serial port to function with the CTS signal.
It then becomes a terminal emulator, waiting for keyboard
input, which it displays on the screen and sends to the
CY545A, while displaying all serial characters received
from the CY545A.
Open the COM1 serial port at 9600 baud, no parity
Note that CTS is disabled during this part
Send two carriage returns to adapt the CY545A baud rate
Send the Mode command to turn on the CY545A CTS signal
Now reconfigure COM1 to use CTS
Open the screen for displays
Check for keyboard input.
BASIC Language CRT Emulation Program
:
CR$=CHR$(13)
BASIC Language
CRT EMULATOR FOR CY545A
Cybernetic Micro Systems, Inc.
After this, the program redefines the
: NL$=CHR$(0)
Display and send any
99
'Delay while Mode Command is sent
Chapter 20 - Getting Your CY545 Running
: ES$=CHR$(27)
www.ControlChips.com

Related parts for CY325