1 / 15

ENEE 440 Chapter 10

ENEE 440 Chapter 10. Data Communication. Parallel transmission Data is sent 8 bits (byte) at a time over 8 data lines. A few handshaking lines may be needed. One uses a 25-pin D-shell connector and cable(DB-25 or equivalent)

waneta
Download Presentation

ENEE 440 Chapter 10

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ENEE 440Chapter 10

  2. Data Communication Parallel transmission Data is sent 8 bits (byte) at a time over 8 data lines. A few handshaking lines may be needed. One uses a 25-pin D-shell connector and cable(DB-25 or equivalent) Serial transmission Data is sent one bit at a time over one data line. In theory and principle one needs only two lines for data, one for the signal and the other for ground. A few clock and handshaking lines are needed and in many PCs a 9-pin connector is used.

  3. Serial Communication . . . Details Synchronous serial communicationmeans that the sending and receiving devices are synchronized (“in sync”) by means of special SYNC bytes that are agreed upon prior to the transmission of data Asynchronous serial communication means that instead of trying to stay in sync, special startand stopbits are used to ensure that the correct byte of data is received. It is simpler to implement and is commonly used in PCs Disadvantage of the asynchronous method is the excessive overhead. This means that for every byte of data that is transmitted, 2 or 3 bits are used to indicate the start and stop of that one byte of data.

  4. Asynchronous serial communications • A frame consists of one start bit (0) plus the byte of data plus the parity bit plus the stop bit(s) [Always HIGH] • A protocol has to be established between the sending and receiving devices before the data can be transmitted. Protocol means an agreement about: • 7E1 means that the protocol is 7 bits of data, even parity, and 1 stop bit. Overhead is 30% • 8N1means 8 bits of data, no parity bit and 1 stop bit. Overhead is 20%

  5. An Example is Worth a Thousand Words! 7E1 protocol showing a 10-bit frame with 7-bit data (ASCII code for “C” is 43H, see ASCII chart), 1 start, 1 stop and even parity. START D0 D1 D2 D3 D4 D5 D6 PARITY STOP 0 1 1 0 0 0 0 1 1 1 8N1 protocol shows a 10-bit frame with 8-bit data (ASCII code for “C” is 43H, see ASCII chart), 1 start, 1 stop and no parity bit. START D0 D1 D2 D3 D4 D5 D6 D7 STOP 0 1 1 0 0 0 0 1 0 1

  6. Basics of serial communications • Baudrate is the same as the bits per second. 9600 baud means that data is being transmitted at the rate of 9600 bits per second (bps) • Half-duplex means that data can be sent and received but one at a time • Full-duplexmeans that data can be sent and received simultaneously • Parallel - to - Serial convert the data that comes out of the data bus in parallel form into a stream of 1s and 0s (serial data)

  7. Modems and FSK • Modem(modulator / Demodulator) converts the digital data into audible tones • FSK(Frequency Shift Keying) 2225 Hz represents 1 and 2025 Hz represents 0 in one direction and 1270 Hz represents 1 and 1070 Hz represents 0 in the other direction. These tones can easily be transmitted by the phone lines • 8250/16450/16550UART (Universal Asynchronous Receiver Transceiver) and the 8251USART (Universal Synchronous Asynchronous Receiver Transceiver) convert parallel to serial and vice-versa and add start/stop bits and clocking

  8. 8251 USART

  9. C / -D When this line is LOW the data register of the 8251 is selected C / -D When this line is HIGH you read the status register C / -D When this line is HIGH you write tothe command registerexcept the first time after reset you write to the mode register TxRDYgoes high to indicate that the USART is ready to receive another character from the CPU RxRDY goes high to indicate that a character is ready to be read by the CPU.

  10. -CTS Modem ready for data from PC -RTS is a signal from the PC to the modem that the PC would like to transmit a byte of data to the modem. -DTR(Data Terminal Ready) is a signal from the PC to the modem that the PC is in working condition -DSR (Data Set Ready) is a signal from the modem to the PC that the modem is in working condition

  11. How about two examples . . . please? What is the mode word for 7E1 at 9600 baud. Assume the base address of the 8251 is 350H and that TxC and RxC are tied to a 153.6 kHz clock. Look at the mode word chart as we answer this question. 153600/16 = 9600. So our baud factor is 16. We have 7 data bits, even parity and 1 stop bit. The mode word is 01111010 = 7A Write the instructions to send the letter C. mov al , 43H ; 8251 takes care of framing! out 34FH, al ; address of data register.

  12. RS -232 • HIGH is a voltage between -3V and -25V and a LOW as +3V and +25V • The voltage levels most commonly used are -12V (HIGH) and +12V (LOW) • Since digital data comes out as 0V and 5V, there are special level translationchips that convert TTL -to- RS232 and RS232-to-TTL • The chip set most universally used was MC1488 for TTL -to- RS232 and MC1489 for RS232-to-TTL. A popular chip is MAX 232C.

  13. RS -232 . . . The Devil’s in the Details • Digital lines going out of the UART are connected to an MC 1488 whose output is connected to an RS232 cable • The other end of the RS232 cable (not more than 50 ft. away) is connected to an MC1489 whose TTL output goes to the modem • Similarly, the TTL output of the modem is fed into an MC1489 whose output goes into the same RS-232 cable. The other end is connected to an MC 1489 whose output goes to the UART

  14. Another Example 9-pin cable 25-pin cable Line name 3 2 TxD 2 3 RxD 7 4 -RTS 8 5 -CTS 6 6 -DSR 5 7 GND 1 8 -CD (carrier detect) 4 20 -DTR 9 22 RI ( ring indicator)

More Related