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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1<br />

S ome (if not most) of you will have<br />

heard by now of that favourite of all<br />

computer industry subjects. the RS232<br />

communications standard. People<br />

have been known to go weak at the<br />

knees and hide when it is mentioned.<br />

Every day, it causes problems for<br />

computer engineers connecting up<br />

equipment such as printers and<br />

modems. It has even given rise to a<br />

lucrative business of building the socalled<br />

"break-out boxes" for<br />

monitoring and "fixing" RS232 lines.<br />

If it is supposed to be an industry<br />

standard, why does it cause so much<br />

hassle? Every computer manufacturer<br />

has different ideas on how to build a<br />

computer; which devices to use, how<br />

big the screen should be, etc. It would<br />

seem that this train of thought also includes<br />

the RS232 standard.<br />

Now, before I go on. let me say that<br />

the idea behind RS232 is great. A<br />

standard interface for connecting<br />

different types of hardware (including<br />

computers) together. RS232 is really<br />

useful in the field of telecommunications.<br />

Modems are usually connected<br />

to a computer via an RS232 link. You<br />

can connect two computers together<br />

and transfer programs between them<br />

(a technique often called "porting").<br />

Unfortunately, things are not this<br />

simple. With different manufacturers<br />

having different ideas on how to implement<br />

the standard (<strong>Commodore</strong> is<br />

no exception) a great deal of confusion<br />

can arise when two pieces of hardware<br />

are to be connected together. Most of<br />

this confusion surrounds the way in<br />

RS232<br />

Interfacing with<br />

the RS232<br />

Many people switch off when they hear the mention of<br />

the RS232 interface and related subjects. This article is<br />

aimed at clearing up some con fusion and doubt.<br />

By Steve Carrie<br />

which the control lines of an RS232<br />

should be used. Thankfully, this does<br />

not concern us in this article since we<br />

will be using only a basic RS232<br />

interface.<br />

Basic RS232<br />

As you may know, RS232 uses the<br />

serial method of data transmission.<br />

Information is sent bit by bit along a<br />

single wire to a receiving machine.<br />

Since data may flow in both directions,<br />

two wires plus a common return are<br />

required to make a basic RS232<br />

communication line. The lines are<br />

usually connected to equipment by a<br />

25-way D-type connector. Data<br />

leaving a computer exits via pin two<br />

and incoming data enters via pin three.<br />

The Ov return is connected to pin<br />

seven. This gives the "3-line" RS232<br />

interface. There is no control over the<br />

flow of the data in either direction<br />

unless handled by the software (more<br />

on this later), An RS232 interface<br />

using more than these three lines is<br />

known as an "X-line" interface.<br />

It is best to use a three or four core<br />

cable with a shield (we will see why in a<br />

moment) rather than separate wires.<br />

For the purposes of this article, this<br />

is all we require. "Ah yes" you say,<br />

3-LINE RS2 INTERFACE<br />

pin<br />

3<br />

7<br />

YOUR COMMODORE january 1987<br />

82<br />

"that's all very well but my<br />

<strong>Commodore</strong> doesn't have a 25-way dtype<br />

connector let alone any RS232<br />

interface". True it doesn't have a 25way<br />

connector but it does have an<br />

RS232 interface. You mean you didn't<br />

know'?<br />

<strong>Commodore</strong> RS232<br />

Since the time of the Vic 20, <strong>Commodore</strong><br />

gas "programmed" in a limited<br />

form of RS232 port. I say programmed<br />

because the hardware device normally<br />

associated with RS232 communications.<br />

the Universal Asynchronous<br />

Receiver/Transmitter (UART), is not<br />

present in the circuitry of the Vic 20,<br />

C64. 64C, C128 and C 128D. The<br />

omission of the CI 6 and Plus/4 is<br />

intended. The CI6 cannot handle<br />

RS232 comms (we shall see why in a<br />

moment). The Plus/4 on the other<br />

hand is omitted for a different<br />

reason. This machine DOES have a<br />

UART.<br />

RS232 signals appear at the user<br />

port. This is exactly the reason why the<br />

C16 cannot handle RS232; it does not<br />

have a user port (a strange omission by<br />

<strong>Commodore</strong>. Anyone know why?). All<br />

the conversion is handled by the<br />

Operating System (Kernel). Thus<br />

CONNECTIONS (25-way D-connector)<br />

function<br />

Transmitted data Sout<br />

Received data Sin<br />

Common (0v) Gnd

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

Saved successfully!

Ooh no, something went wrong!