From: warren@col.hp.com (Warren Tustin)
Subject: Re: How do you make an RS-232 cable?
Date: Mon, 31 Aug 1992 21:56:28 GMT
Organization: HP Colorado Springs Division

nag@cmutual.com.au (Neville Grills) writes:
> Does anybody have any instructions or a circuit diagram
> (or know where I could get one) of how to make an RS-232 cable from
> the user port of a C64? I have a modem but can't connect it to the 
> commodore. I could buy one but I'm too cheap. There are instructions at 
> cwaves I believe but I think its still off the air. 
> 
> Any help appreciated
> 
> Neville             
> -- 
>  ___ _                       |Neville Grills, Systems Analyst   
>   /|/ __ __                  |Colonial Mutual Life Australia. (ACN 004021809)
>  / | /_((_/                  |EMAIL:  NGrills@cmutual.com.au
> _________/___________________|PHONE:  +61-3-6076585   FAX:  +61-3-6076198  

*******************************************************************************

I have posted this before, but it has been awhile.
It works for me and didn't cost much.

Warren Tustin
warren@col.hp.com
--
*******************************************************************************
*******************************************************************************

Here are the plans for an User port TO RS232 connector using just ONE IC and
4 capacitors.  It uses a Linear Technology LT1133 buffer that has 3 RS232
drivers and 5 receivers.  It has worked for me with no problems and takes
a minimum amout of wiring to get to work.  My board is only the width of
the user port and about 1.5 inches deep in size.

Parts list:
     LT1133CN plastic dip or LT1133CJ ceramic dip RS232 driver from Linear
        Technologies
     (It takes 27mA max (17mA typical) so is well below the 100mA limit of
     the user port)
         Driver In pins  (15,19,21)  TTL/CMOS compatible.  Unused inputs
		           |  |  |   should be tied to +5v.
         Driver Out pins (11, 7, 5)  RS232 compatible.  Short circuit 
			             protected from -30v to +30v.
         Receiver In pins  (6, 8, 9, 10,12)  Accept RS232 levels (+-30v)
			    |  |  |   |	 |   and have 0.4v of hysteresis to
			    |  |  |   |  |   provide noise immunity.
         Receiver Out pins (20,18,17,16,14)  TTL/CMOS outputs.

	 NOTE: Lines above indicate which inputs go with which outputs, and
	       the pairs can be interchanged freely.  I connected them as
               described below because the wiring worked out the best for me. 

     4 - >= 1uF capacitors   Used to generate RS232 voltages by a charge pump
	  		     technique inside IC
     1   1uF capacitor  To bypass the 5volt supply for noise rejection.

     1   User port female connector.  (I just dug this up, I'm not sure 
	 where these can be found, I think it is 0.159" spacing, 24pin.

     1   RS232 25pin female connector.  Can be found at R-Shack
	
     Some sort of .1" spacing proto board

Connections:

User port connector (Looking into the C64 or C128)

         1  2  3  4  5  6  7  8  9 10 11 12
	------------------------------------
	|XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX|
	------------------------------------
	 A  B  C  D  E  F  H  J  K  L  M  N

Ground & Power:
  Pins 1, A, 12, N to Ground of board.
  LT1133 pin 2 to pin 2 of User port connector (+5 volts)
  1uF capacitor between pin2 and ground (bypass cap)
  LT1133 pin 13 to Ground.
  RS232 connector pins 7 & 1 to Ground.
 
LT1133 capacitors:
  1uF from pin 1 (V+) to ground  (If polarized (electrolytic) + side to pin 1)
  1uF from pin 24 (V-) to ground (As above but + side to ground)
  1uF from pin 3 (C1+) to pin 4 (C1-) (Again if polarized, + side to pin 3)
  1uF from pin 22 (C2+) to pin 23 (C2-) (Again if polarized, + side to pin 22)
    

    Commodore side                                       RS232 side
  User port    Signal    Pin of       Signal        Pin of       RS232
  pin          name      LT1133      direction      LT1133       connector
  ---------    ------    ------      ---------      ------       ---------
   B  FLAG2     Din        20         <--             6              3
   C   PB0	Din     also connect to above pin 20
   D   PB1      RTS        21             -->         5              4
   E   PB2      DTR        19         <--             7              20
   F   PB3      RI         18             -->         8              22
   H   PB4      DCD        17             -->         9              8
   J   PB5      Not used
   K   PB6      CTS        16             -->         10             5
   L   PB7      DSR        14         <--             12             6
   M   PA2      Dout       15             -->         11             2


This assumes that you want to connect all of the communication lines.  I did
it this way because the C128 programmers reference guide had all of the signals
above listed.  If you want to drop RI (ring indicator) you could also use an
LT1134 which has 4 drivers and 4 receivers.

****************************************************************************
                           warren@col.hp.com
****************************************************************************
Newsgroups: comp.sys.cbm,misc.forsale,misc.forsale.wanted