Serial Cable Communication

You have assembled or obtained a CoCo/PC  serial cable  Here are some utilites / info to get your CoCo communicating with your PC.

Initial test of CoCo to PC serial cable

Connect the  cable . Start a terminal program on the PC, configure it to 2400 baud, 8N1. (8 bits, no parity, one stop bit. Hyperterminal works fine on a Wintel machine, and it is included in all the Windows packages I have seen to date. Be sure the appropriate COM port is also configured on the PC, it will usually be COM1 or COM2.

Set the CoCo's baud rate to 2400 by entering  POKE 150,18. Next, enter a message to the serial port by typing,  PRINT#-2,"IF THIS MESSAGE SHOWS UP ON THE PC SCREEN, THE CABLE IS OKAY"

If everything is correct, you should see the message in the terminal program on the PC, and the OK prompt should have returned on the CoCo. If not recheck your terminal program setup and/or your cable.

This configuration allows data to be output from the CoCo with simple printer output routines. There is no error checking, you can manually check the resulting file lengths for a rough inspection.
 
 
 

Test of CoCo to PC (bidirectional) cable

Connect the  cable . Start a terminal program on the PC, configure it to 2400 baud, 8N1. (8 bits, no parity, one stop bit. Start a terminal program on the CoCo and configure it to the same. I typically use Hyperterminal on my Wintel box and Ultimaterm 4 on a CoCo3 Disk system. Be sure the PC is set to the correct COM port, usually 1 or 2. Flow control should be set to NONE or XON/XOFF, likely will have problems if it is set to HARDWARE.

Set one computer to receive, one to transmit. You will be prompted for file names, may have to have buffers loaded beforehand depending what you are using for Comm programs. I have good success using X Modem. Y modem on some CoCo Comm programs is X Modem 1K in Hyperterminal. 2400 baud should work with no errors at all. I don't have much luck with 4800 baud, you can also try 1200 baud if you get alot of errors.

This configuration works well for moving files back and forth from the CoCo, as error checking is all looked after for you.
 

CoCo to CoCo direct serial connection

Connect the  cable . A couple of simple routines I have tested on CoCo2 and 3, note differences in the receive routines. The receive routine will need editing if you have a 16K machine. The receive routine accesses a subroutine in the Extended Basic Rom, so if you are running Color Basic only you are out of luck.

Routine displays text entered from one computer on the other.

Transmit computer routine

10 POKE 150, 44 : POKE 230, 44 : CLS
20 PRINT@5, "ASCII TERMINAL TRANSMIT"
30 PRINT "TYPE A MESSAGE, THEN <ENTER> KEY"
40 PRINT "MAXIMUM LENGTH 127 CHARACTERS"
50 INPUT A$ : PRINT#-2, A$ : GOTO 50

Receive computer routine for CoCo2

10 POKE 150, 44 : POKE 230, 44 : POKE 231,1
20 CLEAR 40, 30000
30 DEFUSR0=30000
40 FOR P=1 TO 30
50 READ A : POKE 29999 + P, A
60 NEXT P
70 CLS : PRINT@5,"ASCII TERMINAL RECEIVE"
80 PRINT"HOLD ANY KEY DOWN TO STOP"
90 A=USR(0) : A$=INKEY$ : IF A$ = "" THEN 90 : STOP
100 DATA 182, 255, 32, 132, 253, 183, 255, 32, 189, 141, 188, 38, 8, 141, 6
110 DATA 173, 159, 160, 2, 32, 235, 246, 255, 32, 202, 2, 247, 255, 32, 57

Receive computer routine for CoCo3

Use the above routine, but edit in these two lines;

10 POKE 150, 44 : POKE 230, 44
80 PRINT@34,"PRESS <RESET> BUTTON TO EXIT"
 

Source code for receive programs machine language subroutine

100 BYTEIN     LDA         65312
110                    ANDA     #253
120                    STA         65312
130                    JSR          36284             DLOAD Routine
140                    BNE        NODAT
150                    BSR        NODAT
160                    JSR         [40962]
170                    BRA       BYTEIN
180 NODAT    LDB        65312
190                    ORB       #2
200                    STB        65312
210                    RTS
220                    END
 
 
 

 Index        Hardware

Page last updated   Nov 15, 2001