>#28 2 20 Jan 87 19:44:12 (RECV'D) >From: J. Random User >To: Ozzie Osband, Sysop UNITEX BBS 212 569 5459 >Subj: What stop-bit means. > >I would like to know what stop bit, parity, and word length mean. > > WHAT? You DARE to learn the archane secrets of Data Communications? After all, Data Comm is the only area of computers that would require you to know anything of the sort. OK then, I'll tell you. Character Parameters for Data Communictions Copyright 1987 Robert Osband Sysop, Unitex BBS +1 212 764 5912 When using computers there are various things that "mere users" were never meant to know. They hit a keystroke, and a character appears by "magic". Arthur C. Clarke, the noted Science writer and Science Fiction author is quoted as having said that "Any sufficiently advanced technology is indistinguishable from Magic". I used to hate resorting to calling computers "magic" as most of my non-techie friends did, but then I realized they were comfortable with the analogy, so I simply started teaching them the conjourer's tricks to become magicians. People who start using their computers for data communications, however, need to learn a little bit more about their "communications paramaters" in order to be able to properly interface their computers with others across the room, or across the oceans of the world. Everyone who delves into computers learns a few fundimental things. For one thing, everyone knows that a Byte is eight bits long (sorry, this article assumes you know what a bit is, but you might pick it up out of context in a minute). Yet the characters of the American Standard Code for Information Interchange (ASCIIS are seven bits long. There is one extra bit available for "playng with", and this bit is usually called the "parity" bit. The simplest form of "error detection" is to count up the number of bits in a character, and see if that number is odd or even. Let's use odd parity, and see what various ASCII characters would look like. The letter "E", for example is 1000101, with three "1"'s. The eight-bit representation would be 01000101. The letter "H" is 1001000, and would be 11001000, giving it an odd number of one bits. To explain Stop-bit, we have to get down into even grittier stuff, and explain some basics of asynchronous communications. With most computer terminals in use today (and personal computers try very hard to emulate terminals when communicating with remote computers), there can be any amount of time between keystrokes. When you type the word "the", you type rapidly because you use it alot, and know where the keys are, but when you type "hydrofoil", you may actually run off to the dictionary first, to check the spelling and five minutes could elapse before you hit a key. In practise, pauses are between .01 and 1.5 seconds while typing, but to a computer these are significant pauses. Remember that Binary Digits (Bits, I suppose I had to define them sooner or later) are either 1 or 0. The pause between characters is like a continuous stream of insignificant 0's. We need a "start bit" to "wake up" the other end that a character is coming in, and to start "clocking" the time, since 0's are now significant. A Carriage Return character is 0001101. With odd parity, it would be 00001101 (count the zero's, there is a difference between those two groups). The start bit is never mentioned because it is always there. You can't have asynchronous communications without it (yes, there is "synchronous communications without them, but you're getting too far ahead of me). With the start bit, our Carriage Return is now 100001011. Now the problem is that some of our equipment is so old that it needs a time interval to deal with the information before the next character comes in. This is where the Stop-bit comes in. In transmissions of 110 Baud, the equipment involved were usually Model-33 Teletypes with electromechanical mechanizms for printing computer output on paper. The machine needed the interval of two-bits worth of time to send the incoming character to the printer, before the next character came in, if the computer was sending a burst of information as it usually was. Therefore, these TTY's needed two stop bits at the end of each character. Machines at 300 Baud and above usually get by with 1 stop bit, since they usually take advantage of higher technology computer memory buffers. So now our looks like 1000010110. Our original 7 bit ascii character now contains 10 bits. Over the course of a 4 kilobyte file, this overhead becomes significant. This is why synchronous protocols came about. With synchronous data communications, you can drop two bits per character. Over our hypothetical 4 kilobyte file, that saves 1000 characters worth of transmission time. Word Length is one of those things that gets obscured by by time. True "computer science" people look at the length of what's called a "binary word". To us down here in "micro-land" we're talkin' about a Byte. The question becomes, how long a byte? There used to be 5 bits per character for Telex, and 6 for obscure flexowriter code, but this is NOT a course in ancient history (buy me a beer if you want the Telex lecture). Some communications packages ask the word length, and then give a choice of parity. If you choose a word length of 8, however, you can only choose no-parity, or ignore-parity, or else generate an error message. With a 7 bit word length, your choice of what the eighth bit will do with the parity bit is actually meaningful. Many people will rack their brains trying to figure out why they get errors trying to set 8-bit words with odd parity. If you are trying to send characters in the IBM-PC Graphic Character Set (those greek letters, and such), or if you're trying to send WordStar files as ASCII text, you'll need to be set for an 8 bit word length.