Ascii, Parity bit – Watlow Series 988 Family User Manual

Page 8

Advertising
background image

1.4

Introduction to Data Communications, Chapter 1

Data Communications with the Watlow Series 988 Family

Maximum

Maximum

Cable

Net Length

Controllers

Type

EIA-232

50 feet

1

3-wire

EIA-485

4,000 feet

32

3-wire

EIA-422

4,000 feet

10

5-wire

ASCII

The ASCII code defines 128 separate 7-bit characters — one for each letter, digit
and punctuation mark. ASCII also includes control characters similar to those we
find on computer keys, like "backspace," "shift" and "return." It also has ten com-
munications control characters for "identification," "enquiry" (inquiry), "start of text,"
"end of text," "end of transmission," "acknowledge," "negative acknowledge" and
"escape."

The ASCII code is sometimes written in a base-16 number system, called hexa-
decimal or "hex" for short. The first ten digits of this system are represented by the
numbers 0 through 9, and the final six digits are represented by the letters A
through F. The 128 ASCII character code with the decimal and hexadecimal
equivalents is listed in the Appendix.

Parity Bit

Remember that ASCII is a seven- or eight-bit code. What about that eighth bit? It's
called the "parity" bit. A parity bit is added to the ASCII character to verify the
accuracy of the first seven bits. Here's how: We are declaring that the number of 1s
in the 8-bit character frame will be either always odd or always even. To do that,
about half the time we'll have to add another 1 to get an odd or an even number of
ones. The other half of the time we'll need to add a 0 so we don't change the total
number of 1s.

This way we can detect a single error in the seven-bit group. Take a look at the
representation of the transmitted upper case "W." In this case we have selected
"odd" parity. The number of 1s in the first seven bits, plus the parity bit, must
always total an odd number. The total number of 1s in the binary character
1010111 (W) is 5, already an odd number. Thus our parity bit will be a 0.

If we were transmitting the lower case "w" (binary 1110111), the parity bit would be
a 1 because the total number of 1's in the character frame is 6, an even number.
Adding the parity bit makes it odd, and consistent with the odd parity rule.

If a noise spike came onto the data line and changed the signal voltage level
enough to reverse a 1 to a 0 in the character frame, the receiver would detect that

Table 1.4 - Compar-
ing Interfaces.

NOTE:
The Modbus feature
on the Series 988
controllers allows up
to 247 controllers to
share one EIA-485
network, by using
network bridges.
See Chapter 6 for
more information on
Modbus.

Figure 1.4 - ASCII
upper case "W"
(1010111).

7-bit character

odd parity bit

bit position:

1

2

3

4

5

6

7

8

0

1

ASCII

-V

+V

Advertising