Download presentation
Presentation is loading. Please wait.
Published byBarrie Lawrence Modified over 9 years ago
1
Computers in Surveying SVY2301 / E4006 Automated Surveying
2
Communication Ports There are two basic types of communication ports available in most computers. These are: serial port; and parallel port.
3
Communication Ports serial ports (COM1 or COM2) are generally used for connection of peripherals such as: –Digitisersmodems; –Miceplotters. parallel ports (LPT1 and LPT2) are generally used for connection to printers or external disk drives.
4
Interfacing & Communication Surveyors can be faced with interfacing problems when trying to establish a connection between a data recorder and a computer. Survey equipment manufacturers usually supply standard interfacing cables for the most popular brands of computer but these may not be satisfactory in all cases. In addition to these problems interfacing problems can also occur when a surveyor tries to do something different such as connect his total station directly to a computer.
5
Interfacing & Communication Surveyors require a good understanding of at least the basic principles of interfacing and communications
6
Interfacing & Communication Number System & Codes A byte consisting of 8 bits can represent a total of 256 numbers in the range 0–255. –00000000 = decimal 0, and – 11111111 = decimal 255. a character code system based on an 8-bit byte would allow 256 characters to be coded. The ASCII-8 character code system is normally only used internally in the computer.
7
Interfacing & Communication Number System & Codes ASCII 7-bit code is the recommended data representation code for communications between devices. –allows 128 characters to be represented by the numbers 0–127. 1111111 is the binary representation of 127. 8th bit of the byte is often used for error detection purposes. –providing a check that the other 7 bits were not corrupted during transmission.
9
Interfacing & Communication Signal Devices a number of standard interfaces are adopted by the computing and electronics industries. These standards fall into two categories, –serial interfaces, and –parallel interfaces. Serial communication interfaces can support longer distances between devices. –telephone is a serial communication device.
10
Interfacing & Communication Signal Devices – Serial Interfaces data signals are transmitted over a two wire line by sending each bit one after the other as either a high or low voltage A standard signal code such as the ASCII 7- bit character code is used to control the data transfer.
11
Interfacing & Communication Signal Devices – Serial Interfaces The most common standard serial interface in the computer industry is the RS232C standard. It was intended to describe the interface between data terminal equipment (DTE) and data communications equipment (DCE). –A ‘dumb’ computer terminal is a DTE –a modem is an example of a DCE.
12
Interfacing & Communication Signal Devices – Signal Format (RS232C) The RS232C is actually a voltage standard. Logic state 0 is defined by a voltage between +5V and +15V whilst logic state 1 is defined by a voltage between –5V and –15V. A line is in logic state 1 or ‘high’ during idle time. The transmission of a data signal can be represented by a block diagram with the 1’s represented as highs and the zeros as lows.
13
Interfacing & Communication Signal Devices – Signal Format (RS232C) The RS232C is actually a voltage standard. Logic state 0 is defined by a voltage between +5V and +15V
14
Interfacing & Communication Signal Devices – Signal Format (RS232C) logic state 1 is defined by a voltage between –5V and –15V. A line is in logic state 1 or ‘high’ during idle time.
15
Interfacing & Communication Signal Devices – Signal Format (RS232C) The 7-bit binary code for the character ‘A’ is 1000001.
16
Interfacing & Communication Signal Devices – Signal Format (RS232C) To advise the receiver that a character is being sent the transmitter prefaces each character with a start bit, a zero. –the line switches from a negative voltage to a positive voltage.
17
Interfacing & Communication Signal Devices – Signal Format (RS232C) The character bits are followed by; –a parity bit, and –one or two stop bits that leave the signal high until the next character is sent
18
Interfacing & Communication Signal Devices – Signal Format (RS232C) The transmitting device must have at least as many stop bits as the receiver requires. When two way communication occurs both must have the same number of stop bits.
19
Interfacing & Communication Signal Devices – Signal Format (RS232C) The parity bit is often used for a simple error checking technique.
20
Interfacing & Communication Signal Devices – Signal Format (RS232C) even parity –The transmitting device counts the number of 1s in each character and if there are an even number then the parity bit is set to 0. – If the number of 1s added to an odd number then the parity bit would be set to 1 so the total was even. When the data bits are received the receiving device counts the number of 1s and if they add up to an even number the character is accepted. If they total to an odd number the transmitter may be asked to re-transmit the character. It should be noted that this simple check only checks an error in one bit as errors in two or more bits may cancel each other and the wrong character is then accepted.
21
Interfacing & Communication Signal Devices – Signal Format (RS232C) even parity –The transmitting device counts the number of 1s in each character and if there are an even number then the parity bit is set to 0. If the number of 1s added to an odd number then the parity bit would be set to 1 so the total was even. –the receiving device also counts the number of 1s and if they add up to an even number the character is accepted. If they total to an odd number the transmitter may be asked to re-transmit the character. –only checks an error in one bit as errors in two or more bits may cancel each other and the wrong character is then accepted.
22
Interfacing & Communication Signal Devices – Signal Format (RS232C) Odd parity –the parity bit is set such that the number of 1s in the data bits (including the parity bit) add up to an odd number. No Parity –If ‘none’ is selected then no parity check is carried out by the receiver. –This option is only available when 8-bit words are used as a parity bit is not sent.
23
Interfacing & Communication Signal Devices – Signal Format (RS232C) Communication Parameters Basic Characteristics. –Most equipment that surveyors use would communicate using asynchronous, half-duplex signals at RS232C voltage levels. Baudrate. –Both devices must be set to the same baud rate – i.e. bits per second.
24
Interfacing & Communication Signal Devices – Signal Format (RS232C) Communication Parameters Parity. –Both devices must be set to the same parity. Start and stop bits. –All devices attach one start bit to the data bits and either one or two stop bits. –Some devices allow the user to select either one or two stop bits. –Both devices must be set to the same number of stop bits.
25
Interfacing & Communication Signal Devices – Signal Format (RS232C) Communication Parameters Word length. –The standard word length is 8 bits (7 data bits + 1 parity bit). –Many devices however allow the user to select a 9 bit word (8 data bits for the character + 1 parity bit). In this case if a parity bit is selected then only one stop bit may be used.
26
Interfacing & Communication Signal Devices – Signal Format (RS232C) Communication Parameters ACK/NAK. –Normally the transmitting device sends all of the data continuously, one block after another. –When protocol is selected as a parameter however, the transmitter waits at the end of each block of data until it receives acknowledgement from the receiver that the data has been received. The character ACK is sent from the receiver to the transmitter in this case. –If the data block was not received or was corrupted then the character NAK is sent to the transmitter. In this case the transmitter re-transmits the data block.
27
Interfacing & Communication Signal Devices – Signal Format (RS232C) Communication Parameters XON/XOFF. –Some devices use these control characters to control the flow of characters. –When a device receives an XOFF character (DECIMAL 19) during output, it suspends transmission until an XON character (Decimal 17) is received from the other device, after which it continues with the transmission.
28
Interfacing & Communication Signal Devices – Signal Format (RS232C) Communication Parameters Last characters. –The user is often able to select the last characters that will be transmitted after a block of data. –Normally the characters CR and LF (carriage return and line feed) are sent to end the data block. –With some devices the user may select CR only as the last character.
29
Interfacing & Communication Signal Devices – Signal Format (RS232C) Communication Parameters Most devices have a set-up or configuration program that enables the user to select the required parameters from a menu that can be scrolled through all of the alternative settings. Alternatively the user must carefully set a series of microswitches on the device. These switches are often called dip switches.
30
Interfacing & Communication Signal Devices – Pin & Line Assignment (RS232C) The Canon D range of 25 way connectors –only between 3 and 10 wires are used for computer communications.
31
Interfacing & Communication Signal Devices – Pin & Line Assignment (RS232C) PinSignalFunction 1PGProtective Ground 2TXDDTE TRANSMITS DATA RXDDCE RECEIVES DATA 3RXDDTE RECEIVES DATA TXDDCE TRANSMITS DATA 4RTSREQUEST TO SEND 5CTSCLEAR TO SEND 6DSRDATA SET READY 7SGSIGNAL GROUND 8DCDDATA CARRIER DETECT 20DTRDATA TERMINAL READY
32
Interfacing & Communication Signal Devices – Pin & Line Assignment (RS232C) The connector may be male or female i.e. having pins or holes respectively. Generally –a DTE device will have a male connector, and –a DCE will have a female connector
33
Interfacing & Communication Signal Devices – Pin & Line Assignment (RS232C) An RS232 interface may be successfully achieved with just three wires if no hardware ‘handshaking’ is required. The lines used in this case are lines 2, 3 and 7.
34
Interfacing & Communication Signal Devices – Pin & Line Assignment (RS232C) the transmit pin on one device is connected to the receive pin of the other device. –Obviously this must also be the case if communication is to occur. both devices may be configured as DTEs. In this case both transmit on pin 2 and receive on pin 3. The normal solution is to cross the lines to achieve a successful interface,
35
Interfacing & Communication Signal Devices – Pin & Line Assignment (RS232C) both devices may be configured as DTEs. –both transmit on pin 2 and receive on pin 3. The normal solution is to cross the lines to achieve a successful interface,
36
Interfacing & Communication Signal Devices – Pin & Line Assignment (RS232C) both devices may be configured as DTEs. –both transmit on pin 2 and receive on pin 3. The normal solution is to cross the lines to achieve a successful interface,
37
Interfacing & Communication Signal Devices – Pin & Line Assignment (RS232C) the flow of characters can only be in one direction at a time –Communications would normally have to be software controlled Normally other lines on the interface are used to control the flow. When these control lines are used the term ‘handshaking’ is used to describe their function
38
Interfacing & Communication Signal Devices – Pin & Line Assignment (RS232C) Normally other lines on the interface are used to control the flow. When these control lines are used the term ‘handshaking’ is used to describe their function
39
Interfacing & Communication Signal Devices – Pin & Line Assignment (RS232C) Protective Ground DTE transmits data DCE receives data Request to send Clear to send Data carrier detect Data set ready Data terminal ready Signal ground
40
Interfacing & Communication Signal Devices – Pin & Line Assignment (RS232C) Pin 20 is set high by each device when it is switched on. Thus each device informs the other that it is ready Data terminal ready Signal ground
41
Interfacing & Communication Signal Devices – Pin & Line Assignment (RS232C) When a device is ready to transmit data pin 4 is set high DCE receives data Request to send Clear to send Data carrier detect detected on pin 8 of the other device
42
Interfacing & Communication Signal Devices – Pin & Line Assignment (RS232C) If it is ready to receive a message it will respond with a clear to send (CTS) on pin 5 DCE receives data Request to send Clear to send Data carrier detect detected on pin 8 of the first device
43
Interfacing & Communication Signal Devices – Parallel Interfaces each bit of a data byte travels down its own wire. –for an 8-bit byte the interface would consist of at least 8 wires. Normally used for one way communication between a computer and an output device such as a printer or plotter. If two-way parallel communication is required then additional cables are required for hardware handshaking. The Centronics pin connectors have become the standard parallel interface for printers. This connector has 36 pins.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.