• Keine Ergebnisse gefunden

SERIAL INPUT/OUTPUT

Im Dokument Self-Study Course (Seite 137-143)

DATA FORMAT

9.2 SERIAL INPUT/OUTPUT

We can attach a meaning to the time of arrival of a data bit, just as we attach a meaning to its position in a binary number. To communicate an eight bit number from one machine to another, the sender outputs a discrete signal on one bit of ~ data port, thereafter sending successive bits at fixed time intervals. In the early days of computers it was common to send a data signal and

two timing signals as discrete outputs.

IDRD MARK

DATA

I __ _

0 1 1 0 1 1 1 0

9.2.1 Signal Coding

These signals are easy to generate and interpret. The sender switches the clock signal at some convenient time interval.

Each time it is switched low, a new data bit is sent on a separate line. The receiver observes the clock

the clock switches high. The first accompanied by a word mark. This that if an occasional bit is lost the garbled.

and reads the data bit when bit of each word is delineates characters so entire message will not be

DATA FORMAT This scheme is simple, but transmitting it over long distances is extravagant as the timing signals carry very little information. If both transmitter and receiver have accurate ~iming sources, the bit clock is unnecessary. The receiver can recreate it, starting from the edge of the word mark. There are· several ways of transmitting the word mark on the same wires with the data,

thereby greatly reducing the cost.

-u u

LJ LJ LJ LJl \

0 1 1 n 1 1 1 0 1 1 1 1 n 1

()

0

We can put time intervals between words on the data line and fit the word marks irito the intervals. If they can be distinguished from the data bits (by a narrower or wider pulse, or a different frequency, for instance) they will still serve the same function.

9.2.2 Synchronous Communication

A technique which is in common use is to send word marks only infrequently, maintaining a well synchronized clock over a long message. The word mark is now transmitted not as a _single pulse for each word, but as a special, recognizable pattern called an Idle character.

rnLEIIIIIIIII 111111111

DATA_Jj 111111111111111111111111111111111

This is merged into the normal data stream as though it were part of the message. It fulfills the

controlling boundary

synchronization of the bit of a character. When

role of a and in

word mark in marking the clock

the receiver is seeking synchronization, it collects eight bits and compares the pattern with that of the known idle. If the pattern is wrong it discards the oldest bit and shifts in the next. This continues until the idle pattern is recognized, indicating that synchronization has been achieved and communication can begin. It is common in such systems to have at least some degree of reverse communication or feedback from the receiver to the sender, which is used to say "OK"

or "HELP". This is called a supervisory channel and is only used to operate the communication system, not to transmit messages.

DATA FORMAT This

the

method is referred to as "synchronous communication" because of requirement for continuously synchronized send and receive signals. After the initial period of seeking synchronization, the receiver stays synchronized by observing signal transitions in the data stream. Its crystal clock is able to maintain sync even if long strings of data are a 11 ones or a 11 zeros, of if the si gna 1 is temporarily lost. Thus all the signals on the communications line are part of the message being sent. If there is a break in the message, the sender must fill the spaces with idle characters so that the time from the beginning of one word to the beginning of the next is always exactly one word time.

9.2.3 Asynchronous Communication

An alternative method is especially suited to devices such as the . te 1 etype, whose characters are transmitted and received asynchronously. There may be long pauses between characters, but occasionally one character will quickly follow another.

The transmission rate for a teletype is usually 10 characters per second or approximately 120 words per minute ( a very fast typing speed). The same signal format has been adopted for faster electronic communication devices.

In asynchronous communication each character is independent and carries its own word mark. The adopted convention is for each data character to be preceded by a zero, followed by one or more bit-times

(intervals) of the "one" signal.

LJ LJ

J

1 1 1 0 0

STARI'

1 STOP 1

oj J

STARI'

0 0 1 1 1 1

1 1

J

STOP

After some period of time with no data, (i.e. constant "one"

signals) the receiver will see a transition to zero. This signals the start of a character, and the receiver synchronizes its clock.

( TRANSITION DETECTED

~

ST O 1 1 0 1

I ___ _..

J~\ '\. (

CIOCK CHECK

~

READ DATA

SYNCHOONIZED STARI' BIT BIT

1 1 0 STOP

CHECK .

STOP_-/' BIT

DATA FORMAT One half bit-time later the receiver checks the start bit. If it is not zero, an error has been made. Thereafter the receiver accepts eight bits, reading them at one

tests the stop bit to see that it is a "one".

bit-time intervals, then Now the receiver waits until another transition to zero marks the start of next character.

Within a character the data are transmitted least significant bit first, so the sequence is:

Start Bit Bit 0

Bit 7 Stop Bit

(optional addiitional stop bits)

This data format has been adopted for asynchronous communication by the American National Standards Institute and by CCITT. The data content is also coded in a standardized form. These standards were promulgated by the American Standards Committee on Information Interchange (ASCII).

Im Dokument Self-Study Course (Seite 137-143)