Top Banner
EXPERIMENT NO. 1 OBJECTIVE: To study different types of transmission media. APPARATUS REQUIRED: DCT-03 Kit 9 Pin D connector Cables – 2 Nos. Computers – 2 Nos. Connecting Chords Power Supply THEORY: There are different types of transmission media which are classified as: i) Serial Communication ii) Parallel Communication 1) Serial Communication Serial communication usually requires a minimum of 2 wires for data transmission in one direction. One wire is for data and other is for ground. Need for Serial Communication: Within a system data is transferred in parallel because it is the fastest way to do so. For transferring data over long distances, however, parallel data transfer requires too many wires. Therefore, data to be sent to long distances is usually converted to serial form from parallel form so that it can be sent on a single wire or a pair of wires. Serial data received from a distant source is converted to parallel form so that it can be easily transferred to system bus. Three terms often encountered in serial communication are simplex, half-duplex and full duplex. A simplex data line can transmit data only in one direction. A mouse sending data to CPU is an example of simplex communication. Half-
45
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Data Communication Lab Manual

EXPERIMENT NO. 1

OBJECTIVE: To study different types of transmission media.

APPARATUS REQUIRED:

DCT-03 Kit 9 Pin D connector Cables – 2 Nos. Computers – 2 Nos. Connecting Chords Power Supply

THEORY:

There are different types of transmission media which are classified as:

i) Serial Communication ii) Parallel Communication

1) Serial Communication

Serial communication usually requires a minimum of 2 wires for data transmission in one direction. One wire is for data and other is for ground.

Need for Serial Communication: Within a system data is transferred in parallel because it is the fastest way to do so. For transferring data over long distances, however, parallel data transfer requires too many wires. Therefore, data to be sent to long distances is usually converted to serial form from parallel form so that it can be sent on a single wire or a pair of wires. Serial data received from a distant source is converted to parallel form so that it can be easily transferred to system bus. Three terms often encountered in serial communication are simplex, half-duplex and full duplex. A simplex data line can transmit data only in one direction. A mouse sending data to CPU is an example of simplex communication. Half-Duplex transmission means that the communication can take place in either direction between two systems but only one at a time. An example of Half-Duplex communication is the walky-talky system. The term full duplex means that each system can send and receive data at the same time. A normal phone conversation is an example of a full duplex operation.

EIA-RS232 Standard:

Topology

Page 2: Data Communication Lab Manual

RS-232 standard is defined for a point-to-point communication. The data transfer is defined between DTE (Data Terminal Equipment) and the DCE (Data Communication Equipment)

•DCE - Data Communication Equipment such as modem in analog network or Network Terminating Unit in digital network. It is regarded as the boundary of a network. Please note that a minicomputer can be a DCE if it is located at network boundary.

• DTE - Data Terminating equipment such as computer port or computer terminal in a network.

An Introduction to Serial communication

As the name implies, in the Serial communication you send bits of data serially i.e. one bit at a time. Normally we predefine rate of transfer such as 2400 bits/sec. (2400bps) 56,000 bits/sec. (56 kbps) And then depending upon this rate we interpret bits boundaries.

Basics of Serial Communication

Baud Rate: The baud rate is simply the rate of data transmission expressed in bits per second, Kilo Bits per second or Mega bits per second etc.

Page 3: Data Communication Lab Manual

Procedure:

Refer to the fig. and connect the power supply with proper polarity to the kit DCT-03 and while connecting, ensure that it is off.

Keep all switch faults in off position. Connect 9 Pin D connector Cable between one computer COM port and CN3

connector and second 9 Pin D connector Cable between another computer COM port and CN4 connector.

Connect the TD1 post to RD2 post. Connect the RD1 post to TD2 post. Keep the switch setting of SW4 towards ON position. Switch ON the power supply and both the computers. Run DCT-03 software on both computers. Select Serial Communication Software link on both computers. This will provide link to hyper terminal software. A new Window will open, where you Double Click on HYPERTERM. Two

Windows will open one at the background and another (small window) with title Connection Description that will be Active.

Enter the name in the box by which you would like to store your connection, for e.g. (PC1 or pc2) and Click OK. Also you could select the icon provided below. The background window title will change to the name provided by you.

Then specify connection using: by selecting Direct to COM1 or port where your cable is connected and then click on OK. (NOTE: Please check the Port you have selected and the Ports you are connecting).

Now Window with Title COM 1 Properties will appear where Port Setting should be done as shown above and click on OK.

(NOTE: For Bits per Second setting, you could select them for different speeds from 110bps to115200 bps).

After the above settings, you click OK. The Background window will become Active.

Click on File, Save As and save it in the Directory, which you want. Perform the same procedure on another PC. To start communicating between the two PCs, click on the TRANSFER Menu

and again click on Send File. A window will be prompted having title Send File with File Name and Protocol.

Select Browse for the file, which you would like to send to the PC connected. Select the file and click on Open. The file name and address will be displayed in

Page 4: Data Communication Lab Manual

the small window. Then select the Protocol (optional use protocols are X modem, Y modem and 1K X modem etc.)

To receive the file on the PC, click on the TRANSFER Menu and again click on Receive File. A window will be prompted having title Receive File with Location at which you want to store the Received file and Receiving Protocol.

Select Browse for the location where you would like to store the received file, select the folder and click OK. The folder name and address will be displayed in the small window. Protocol to be selected should be same as kept at transmitting PC.

On the PC from which the selected file to be transmitted, click SEND button. A window will open showing file transfer status. Immediately at the Receiving PC, click Receive (otherwise Time Out Error will be displayed and communication will fail). You will see a window showing that file is being received in the form of packets.

After file is transferred, both the windows in the (transmitting & receiving PCs) will close. Check for the received file in the folder where the file is stored.

You can select any PC as transmitter or receiver & follow the above procedure to transfer the file.

2) Parallel Communication

EQUIPMENTS:

• DCT-03 Kit • 25 Pin D connector Cables – 2 Nos. • Power Supply • Computers-PC, Intel Celeron and above - 2 Nos. (Minimum Configuration)

Theory:

Windows software is provided to access parallel port of computer, for handshaking of signals and for data transfer between two computers. Software enables users to communicate between two computers with three different types of protocols namely, stop and wait, go back to N and selective repeat. Transfer request, request acknowledgement, packet transfer, packet receipt, packet verification, error report, satisfied data report is indications of this process.

WORKING OF PROTOCOL

Stop and Wait Protocol

The stop and wait protocol builds on the unrestrained protocol by limiting the frequency at which frames are sent and by informing the sender whether the last frame was damaged or not. Again the protocol can be divided into sender and receiver terminals:

Page 5: Data Communication Lab Manual

The sender sends a frame and then waits for the receiver to acknowledge it with something called an ack. If the acknowledgement states that the last frame was damaged, it will resend it. It will then wait again for an acknowledgement and will continue to do this until the acknowledgement states that the frame arrived undamaged and then loops back to the start to send the next frame.

The receiver waits for an incoming frame and on its arrival; it checks the frame for errors. It defines an error field in the record structure called ack. If the frame is undamaged it will set ack to 0, otherwise if the frame arrives in a damaged state, it will set ack to 1, ignore the damaged frame and send the acknowledgement back to the sender. It will only pass a frame on to the patron if it arrives undamaged.

Disadvantages associated with this protocol are:

If the receiver’s acknowledgement is damaged, the sender may draw the wrong conclusion and make the protocol fail.

It is very slow, as it always has to wait for an acknowledgement

Sliding Window Protocol

The sliding window protocol is a compromise between the previous two. It allows multiple but not necessarily all frames to be sent before receiving acknowledgements for each. It also uses error checking to detect damaged frames. Frames in the sliding window are numbered between 0 and some maximum number, which for now is called N. The frames are numbered such that it is possible to check that frames arrive in the correct order. Usually N is set less than the total number of frames to be sent. It would not make sense to number every frame individually while sending thousands and it also saves memory space. So frames are numbered 0 for the first frame through to N - 1 for the Nth frame. Frame N + 1 is numbered 0 again. Thus the frames are numbered consecutively modulo N. This does put certain restrictions on the sliding window protocols as will be explained shortly. If the window contains x frames numbered starting with s (where x and start are integers) then the following statements hold: • Every frame numbered less than s has been sent and acknowledged.

• No frame greater than or equal to s + x has been sent.

• Any frame in the window has been sent but may not yet have been acknowledged. Such frames are called 'outstanding frames'.

Initially the window contains frames starting with frame 0. As the patron provides the station with packets, the window expands until the limit on outstanding

Page 6: Data Communication Lab Manual

frames is reached. When this limit is reached, no more packets are accepted from the patron. As outstanding frames are acknowledged, the window shrinks to exclude those frames acknowledged. Thus the window can expand again to include new frames. So frames are excluded from the sliding window in the same order, as they were included. As the window moves on, the previous conditions must always be met. Also if frame s + 1 is acknowledged but frame s is not, the window will not move until frame s is acknowledged. Sliding window protocols are also capable of acting as both a sender and a receiver. The sliding window protocol can be implemented in two different ways:

• Go - back - n protocol • Selective repeat protocol

Go back N Protocol

This is the simpler of the two selective repeat protocols as the receiver rejects every frame except the one it is supposed to receive. There are several identifying features to this protocol. They are as follows:

Frame numbers lie between 0 and N – 1. If there are more than N frames, frame numbers are duplicated. So frames are numbered consecutively modulo N.

The receiving station always expects to receive frames in order of frame number. If a frame is received out of order, it sends a negative acknowledgement (nak) for the one it wanted and waits for the correct one to arrive.

If a frame arrives damaged, it is ignored and a nak is sent for it. A receiving station will not necessarily acknowledge each frame explicitly, but if a

sending station receives an acknowledgement for frame j, it assumes that all frames up to j have been received correctly. This reduces the number of acknowledgements that need to be sent.

Each time a frame is received undamaged, an ack timer is set that counts down and only stops if there is an outgoing frame. If the timer expires before a frame is sent, an empty frame is sent out with just an acknowledgement attached.

The sending station buffers the packets from all outgoing frames in the sliding window in case it has to resend them. Packets are removed from the buffer as they are acknowledged to allow the sliding window to advance.

Each outgoing frame has an associated frame timer that is set when the frame is sent. So if the station does not receive an acknowledgement for a frame by the time its frame timer has expired, it assumes something has gone wrong and resends every frame in the window. So if there are n frames in the window, the sending station goes back n frames and resends them all.

A record of the most recently sent nak is kept so that the same nak is not repeatedly sent.

Page 7: Data Communication Lab Manual

Selective Repeat Protocol:

The selective repeat protocol unlike the go - back - n protocol defines a second sliding window. Now not only does it buffer outgoing frames until they are acknowledged but it also uses its new second window to buffer incoming frames. Should they arrive out of order? The selective repeat protocol is similar to the go - back - n protocol for the following reasons:

• The frame format is similar.

• It uses piggybacked acknowledgements where possible and does not acknowledge every frame explicitly. If a frame is acknowledged, the sending station assumes that all the prior frames have also been received.

• Naks are used for damaged frames and frames received out of order.

• Ack timers and frame timers are used.

There are also several differences with the Selective Repeat protocol:

It defines a second sliding window to buffer incoming frames. So should a frame arrive out of order, it is buffered until its predecessors arrive. Frames must be delivered to the patron in the correct order.

If a frame arrive whose frame number is in the window, it is accepted and passed on to the patron only once all of its predecessors have arrived.

If a frame arrives whose frame number is in the window but whose predecessors have not yet arrived, it is still accepted but a nak is sent for the one it expected.

If a frame timer expires, only the timed out frame is resent. The rational for this is that the other frames may have arrived out of order.

If a nak is received, only the number specified is resent. An acknowledgement is not necessarily sent for every frame received. So if an

ack is received, all frames prior to the number specified can be assumed to be received correctly.

Getting the protocols to fail One of the interesting features of this simulator is that it allows you to make the different protocols fail. Following are the details of how to make each of the protocols fail:

Stop and Wait Protocol This protocol copes well with problem situations and will work with most of the scenarios available including pressing the damage frame button.

Go back N Protocol

Page 8: Data Communication Lab Manual

This protocol can handle most if the problems that arise. However its weakness is its sliding window. If the sliding window size is set to be the same as the value entered under the 'frames to be numbered consecutively modulo...' then the protocol may fail, especially while running under any of the scenarios concerning acknowledgements. For example, if frames are numbered consecutively modulo 6 and the sliding window size is set to 6, frames 0 to 5 are sent. Now if the only acknowledgement returned is that for 5 and this acknowledgement is lost or damaged, the frame timer at the sender's end should expire as none of the frames have been acknowledged. Therefore all the frames in the window are resent. The receiver, not realizing that the frames are duplicates, accepts the frames (as they have the correct numbering - again 0 to 5) and delivers them. Thus this protocol has failed.

Selective Repeat Protocol This protocol can be made to fail in a similar way to the previous protocol provided that the sum of the incoming and outgoing frames are set greater than or equal to the value entered under the 'frames to be numbered consecutively modulo...'

Each protocol used Rules in this software are as described below.

STOP AND WAIT PROTOCOL:

The Receiver’s and Transmitter’s window size is 1. ACK (n): If an ACK (n) is received, it is assumed that all packets up to the

number (including n) have been received correctly. NACK (n): If a NACK (n) is received, it is assumed that all packets prior to the

number have been received correctly. The packet number n is corrupted or discarded by the receiver.

The Transmitter transmits the packets and waits for any Response from Receiver side till it time-outs.

The Transmitter maintains a timer, which it resets or starts after transmitting a packet.

The Receiver sends ACK of the packet if received correctly. The Receiver DISCARDS and sends NACK of the packet if received corrupt or

out of sequence.

GO BACK N PROTOCOL:

The Receiver’s window size is 1. The Transmitter’s window size can be anything from 1 to 7. ACK (n): If an ACK (n) is received, it is assumed that all packets up to the

number (including n) have been received correctly. NACK (n): If a NACK (n) is received, it is assumed that all packets prior to the

number have been received correctly. The packet number n is corrupted or discarded by the receiver.

Page 9: Data Communication Lab Manual

The Transmitter transmits the packets if the packets are available in the window for transmission.

The Transmitter slides its window depending upon the ACK received and grows up to the MAX_WINDOW_SIZE.

The Transmitter maintains timers for each packet within its window, which it resets or starts after transmitting the packet.

The transmitter starts retransmitting all the packets once again from the packets of which NACK is received or the timer time-outs.

The Transmitter stores all the packets until its ACK is received. The Receiver sends ACK of the packet if received correctly and advances its

window to receive the next packet. The Receiver DISCARDS and sends NACK of the packet if received corrupt or

out of sequence.

SELECTIVE REPEAT PROTOCOL:

The Receiver’s window size can be anything from 1 to 4. The Transmitter’s window size can be anything from 1 to 4. ACK (n): If an ACK (n) is received it is assumed that all packets up to the number

(including n) have been received correctly. NACK (n): If a NACK (n) is received, it is assumed that the packet number n is

corrupted or discarded by the receiver. The Transmitter transmits the packets if the packets are available in the window

for transmission. The Transmitter slides its window depending upon the ACK received and grows

up to the MAX_WINDOW_SIZE. The Transmitter maintains timers for each packet within its window, which it

resets or starts after transmitting the packet. The transmitter retransmits the packets of which NACK is received or the timer

time-outs. The Receiver sends ACK of the packet if received correctly and advances its

window to receive the next packet. The Receiver DISCARDS and sends NACK of the packet if received corrupt. The Receiver stores all the packets till its ACK is sent. The Transmitter also stores all the packets until its ACK is received.

Page 10: Data Communication Lab Manual

Procedure:

Refer to the fig. and connect the power supply with proper polarity to DCT-03 kit and while connecting, ensure that it is off.

Keep all switch faults in off position. Keep switch SW6 in PRN mode. Connect LPT/parallel port of one PC to connector CN1 using 25-25 D cable.

Similarly connect printer port cable from printer to connector CN2. Keep the switch settings for SW1, SW2 & SW3 in ON position. Switch ON the power supply and both the computers. Run DCT-03 software on computer. Select Parallel Communication Software link on both the computers. Clicking on Port Setting will show you three ports (i.e. LPT1, LPT2 and LPT3).

Select the port from the user machine through which the data transfer has to occur. For example, clicking on LPT1 will set the LPT1 as the active port on the machine for the data transfer.

Clicking on Protocols will show you three protocols, namely Stop and Wait Protocol, Go Back to N Protocol and Selective Repeat protocol. Select Stop and Wait Protocol on both PC.

Select one PC in transmit mode and another PC in receive mode.

Page 11: Data Communication Lab Manual

Select the file to be sent on transmitter side. After the user has selected the file, the PC shows the No. of Packets and Size of

the file in the boxes on the top. The Packets with their packet sequence is also shown.

You can change delay duration between two adjacent packets as per requirement.

Click on Transmit file button. On the remote PC, click on receive file button. Status of file transfer will be indicated on screen. Once the transfer starts and the client computer acknowledges the packets, it

sends the signal back to the transmitting PC. Any acknowledgement positive or negative with their packet sequence is displayed below the Current Packet No.

Any positive acknowledgement received is displayed as ACK (0) and any negative acknowledgement is displayed as NACK (0) along with their packet sequence in brackets.

Once the packet has been acknowledged and signal shown, the next packet is transmitted and so on till the whole file gets transmitted.

On the right hand top shows frame information. The frame information consists of different color packets. Each color specifies different status of the packet.

Observe the effect on file transfer by introducing error in data bits use switch SW2 to introduce error for a moment.

The receiving packets can be discarded or killed by clicking the Discard button. Any acknowledgement that is transmitted back can be also made to be lost by

just clicking on lost button. Thus the Transmitter side will not receive any acknowledgement.

The third button DISCARD/LOST can be clicked to discard and to lose any acknowledgement sending back to the Transmitter simultaneously.

Once the file transfer gets completed, you will be prompted by file transfer successful at transmitter.

At the receiver, selection window will popup to indicate location for the received file to be saved.

Verify the received file with transmitted file, this shows end of file transfer with success.

Clicking on Protocols menu and select Go Back to N Protocol on both PCs. Select one PC in transmit mode and another PC in receive mode. Select the file to be sent on transmitter side. After the user has selected the file, the PC shows the No. of Packets and Size of

the file in the boxes on the top. The Packets with their packet sequence is also shown.

You can change delay duration between two adjacent packets as per requirement.

You can change window size of the packet frame as per requirement. Click on Transmit file button. On the remote PC, click on receive file button. Status of file transfer will be indicated on screen.

Page 12: Data Communication Lab Manual

Once the transfer starts and the client computer acknowledges the packets, it sends the signal back to the transmitting PC. Any acknowledgement positive or negative with their packet sequence is displayed below the Current Packet No.

Any positive acknowledgement received is displayed as ACK (0) and any negative acknowledgement is displayed as NACK (0) along with their packet sequence in brackets.

Once the packet has been acknowledged and signal shown, the next packet is transmitted and so on till the whole file gets transmitted.

On the right hand top shows frame information. The frame information consists of different color packets. Each color specifies different status of the packet.

Observe the effect on file transfer by introducing error in data bits. Use switch SW2 to introduce error for a moment.

The receiving packets can be discarded or killed by clicking the Discard button. Any acknowledgement that is transmitted back can be also made to be lost by

just clicking on lost button. Thus the Transmitter side will not receive any acknowledgement.

The third button NACK/LOST can be clicked to discard and to lose any acknowledgement sending back to the Transmitter simultaneously.

Once the file transfer gets completed, you will be prompted by file transfer successful at transmitter.

At the receiver, selection windows will popup to indicate location for the received file to be saved.

Verify the received file with transmitted file. This shows the end of file transfer with success.

Clicking on Protocols menu and select selective repeat Protocol on both PCs. Select one PC in transmit mode and another PC in receive mode. Select the file to be sent on transmitter side. After the user has selected the file, the PC shows the No. of Packets and Size of

the file in the boxes on the top. The Packets with their packet sequence are also shown.

You can change delay duration between two adjacent packets as per requirement.

You can change window size of the packet frame as per requirement. Click on Transmit file button. On the remote PC, click on receive file button. Status of file transfer will be indicated on screen. Once the transfer starts and the client computer acknowledges the packets, it

sends the signal back to the transmitting PC. Any acknowledgement positive or negative with their packet sequence is displayed below the Current Packet No.

Any positive acknowledgement received is displayed as ACK (0) and any negative acknowledgement is displayed as NACK (0) along with their packet sequence in brackets.

Once the packet has been acknowledged and signal shown, the next packet is transmitted and so on till the whole file gets transmitted.

On the right hand top shows frame information. The frame information consists of different color packets. Each color specifies different status of the packet.

Page 13: Data Communication Lab Manual

Observe the effect on file transfer by introducing error in data bits. Use switches SW2 to introduce error for a moment.

The receiving packets can be discarded or killed by clicking the ON Discard button.

Any acknowledgment that is transmitted back can be also made to lose by just clicking on lost button. Thus the Transmitter side will not receive any acknowledgement.

The third button NACK/LOST can be clicked to discard and to lose any acknowledgement sending back to the Transmitter simultaneously.

Once the file transfer gets completed, you will be prompted by file transfer successful at transmitter.

At the receiver, selection windows will popup to indicate location for the received file to be saved.

Verify the received file with transmitted file. This shows the end of file transfer with success.

EXPERIMENT NO. 2

Page 14: Data Communication Lab Manual

OBJECTIVE: To study different types of transmission media.

APPARTUS REQD.:

DCT-03 Kit 9 Pin D connector Cables – 2 Nos. Power Supply Computers-PC, Intel Celeron and above - 2 Nos. (Minimum Configuration)

THEORY:

There are different types of transmission media which are classified as:

1) Wireless Communication2) Optic Communication

1) Wireless Communication

Infrared wireless communication is achieved using transmitters/receivers (transceivers) that modulate no coherent infrared light. Transceivers must be within the line of sight of each other either directly or via reflection from a light colored surface such as the ceiling of a room. In wireless communication, the serial data is modulated at a carrier frequency of 38 KHz. The RS-232 serial data simply controls the carrier frequency by turning the carrier ON/OFF according to the DC level of the serial data. A 38 KHz carrier frequency is available during the ON time or high level of input where as no carrier during OFF time or low level of input. This modulated signal is fed to IR LED using a transistorized driver circuit. The receiver is an IR detector module, which filters out the 38 KHz carrier from the IR signal waves. Thus at the TTL OUT post of IR receiver section, the actual serial data is being reconstructed with no carrier present. Using this experimental set up, a baud rate of 110 bps to 2400 bps can be achieved on RS-232 serial port. The free air IR data transmission, IR remote control as well as the most Opto-electronic sensors and light barrier systems work with a wavelength between 870nm and 950nm. The emitter and detector components are highly efficient in this IR wavelength band and can be manufactured at low cost. Data transmission in free space places a high demand for interference immunity on the IR receiving modules. The receiver unit (waiting to receive signals) is loaded with different optical and electromagnetic disturbances, Omni-present in the ambient environment or generated by the electrical appliance itself. All optical sources with an emission spectrum in the receiving bandwidth (830nm –1100nm) of the detector can be considered as disturbing sources. These are mainly fluorescent lamps, incandescent lamps and sunlight. Sometimes also plasma displays emit significantly in the optical band of the IR transmission. As an emitter for the IR signal, various IR emitting diodes with high brightness and efficiency are available. The IR emitter with a wavelength of 950nm matches

Page 15: Data Communication Lab Manual

best with the TSOP IR receivers. The maximum possible transmission distance of an IR remote control system depends on various parameters. Mainly it is the radiant intensity of the emitter (Ie) and the sensitivity of the receiver (Eemin). Additionally the reflective conditions of the test room, the optical transmittance of windows or light guides in front of the receiver and the disturbance conditions influence the distance.

PROCEDURE:

Refer to the fig. and connect the power supply with proper polarity to DCT-03 kit and while connecting, ensure that it is off.

Keep all switch faults in off position. Connect 9 Pin D connector Cable between one computer COM port and CN3

connector and second 9 Pin D connector Cable between another computer COM port and CN4 connector.

Connect the TD1 post to TX post of Fiber Optic transmitter. Connect the TTL OUT post of IR receiver to RD2 post. Connect the RD1 post to TD2 post. Keep the switch setting of SW4 towards ON position. Switch ON the power supply and both the computers. Run DCT-03 software on both computers. Select Serial Communication Software link on both computers. This will provide link to hyper terminal software. Open the previously stored connection (e.g. pc1 or pc2).

Page 16: Data Communication Lab Manual

To start communication between the two PCs, click on the TRANSFER Menu and again click on Send File. A window will be prompted having title Send File with File Name and Protocol.

Select Browse for the file, which you would like to send to the PC connected. Select the file and click on Open. The file name and address will be displayed in the small window. Then select the Protocol (optional use: protocols are X modem, Y modem and 1K X modem etc.)

To receive the file on the PC, click on the TRANSFER Menu and again click on Receive File. A window will be prompted having title Receive File with location at which you want to store the Received file and Receiving Protocol.

Select Browse for the location where you would like to store the received file. Select the folder and click OK. The folder name and address will be displayed in the small window. Protocol to be selected should be same as kept at transmitting PC.

On the PC from which the selected file to be transmitted, click SEND button. A window will open showing file transfer status. Immediately at the Receiving PC, click on Receive (otherwise Time Out Error will be displayed and communication will fail) .You will see a window showing that file is being received in the form of packets.

Put obstruction between IR transmitter and detector and observe the effect. File transmission stops.

Remove the obstruction. Again file transfer resumes. After file is transferred, both the windows in the (transmitting & receiving PCs) will

close. Check for the received file in the folder where the file is stored.

STUDY OF FIBER OPTIC COMMUNICATION

APPARATUS REQUIRED:

DCT-03 Kit 9 Pin D connector Cables – 2 Nos. Power Supply 1 Meter Fiber cable Computers-PC, Intel Celeron and above - 2 Nos. (Minimum Configuration)

THEORY:

Fiber Optic Links can be used for transmission of digital as well as analog signals. Basically a fiber optic link contains three main elements, a transmitter, an optical fiber and a receiver. The transmitter module takes the input signal in electrical form and then transforms it into optical (light) energy containing the same information. The optical fiber is the medium, which carries this energy to the receiver. At the receiver, light is converted back into electrical form with the same pattern as originally fed to the transmitter.

Page 17: Data Communication Lab Manual

TRANSMITTER:

Fiber optic transmitters are typically composed of a buffer, driver and optical source. The buffer provides both an electrical connection and isolation between the transmitter and the electrical system supplying the data. The driver electronics provides electrical power to the optical source in a fashion that duplicates the pattern of data being fed to the transmitter. Finally the optical source (LED) converts the electrical current to light energy with the same pattern. The LED SFH756V supplied with the kit operates inside the visible light spectrum. Its optical output is centered near visible wavelength of 660 nm. The emission spectrum is broad, so a dark red glow can usually be seen when the LED is on.

RECEIVER:

The function of the receiver is to convert the optical energy into electrical form, which is then conditioned to reproduce the transmitted electrical signal in its original form. We have used a photo detector SFH551V having TTL type output. Usually it consists of PIN photodiode, trans-impedance amplifier and level shifter.

PROCEDURE:

Refer to the fig. and connect the power supply with proper polarity to the kit DCT-03 and while connecting, ensure that it is off.

Keep all switch faults in off position.

Page 18: Data Communication Lab Manual

Connect 9 Pin D connector Cable between one computer COM port and CN3 connector and second 9 Pin D connector Cable between another computer COM port and CN4 connector.

Connect the TD1 post to TX post of Fiber Optic transmitter. Slightly unscrew the cap of LED SFH 756 (660nm) on kit. Do not remove the cap

from connector. Once the cap is loosened, insert the fiber into cap, now tight the cap by screwing it back.

Connect the other end of fiber cable to detector SFH551V. Connect the TTL OUT post of Fiber Optic receiver to RD2 post. Connect the RD1 post to TD2 post. Keep the switch setting of SW4 towards ON position. Switch ON the power supply and both the computers. Run DCT-03 software on both computers. Select Serial Communication Software link on both computers. This will provide link to hyper terminal software. Open the previously stored connection (e.g. pc1 or pc2) To start communicating between the two PCs, click on the TRANSFER Menu

and again click on Send File. A window will be prompted having title Send File with File Name and Protocol.

Select Browse for the file, which you would like to send to the PC connected. Select the file and click on Open. The file name and address will be displayed in the small window. Then select the Protocol (optional use: protocols are X modem, Y modem and 1K X modem etc.)

To receive the file on the PC, click on the TRANSFER Menu and again click on Receive File. A window will be prompted having title Receive File with location at which you want to store the Received file and Receiving Protocol.

Select Browse for the location where you would like to store the received file. Select the folder and click on OK. The folder name and address will be displayed in the small window. Protocol to be selected should be same as kept at transmitting PC.

On the PC from which the selected file is to be transmitted, click SEND button. A window will open showing file transfer status. Immediately at the Receiving PC, click on Receive (otherwise Time Out Error will be displayed and communication will fail) you will see a window showing that file is being received in the form of packets.

Remove fiber cable from detector and observe effect. File transmission stops. Connect the removed fiber. Again file transfer resumes. After file is transferred, both the windows in the (transmitting & receiving PCs) will

close. Check for the received file in the folder where the file is stored.

EXPERIMENT NO. 3

Page 19: Data Communication Lab Manual

OBJECTIVE: To study MODEM Communication

Study of FSK Modem Study of Modem interfacing with PC

APPRATUS REQUIRED:

DCT-03 Kit 9 Pin D connector Cables – 2 Nos. Modem interface cable Power Supply Telephone Link Computers-PC, Intel Celeron and above - 2 Nos. (Minimum Configuration)

THEORY:

FSK MODEM:

The name modem is a contraction of the term Modulator and demodulator. When used in the transmitting mode, the modem accepts digital data and converts it to analog signals for use in modulating a carrier signal. At the receiver end of the systems, the carrier is demodulated to recover the data.

FSK MODULATION:

In this form of modulation, the sine wave carrier assumes two values of frequency, determined by the binary data signal. Logic high or mark and logic low or spaces are assigned two different carrier frequencies. The carrier frequency shifts between two frequencies corresponding to the mark or space level at the input of modulator.

FSK DEMODULATION:

The most common circuit for demodulating FSK signals is the PLL. The FSK signal at the PLL input has two values of frequency. The error voltage at the output of the phase comparator follows these frequency shifts, thus providing a two-level signal corresponding to the original binary data stream. The PLL demodulator is followed by a low pass filter, which removes the residual carrier components, and by a pulse forming circuit, which restores the correct shape of the data signal.

The main aspects of FSK are: Less error rate than ASK. If Fb is the bit transmission rate, the minimum spectrum BW of the modulated

signal is higher than Fb. The transmission efficiency, defined as the ratio of Fb and BW, is less than 1.

Page 20: Data Communication Lab Manual

The “Baud” or “Baud rate” is defined as the “modulation speed” or “symbol speed”.

Modem data transmission speed:

Modems are generally classified according to the important characteristics of transmission speed as follows:

All of the above modems can operate within a single 300 to 3400Hz (4KHz) telephone channel. As speed increases beyond approximately 19,000 bps, a wideband modem is needed, as is a wideband channel.

Modem modulation methods:

Modem utilizes various types of modulation methods, the most common being frequency-shift keying (FSK), which shifts a carrier frequency to indicate a mark or a space. Encoded data can be transferred through communication systems for voice transmission because the frequency shifting is limited to the 4KHz bandwidth of the voice-grade channel. The FSK signal is also analog in nature, enhancing its compatibility with communication circuits. Modem Interfacing:

RS-232 interface is a standard interconnection between business machine and modem. The RS-232 interface has been defined by the Electronic Industries Association (EIA) to ensure compatibility between data sets and terminal equipment. The RS-232 interface specifications limit the interconnecting cable to a length of 50 ft (15 m). The interface also specifies the voltage levels with which data and control signals are exchanged between data sets and business machines. Each pin in the 25-pin connector will carry either a binary 0 or 1 to indicate activation or deactivation control functions or data values. A binary 1 is used for marking and signifies OFF while the 0 is used for spacing and signifies ON.

Modem interconnection:

The majority of data circuits utilize telephone channels provided by public carriers. These channels generally pass through switching facilities and are provided with equipment designed to enhance the use of the channel for voice

Page 21: Data Communication Lab Manual

application. This type of equipment is not designed specifically for data transmission, so that the modem must be designed to compensate for any inadequacy of the voice-grade channel. The two broad types of modems are available for this type of service, the hard-wired modem and the acoustically coupled data set. The one limitation of the hard-wired modem is that it precludes mobility since, being hard-wired. The equipment must remain connected to the circuit terminals. The acoustically coupled modem solves the mobility problem. Using this device, a person is able to interconnect with any computer system, which has dial-up interconnect capability.

PROCEDURE:

Refer to the fig. and connect the power supply with proper polarity to DCT-03 kit and while connecting, ensure that it is off.

Keep all switch faults in off position. Connect 9 Pin D connector Cable between one computer COM port and CN3

connector and second 9 Pin D connector Cable between another computer COM port and CN4 connector.

Connect the TD1 post to IN post of FSK MODULATOR. Connect the telephone wire link between the RJ11 connectors on FSK modulator

and demodulator block. Connect the OUT post of FSK DEMODULATOR to RD2 post. Connect the RD1 post to TD2 post. Keep the switch setting of SW4 towards ON position. Switch ON the power supply and both the computers.

Page 22: Data Communication Lab Manual

Run DCT-03 software on both computers. Select Serial Communication Software link on both computers. This will provide link to hyper terminal software. Open the previously stored connection (e.g. PC1 or PC2). To start communication between the two PCs, click on the TRANSFER Menu

and again click on Send File. A window will be prompted having title Send File with File Name and Protocol.

Select Browse for the file, which you would like to send to the PC connected. Select the file and click on Open. The file name and address will be displayed in the small window. Then select the Protocol (optional use: protocols are X modem, Y modem and 1K X modem etc.)

To receive the file on the PC, click on the TRANSFER Menu and again click on Receive File. A window will be prompted having title Receive File with location at which you want to store the Received file and Receiving Protocol.

Select Browse for the location where you would like to store the received file, select the folder and click OK. The folder name and address will be displayed in the small window. Protocol to be selected should be same as kept at transmitting PC.

On the PC from which the selected file to be transmitted, click SEND button. A window will open showing file transfer status. Immediately at the Receiving PC, click on Receive (otherwise Time Out Error will be displayed and communication will fail). You will see a window showing that file is being received in the form of packets.

Remove telephone wire from detector and observe effect. File transmission stops.

Connect the removed telephone wire. Again file transfer resumes. After file is transferred, both the windows in the (transmitting & receiving PCs) will

close. Check for the received file in the folder where the file is stored.

EXPERIMENT NO. 4

OBJECTIVE: To study the parallel Interface Centronics and its applications.

Page 23: Data Communication Lab Manual

APPARATUS REQUIRED:

DCT-03 KIT, 25 PIN D connector Cables – 2 Nos. , power supply, Printer, Computers – PC, Intel Celeron and above – 2No. (Maximum configuration)

THEORY:

Introduction to Bi-directional parallel port:

These days starting from PCs equipped with Pentium processors, the parallel ports have Bi-directional read/write facility.

Bi-directional means that you can read byte (8 bits) from parallel port, which traditionally was an output only port in the old PCs.

In order to check whether your port is configured for it, restart your PC and go into BIOS. See the portion related to the parts. You will find port address as well as its type, usually the options are as follows:

SPP Standard Parallel Port not bi-directional Bi-directional Standard Parallel Port with bi-directional facility EPP Enhanced Parallel Port ECP Extended Capability Parallel Port

Introduction to EPP (Enhanced Parallel Port) handshake:

EPP was designed to do, the above described, handshaking by a separate hardware chip instead of main processor. It is described as follows:

EPP Data Write Cycle:

The only port to be done in software is to write the Byte to be sent at Data port (EPP) whose address is (base address+4) {e.g. 0x37C}. Note: This data port is different from the data port of SPP. However you can still use that data port of SPP by usual way. All above signals are generated automatically in hardware.

Description of handshake:

1. The software programs write the byte to be sent at EPP data register (Base +4).2. Write is placed low by PC to indicate the printer that some data is to be sent.3. After placing the Write low, data is placed on data lines (pin 2 to pin 9). 4. Wait pin is checked. It is an input from the printer. If it is low then it means that

printer is waiting for receiving data from PC. This being the case, the PC pulls DATA STROBE low to indicate the printer that it should read data from data line.

5. The printer reads data from Data lines and brings the WAIT line high for a short duration. This indicates to the PC that printer has received data, so it is ok to end EPP data write cycle.

6. DATA STROBE is brought high. WRITE is also brought high. 7. EPP write cycle Ends here.

Page 24: Data Communication Lab Manual

EPP Address Read Cycle:

Description of Handshake used for EPP Address Read Cycle:

The printer (informs the PC that it has to send some data to PC by sending signal on interrupt line pin 10, ACK in SPP). This Depends upon software. Any other input line may be used as well for this signaling.

Whenever PC is free, it responds to this signal and reads EPP address register (Base+3).

ADDR STROBE is pulled low if Wait is low. This is done automatically when processor reads the Address Register. This signal informs the printer that host (PC) is ready to start an EPP read cycle.

Host waits for acknowledgement from Printer by waiting for WAIT line going high. As Wait line goes high, data is read from data lines (pins 2 to 9). Adder Strobe is pulled high. This ends EPP read cycle.

Time-out indication in EPP:

There is a possibility that host (PC) starts a write cycle but never receives acknowledgement from printer when no printer is attached. As this operation is done in hardware, the PC will continue waiting and your computer will halt. In order to avoid this, Watchdog timer scheme is used. It is described as follows:

When host writes data to address/Data port of the EPP, a timer is started at the same time.

Now host waits for an acknowledgement on WAIT line becoming high. If it does not happen within about 10μsec (depending on port), then a time out is indicated by setting Bit0 of status port (base+1).

The host stops waiting and informs the user about the problem.

A brief introduction to ECP (Extended Capability Port): Enhancement in ECP:

It can use DMA (Direct Memory Access) feature in order to transfer a block of data from memory automatically without the use of CPU.

It can use (First in First Out) FIFO buffers to transfer more than one byte automatically before the attention of CPU is required.

It supports data compression by using RLE (Run Length Encoding) scheme. This scheme helps to transmit a single byte if a long string of this same byte is required to be transmitted.

It supports a method of channel addressing by which you can communicate with different modules of the target. For example with Fax, copier and printer in a single machine containing these 3.

Page 25: Data Communication Lab Manual

PROCEDURE:

Refer to the fig. and connect the power supply with proper polarity to DCT-03 kit and while connecting, ensure that it is off.

Keep all switch faults in off position. Keep switch SW6 in PRN mode. Connect LPT/parallel port of one PC to connector CN1 using 25-25 D cable.

Similarly connect printer port cable from printer to connector CN2. Keep the switch settings for SW1, SW2 & SW3 in ON position. Switch ON the power supply and the computer. Run DCT-03 software on computer. Select parallel Communication Software link. Open printer interface window from menu. Give print command from PC1 for any document and observe the handshaking

taking place between PC1 & printer during communication. Observe the signals by removing the paper from printer. Printer will give paper

out indication to PC, the status port LED S5 will glow. Similarly observe the

Page 26: Data Communication Lab Manual

complete handshaking signals from PC to printer during the complete print operation.

EXPERIMENT NO. 5

OBJECTIVE: To study Serial Quadrature Phase Shift Keying Modulation

Page 27: Data Communication Lab Manual

APPARATUS REQUIRED: BCT -17 kit, Power Supply, CRO, Connecting Chords.

Theory:

QPSK generation and reception

Quadrature phase shift key

Page 28: Data Communication Lab Manual
Page 29: Data Communication Lab Manual
Page 30: Data Communication Lab Manual

Procedure: Connect the ac supply to the kit. Make the connections and settings as shown in block diagram No. 1. Connect the ground pin to S1 – DATA IN and S2 – DATA IN post of carrier

modulator. Connect the S Clock to clock IN post of carrier modulator. Switch ON the power. Observe the waveform at modulated output. Connect the ground Pin to S1 – DATA IN and S2 – DATA IN post is open. Observe the waveform at modulated output. Connect the ground Pin to S2 – DATA IN and S1 –DATA IN post is open. Observe the waveform at Modulated output. Observe the waveform at modulated output. Observe the following waveforms on Oscilloscope.

1) Clock generator output at S – clock.2) DATA O/P at DATA GENERATOR.3) Signals at Carrier Generator.

Socket Socket Phase angle of QPSK S1 DATA IN S2 DATA IN Output with respect to Fc 1800 carrier

Gnd (0) Gnd (0) 1800 Gnd (0) Open (1) 2700 Open (1) Gnd (0) 00 Open (1) Open (1) 900

Result:

Page 31: Data Communication Lab Manual

EXPERIMENT NO. 6

OBJECTIVE: To study serial interface RS -232

Page 32: Data Communication Lab Manual
Page 33: Data Communication Lab Manual
Page 34: Data Communication Lab Manual

EXPERIMENT NO. 7

http://gurgaon.dronacharya.info/ecedept/Downloads/Labmanuals/AUG09_DEC09/VII_Sem/LM_ECE_DC_Exp.html

http://gurgaon.dronacharya.info/ecedept/Downloads/Labmanuals/AUG09_DEC09/VII_Sem/LM_ECE_DC_Manual.html