10.02.2013 Views

a E i - Commodore Is Awesome

a E i - Commodore Is Awesome

a E i - Commodore Is Awesome

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Ut m y<br />

;-way d-<br />

RS232<br />

ve a 25lave<br />

an<br />

a didn't<br />

Cornlimited<br />

rimmed<br />

wmally<br />

lunicaronous<br />

is not<br />

Vic ,20,<br />

1<br />

. is/4 is<br />

Thandle<br />

hiv<br />

in a<br />

e<br />

other<br />

Terent<br />

lave a<br />

e user<br />

by the<br />

es not<br />

ion by<br />

7). All<br />

y the<br />

Thus<br />

Fig 1<br />

(except in the case of the Plus/4) the<br />

user port coupled with the Kernel<br />

becomes almost the equivalent of the<br />

6551 UART (the 6551 is the device that<br />

the software is supposed to emulate).<br />

In the Vic the user port is controlled<br />

by a Versatile Interface<br />

Adaptor (VIA). In the other machines<br />

a Complex Interface Adaptor (CIA) is<br />

used (not a lot of difference as far as<br />

this article is concerned). Now before<br />

some of you run and hide at the<br />

mention of V I As and ClAs, let me say<br />

that (thankfully) we do not have to<br />

program these devices directly, The<br />

Kernel handles all of the RS232 associated<br />

programming.<br />

Figure 1 shows the RS232<br />

associated connections to this port<br />

looking from the rear of the machine.<br />

Note that the user port uses a 0.156"<br />

edge connector (available from<br />

Maplin: order number BK 74R). The<br />

Lop row of terminals are identified with<br />

numbers while the bottom row<br />

terminals are identified with letters.<br />

This means that it is very easy to<br />

connect the socket the wrong way up<br />

which could have disastrous con-<br />

sequences for your computer. The<br />

correct way is with the letters to the<br />

bottom as shown.<br />

RS232 LINES FROM THE USER PORT<br />

M T<br />

-<br />

3LAJ<br />

LBJ Lai ILI Lfi ILLI<br />

-<br />

1<br />

Received data<br />

Request to send<br />

1<br />

Data terminal rdy.<br />

Received line sig.<br />

Clear to send<br />

-<br />

Data set ready<br />

6<br />

Transmitted data Scut<br />

Received data S i n<br />

-<br />

A Protective ground GND<br />

Signal ground G N D<br />

1<br />

M<br />

r<br />

-<br />

9<br />

-<br />

1<br />

2 + 5 V supply<br />

Pin ID Description Abreviation<br />

Sin<br />

RTS •<br />

OTR<br />

DCD •<br />

CTS •<br />

DSR *<br />

•These lines are not used in 3-line mode<br />

Signal ground is the Common return.<br />

Protective ground for screening.<br />

Maximum of 100mA may be drawn from<br />

the +5V supply<br />

Connecting Up<br />

RS232<br />

The terminals labelled Sout (transmitted<br />

data) and Sin (received data)<br />

and GND (0v common) are the three<br />

lines we need. Note however that there<br />

are TWO terminals labelled Sin. The<br />

reason for this lies with the way in<br />

wrhich the RS232 on these machines<br />

works. One of the Sin lines is for data,<br />

the other is a fl ag or trigger input.<br />

Because the <strong>Commodore</strong> RS232 relies<br />

on Non-Maskable Interrupts (NMI) or<br />

interrupt request (IRQ) in the case of<br />

the Plus/4, there must be some form of<br />

detection to let the system know when<br />

data is being received.<br />

When data is being received over<br />

the Sin line, the voltage level on this<br />

pin changes rapidly, causing interrupts<br />

to occur. The system software collects<br />

the data on the Sin line, placing it in an<br />

area of memory called the Receive<br />

Buffer. There is also a Transmit buffer<br />

for outgoing data. Thus the reception<br />

and transmission of data is basically<br />

transparent to the user. However, this<br />

method has its problems as we will see.<br />

The practical upshot of all this is that<br />

BOTH Sin terminals must be<br />

connected to the Sin line. Since they<br />

are next to one another, this is no great<br />

problem.<br />

YOUR COMMODORE january 1987<br />

83<br />

Also note the connection called<br />

PROTECTIVE GROUND. This<br />

terminal should be connected to the<br />

shield of your cable if you suspect any<br />

outside electrical interference of<br />

causing data errors.<br />

While on the subject of making<br />

connections, you will have to use a<br />

soldering iron. Now don't run and hide<br />

(again). If you are not too sure about<br />

handling one, get an electronics<br />

hobbyist friend to do it for you.<br />

It should go without saying that<br />

YOU SHOULD NEVER MAKE<br />

CONNECTIONS TO THE SOCKET<br />

WHILE IT IS CONNECTED TO<br />

THE COMPUTER. Always<br />

disconnect the socket BEFORE making<br />

or changing any connections and<br />

NEVER connect the socket to a line<br />

machine. ALWAYS switch off the<br />

power BEFORE plugging or<br />

unplugging!<br />

OK. So you've connected your<br />

socket up and plugged it in the correct<br />

way... what now? If you only want to<br />

communicate with another<br />

<strong>Commodore</strong> (Vic, C64, Plus/4 or<br />

Cl28) then there is no great problem.<br />

The only thing to watch is that you<br />

must connect the Soul of one machine<br />

to the Sin of the other as in Figure 2 in<br />

order for them to exchange data (a bit<br />

obvious really!).<br />

<strong>Commodore</strong> connections<br />

If you don't intend connecting your<br />

machine to anything other than<br />

another <strong>Commodore</strong>, you can skip the<br />

next bit all together and get on with the<br />

programming. If you have a friend<br />

with one of the machines mentioned,<br />

you will be able to type messages to<br />

one another handy if you live next<br />

door and you have a long piece of 3core<br />

cable — your own mini-network!<br />

(Not recommended if you live across<br />

the street or several houses away!)<br />

How far you will be able to keep the<br />

machines apart depends very much on<br />

the operating conditions. Electrical<br />

interference may cause errors and<br />

there will come a point where the line is<br />

just too long. It's best to experiment<br />

with what you've got.<br />

Non-<strong>Commodore</strong> Connections<br />

This is where things get tricky. Connecting<br />

to anything other than a<br />

similarly equipped <strong>Commodore</strong> has its

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!