Date : Tue, 28 May 1996 09:14:54 +0100
From : ihardcas@... (Iain Hardcastle)
Subject: Re: Unidentified subject!
I cobbled a lead together the other weekend to transfer software from
Beeb to PC and vice versa. The lead was simple with wires soldered to
paper clips dangling out the back of the Beeb - BUT IT WORKED. All I
did was wire TXD to RXD (Beeb to PC) and RXD to TXD, RTS to CTS, CTS
to RTS and on the PC end, DSR into DCD. That was it. Using Modem
Master software and a 1983 Xmodem for PC, I can get a wacking 1200
baud.
There is no way to tell COM1: from COM2: on a PC chassis. It is
usually marked on the case though. It sounds as if your PC might be
either old or a clone with the async ports on a card rather than the
motherboard?
What I need is a way to transfer the software presented on the Web
pages (the disk images) onto the BBC. Preferably a whole disk image at
a time. I have use the FDC and the modified FDC with some success - It
was OK at writing SSSD40 disks - sometimes - but anything else went
poopoo. Any body have any ideas. Also anybody want to trade some
software - I guess that due to the fact that there are loads of
software images on the web then people aren't gonna mind swapping
software.
Cheers
Iain
PS - chjohns - you'll get your beer money soon - I get paid on friday!
______________________________ Reply Separator _________________________________
Subject: Unidentified subject!
Author: bbc-micro@... at internet
Date: 5/22/96 6:04 PM
The uncertainty has lasted for over two weeks, battles have been fought
over it, people almost experienced nervous breakdowns, but...
THE SOLUTION HAS BEEN FOUND
****************
* THE SOLUTION *
****************
In order to transfer software from a BBC to a PC and vice versa via a
serial link one can NOT suffice with cross-wiring the data-in/data-out
pins and cross-wiring RTS/CTS.
I'll get you the subtleties and theory later, but you need to make the
following connections:
Pin Pin
(9 P) (25 P) PC BBC Pin
==== ====== == === ==
5 7 0V (Ground) Gnd (Ground) 1
2 3 RxD (Data in) -------------- TD (Data out) 2
3 2 TxD (Data out) -------------- RD (Data in) 3
1 ? DCD ---+---------- RTS 5
6 6 DSR ---+
4 20 DTR ----------------CTS 4
7 ? RTS ---+
8 ? CTS ---+
Pin numbering
============
PC: BBC:
9-pin D-type or: 25-pin D-type 5-pin Domino DIN-plug
(male)
_____________ _______________________ _____
\ 1 2 3 4 5 / \ 13 12 . . . 2 1 / / \
\ 6 7 8 9 / \ 25 24 13 14 / / 5 3 \
--------- ------------------- | 1 |
\ 4 2 /
\ /
-----
The views of these figures are all from the outside (the backs of the
computers) into the sockets, i.e. they show the wiring sides of the plugs.
**************
* THE THEORY *
**************
I spent the best part of the last four days trying to find out the above
solution and finding why other solutions don't (always) work.
The problem was finding out how the hand-shake of the RS423 and RS232
works. (We all knew we had to cross-wire Data-in and Data-out, didn't
we?)
The reason for this problem, and also the reason why there appeared to
be two "schools" of people on how to connect a Beeb and a PC, is
two-fold:
- the RS423 and the RS232 are only *interfaces*. An
interface definition only defines the *local* aspects of an
interconnection between the computers and not the *remote* aspects.
(Both the local and remote aspects together form the communication
*protocol*, which is the important thing in our case. For a good
treatise on interfaces and protocols read "The design of Telematics
Systems" by C. Vissers who is my PhD supervisor :)
- the RS232 interface definition (CCITT V.40 or V.42, I believe) is just
plain bad (its definitions of the functions of the pins are ambiguous).
If the above sounds a bit too theoretical to you: the problem is that
you have a lot of freedom in connecting the pins, depending on the
communication protocol you use.
On the Beeb the above is not much a problem, because the RS423 is very
simple: if the Beeb wants to send it raises its RTS signal and waits
until its CTS signal is raised by the other computer; for receiving it's
the other way round.
However, the RS232 of a PC is more complex. Its definition suggests (but
not necessarily prescribes) that the DTR pin has a function similar to
the Beeb's RTS pin and the DSR pin a function similar to the Beeb's CTS
pin. Most protocols implemented on the PC (and all I tried) adhere to
this. This is why you have to connect the Beeb's RTS to the PC's DSR and
the Beeb's CTS to the PC's DSR.
But things are more complex. The RS232 also has a DCD (data carrier
detect) pin, which can be used to detect if there is a device connected
to it. Most (but not all) protocols implemented on a PC use this. The
easiest way to "circumvent" this is to connect this pin to the PC's DSR
pin, so that every time it receives a DSR-signal, the PC automatically
knows there is also a device connected.
To make things even more complex, the RS232 also has an RTS and a CTS
pin, albeit with different functions than on a Beeb. Some protocols
implemented on the PC use these for a second handshake after the
handshake with DTR/DSR/DCD. (Don't ask me what it is good for.) The
easiest way to "circumvent" this, is to connect the PC's RTS pin simply
to its own CTS pin.
***************
* TO CONCLUDE *
***************
- The wiring required for the handshake depends on the protocol you use.
- Nearly all protocols implemented on the PC treat the DTR pin as the
Beeb's RTS pin and the PC's DSR pin as the Beeb's CTS pin; so you need
to cross-wire these.
(To the people who suggested cross-wiring RTS/CTS on both computers:
I'm not saying you were wrong or that your suggestion will never work;
however, if it works for you you're using a pretty esoteric protocol
and it will probably not work with most other protocols.)
- Many protocols implemented on the PC also wait for a DCD signal during
handshake; therefore it's useful to connect DCD to DSR on the PC.
- Some protocols use a second hand-shake. In order to "circumvent" this,
connect the PC's RTS pin to its CTS pin.
*************
* SOME TIPS *
*************
If you plan to wire up your BBC to a PC, you might learn from what I
have done wrong:
- You can insert the BBC-plug into the RS423 port in two ways. Do it
the right way! (A handy tip I received is to put some Tippex on the
top of the plug.)
- Find out which PC's RS232 port is COM1 and which one is COM2. I thought
COM1 is always the 9-pin socket and COM2 always the 25-pin socket, but
on the PC I used it was exactly the other way round! (Btw. Does anyone
know of an easy way to find this out?)
- Tom Seddon's Serial Transfer Utilities (to be found at Wouter
Scholten's or Robert Schmidt's homepages) are very handy. However,
Tom forgot to mention that when using his SENDXFER program you also
have to type *FX7,4 on your BBC (to set the receiving baud rate of
the Beeb at 1200).
- Tom Seddon's BBCXFER for the PC may crash on PC's with little memory.
(It did on my father's AT with 1 MB.) I found that Window's terminal
program is a good alternative.
- Tom Seddon's utilities require QBASIC. This was included in the MS-DOS
versions 5 to 6.20 (I think). Get it from a PC nearby you!
- If you want to experiment with the different types of handshaking
described above: it is easy to do so with QBASIC. Look at the help
item for "OPEN COM".
******************
* AND FINALLY... *
******************
Now I can transfer software from a BBC to a PC and vice versa, I'll make
the above knowledge available on my WWW home page. In a short while
you'll also be able to find there the software I transferred. (However,
I do not intend to duplicate Wouter Scholten's or Robert Schmidt's work,
so I'll only put software there that's not on their home pages already.)
Currently I'm writing some utilities to ease the BBC <--> PC file
transfer (based on Wouter Scholten's archive format for storing BBC
files and Tom Seddon's Serial Transfer Utilities). If I succeed, I'll
make the software available at my BBC home page.
And then I had this great idea... It shouldn't be too difficult to write
a BBC and PC program that together allow you to use your PC's hard disk
as a BBC disk drive. Image being able to type *DRIVE 5 at your BBC and
then accessing your PC's hard disk (via a serial cable and a piece of
software running on your PC) as if it were a normal Beeb drive. If only
I didn't have to write this thesis... Anyone up to it?
(Btw. My BBC Home page isn't up yet; but it will be in a couple of weeks;
I'll keep you informed. If, however, you want to read about my
professional, literary, or sexual interests, or want to see me wearing a
tie, you can find my personal home page at
http://wwwtios.cs.utwente.nl/~deweger/)
Anyway guys (any girls on this mailing list?), I thank all of you
who have responded in order to help me solve this huge existential
problem.
Amen.
Mark.