12.5. How do I build a 2400/9600 bps RS-232 interface cable? + A new programming technique makes it possible to acheive 9600 bps on an + unexpected Commodore 64 without the use of a Swiftlink cartridge. + Daniel Dallmann of Denmark is the originator of this technique and is + currently writing modem drivers for some of the popular C64 terminal emulation programs to take advantage of this new technique. + The interface described below is a little more complex than the one + in Section 12.4, but has many advantages: + * The interface generates proper EIA232 (RS-232) voltage levels. + The one in Section 12.4 relies on the ability of most newer RS232 + equipment to handle lower voltages. + * The following interface can be used as a direct replacement for the + interface in Section 12.4, and will work will all existing + telecommunications programs at up to 2400 bps, while providing the + necessary interfacing to allow suitably equipped applications to + operate at up to 9600 bps. + * if you currently own a normal RS232 interface, that interface can be + modified to incorporate the new interfacing for 9600 bps operation. + (in some cases one line of the old interface has to be disconnected, + see note **1 ) + 9600 bps is the maximum limit this type of technique due to the timing + limitations of the C64. The delay between the activation of the NMI-handler + and the falling edge of rxd is too long. The handler must be called in + less than 100 cycles. That's no problem at 9600 bps, but for 19200 baud + (the next higher baud rate), you have only 50 cycles, and that's impossoble + (because of VIC-DMA ). On a C128 in fast mode 38400 baud may be possible, + but I don't have a C128, so someone else has to try it out. + Schematic of a very simple RS232-Interface: + userport MAX232 rs232 9pin 25pin + +----------+ + ! ! + (C) pb0--+ ! ! + ! ! /! ! + (B) flag2--*--------------------O< !--------- rxd 2 3 + ! 9! \! !8 + *7* sp2--+ ! ! + ! ! + *6* cnt2--+ ! ! + ! ! ! + *L* pb7--+ ! ! + ! !\ ! + (M) pa2--*--------------------! >O--------- txd 3 2 + ! 11! !/ !14 + *5* sp1--+ ! ! + 74ls00 ! ! + +-----+ ! ! + ! ! ! !\ ! + (D) pb1-*------>O-------------! >O--------- rts 7 4 + ! 1! !3 10! !/ !7 + +----! ! ! ! + 2! ! ! /! ! + (K) pb6--------O<-----*-------O< !--------- cts 8 5 + 6! !4 ! 11! \! !13 + ! !--+ ! ! + (1) gnd------! !5 ! !--- gnd 5 7 + 7! ! ! !15 + (2) +5V------! ! ! ! (dsr 6 6) + 14+-----+ ! ! + ! ! (dcd 1 8) + ! ! + ! ! (dtr 4 20) + ! !+ ! ! + (1) gnd------------! !-----! ! (ri 9 22) + ! ! 2! ! + ! ! + +! ! ! ! + (1) gnd------------! !-----! ! + ! ! 6! ! + ! ! + ! !+ ! ! + +-! !-----! ! + ! ! ! 1! ! + ! ! ! + +---------! ! + 3! ! + ! !+ ! ! + +-! !-----! ! + ! ! ! 4! ! + ! ! ! + +---------! ! + 5! ! + ! ! + (1) gnd--------------------! ! + 15! ! + ! ! + (2) +5V--------------------! ! + 16+----------+ + (x) - connections required for a normal RS232-Interface. + *x* - additional connections to go up to 9600 baud. + remark: The MAX232 needs 4 capacitors (22uF each) + to generate +/- 10volts signals. + notes : + **1 Some other interfaces use this pin. In that case you have to cut + the connection and change it to new way. PB7 is normally used to + receive the DSR (Data Set Ready) signal from the modem, but this + signal isn't supported by all terminal programs. Because of the new + wiring DSR will seem to be active to all 'old' programs, so that + there won't be any troubles. + Top view of the used ICs: + 74 LS 00 MAX232 + +------+ +------+ + inA -!1 \/14!- vcc +cap1 -!1 \/16!- Vcc + inA -! !- inC +cap2 -! !- GND + outA -! !- inC -cap1 -! !- RS232/txd + inB -! !- outC +cap3 -! !- RS232/cts + inB -! !- inD -cap3 -! !- TTL/^cts + outB -! !- inD -cap4 -! !- TTL/txd + gnd -!7 8!- outD RS232/rts -! !- TTL/^rts + +------+ RS232/rxd -!8 9!- TTL/rxd + +------+ + 4 X NAND + 2 X RS232 transmitter + 2 X RS232 receiver + user port (view on C64s backside) + 1 2 3 4 5 6 7 8 9 10 11 12 (top) + ------------------------------------ + A B C D E F H J K L M N (bottom) + 1 - GND A - GND + 2 - +5V B - ^flag2 + 3 - ^reset C - pb0 + 4 - cnt1 D - pb1 + 5 - sp1 E - pb2 + 6 - cnt2 F - pb3 + 7 - sp2 H - pb4 + 8 - ^pc2 J - pb5 + 9 - atn in K - pb6 + 10- 9V AC L - pb7 + 11- 9V AC M - pa2 + 12- GND N - GND