CY545 Stepper System Controller
www.ControlChips.com
© 2002 Cybernetic Micro Systems
Chapter 20 - Getting Your CY545 Running
100
620 ' keys to COM port. Stop when Escape key input
630 '
640 A$=INKEY$ : IF A$=ES$ GOTO 930
650 IF A$<>" " THEN PRINT #1,A$; : PRINT #2,A$;
700 '
710 '
720 ' Check for any received data from COM port, and
730 ' display it, with line feeds filtered out. Loop back
740 ' to check keyboard again when no more received data
750 '
760 WHILE NOT EOF(1)
770 J%=LOC(1) : B$=INPUT$(J%,#1) : LF%=0
780 LF%=INSTR(LF%+1,B$,LF$)
790 IF LF%>0 THEN MID$(B$,LF%,1)=NL$ : GOTO 780
800 PRINT #2,B$;
810 WEND
820 GOTO 640
900 '
910 ' Exit program when Escape key is pressed
920 '
930 CLOSE #1 : CLOSE #2
940 STOP