POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas...

24
POINT TO POINT WIRELESS INFRARED LIGHT COMMUNICATION GOB YIAW BOONG Tesis Dikemukakan Kepada Fakulti Kejuruteraan, Universiti Malaysia Sarawak Sebagai Memenuhi Sebabagian daripada Syarat Penganugerahan Sarjana Muda Kejuruteraan Dengan Kepujian (Kejuruteraan Electronik dan Telekomunikasi) 2000

Transcript of POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas...

Page 1: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

POINT TO POINT WIRELESS INFRARED LIGHT COMMUNICATION

GOB YIAW BOONG

Tesis Dikemukakan Kepada Fakulti Kejuruteraan Universiti Malaysia Sarawak

Sebagai Memenuhi Sebabagian daripada Syarat Penganugerahan Sarjana Muda Kejuruteraan

Dengan Kepujian (Kejuruteraan Electronik dan Telekomunikasi) 2000

DEDICATION

For God so loved the world that he gave his only Son so that everyone who believes in him will not perish but have eternallwe

[John 316]

II

au

PENGBARGAAN

Penulis ingin merakam penghargaan ikhlas kepada penyelia tesis EnNg Liang Yew dan

En Hushari Hj Zen di alas keperihatinan dan sokongan yang diberi sepanjang tempoh

penyelidikan tesis ini

Penghargaan kepada Pembantu Makmal En Zakaria atas sokongan beliau dalam

menjayakan projek tesis ini

Penghargaan juga diberi kepada sesiapa yang samada secara langsung atau tidak

langsung membantu dalam projek ini

III

i

ABSTRAK

Adalah menjadi satu masalah untuk mencapai maklumat di kawasan yang terpencil

Pembangunan rangkaian untuk kawasan tersebut biasanya bennasalah disebabkan beberapa

faktor Pertama kawasan tersebut adalah jauh dari rangkaian yang sediaada Kedua faktor

geographi kos pelaburan kos operasi serta pulangan yang rendah tidak menggalakan

syarikat telekomunikasi melabur di kawasan tersebut Ketiga tenaga mahir diperlukan kos

buruh mungkin tinggi Keempat lesen dari pihak berkuasa tempatan mungkin diperlukan

Kertas ini akan membincangkan satu pendekatan yang membolehkan individu berkomunikasi

secara tanpa wayar dengan menggunakan standard RS232 dan cabaya Laser sebagai

pembawa maklumat Perbincangan kertas ini merangkumi asas-asas rangkaian

telekommunikasi piawaian RS232 kaedah pemodulatan tanpa wayar analisa perisian dan

litar sistem tersebut Cadangan kertas ini ialah menggunakan RS232 Tranceiver yang

kedapatan dari Electronics Australia bertarikh October 1999 muka surat 56-61

IV

ABSTRACT

Is always a problem to access the data at a remote area The implementation on wireless

network for remote area is difficult due to certain reason First The places was isolated and

far from existing telecommunication access point Second the geographical factor high

investment cost of operation and maintenance low return will made a telecommunication

firm reluctant to put their investment in such area Third a highly skill personnel is need and

labour cost could be higher Forth the license from the authority concern might be required

Therefore this paper was to discuss a solution that allowed individual to communicate via

RS232 port using Laser light as communication medium This topics will cover the

fundamental of telecommunication network standard RS232 interface standard wireless

modulation technique Laser fundamental hardware and software analysis This paper is

designing to use RS232 Laser transceiver adapted from Electronics Australia dated Oct 1997

pg56-61

v

TABLE OF CONTENTS

Contents Pages

iiDEDICATION

ACKNOWLEDGEMENT iii

ABSTRAK iv

ABSTRACT v

TABLE OF CONTENTS vi

LIST OF ILLUSTRATION ix

Chapter 1 Wireless Communication An Overview

10 An Introduction 1 11 Wireless Network 1 12 Fundamental ofa Wireless Internet System 2 13 The Purpose of This Paper 2

CbapterZ RSZ3Z Interface amp Serial Communication

20 Overview 5 21 RS232 Pin Abbreviation 6 22 DART 7 23 Serial Communication 8 24 Parallel Communication 8 25 Asynchronous amp Synchronous Data 9 26 The Start Data Parity and Stop bit 10

261 Start bit 11 262 Data bits 11 263 Parity bits 11 264 Stop bit 12

27 Data Transmit amp Receive Process 12 281 Transmit ofa character 12 282 Receive ofa character 13

28 COM Port Setting 14

VI

Chapter 3 Laser as a Communication Medium

30 Fundamental of light 15 31 What is Laser 17 32 Characteristic ofa Laser Beam 19 33 Type ofLaser 20

331 Semiconductor Laser 20 332 Gas Lasers 20 333 Solid State Laser Nd YAG Laser 21

34 Light Modulation Scheme 22 35 Several Optical Modulation Techniques 25

351 Analog modulation 25 352 Pulse Modulation Technique 27

Chapter 4 Modulation Technique for Wireless System

40 Why Need Modulation 29 41 Amplitude Modulation 29 42 Frequency Modulation-AMPS 30 43 Generation ofFrequency Modula 31 44 Digital Modulation Technique 32 45 Frequency Shift Keying 32 46 Phase Shift Keying 35 47 Quadrature Phase Shift Keying 36 48 Offset Quadrature Phase Shift Keying 37 49 Minimum Shift Keying 39

Chapter 5 Laser Safety

50 Laser Beam Hazard 41 51 Safety Precaution amp Control Procedure 41 52 Class ofLaser 42

Chapter 6 System Design

60 Basic Overview 43 61 System Design 44 62 The Block Diagram 44 63 Function For Each Block 45 64 The Construction 45 65 Construction PCB 47 66 Observation 47 67 Testing

VII

p

Chapter 7 Software Analysis

70 Software Overview 50 71 Include Header File 53 72 Define The Setting 54 73 The Other Function 54 74 The Other Testing Program 55

ChapterS Conclusion

80 The Conclusion 58 81 The Future Work 58

APPENDIX A 60

REFERENCE 61

vm

LIST OF ILLUSTRATION

Figure Page

18 THE BLOCK DIAGRAM OF TYPICAL NETWORK 2

Ib CELCOMtrade DATA2GONETWORK

Ie SIMPLEST POINT-TO-POINT DATA COMMUNICATION VIA

2

RS232 LASER TRANSCEIVER 4

28 THE RS232 PIN CONFIGURATION 6

2b A NULL MODEM CONFIGURATION 6

2e DETAIL EXPLANATION OF RS232 PIN ABBREVIATION 7

2d THE SERIAL PORT BASE REGISTER 8

2e A PARALLEL PRINTER TO COMPUTER CONFIGURATION 9

2f SYNCHRONOUS DATA FORMAT 10

2g ASYNCBRONOUS DATA FORMAT 10

2h THE DATA BIT FORMAT 11

2i USART BLOCK DIAGRAM 13

3a ELECTRIC AND MAGNETIC FIELD IN PLANE ELECTROMAGNETIC WAVE 16

3b ILLUSTRATION OF ENERGY DIAGRAM FOR TWO LEVEL ENERGY SYSTEM ABSORPTION STIMULATED EMISSION 19 SPONTANEOUS EMISSION

3e SPATIAL COHERENT AT FOCUSING POINT 20

IX

po

3d EXCITATION OF GASEOUS LASER MEDIUM REFLECTION 21 OF PHOTON DURING STIMULATED EMISSION EXITING PHOTON IN LASER BEAM

SIGNAL (C) INTENSITY OF LIGHT

3e SCHEMATIC DIAGRAM FOR AN END PUMPED ND YAGLASER 22

3f THE ELECTROMAGNETIC SPECTRUM 23

3g AMPLITUDE MODULATION OF OPTICAL LIGHT BEAM 24

3h NON RETURN ZERO FORMAT 24

3i RETURN TO ZERO FORMAT 24

3j USING FM MODULATION TO MODULATED INTENSITY OF tiGHT (A) MASSAGE AMPUTUDE (B) FM MODULATION 25

4a AM SIGNAL MODULATION 30

4b FM SIGNAL MODULATION 31

4c FREQUENCY MODULATION 32

4d FSKFORMAT 33

4e FORMATION OF FSK SIGNAL 34

4f NON COHERENT DEMODULATION 35

4g COHERENT DEMODULATION 35

4h PSK WAVEFORM 36

4i THE GENERATION OF QPSK SIGNAL 37

4j OQPSK WAVEFORM (HALF SYMBOL OFFSET) 38

4k GENERATION ON OQPSK SIGNAL 39

41 GENERATION OF MSK WAVEFORM 40

4m OUTPUT WAVEFORM OF MSK SIGNAL 41

x

5a LASER WARNING LABEL 42

6a SIMPLE BLOCK DIAGRAM RS131 LASER COMMUNICATION SYSTEM 43

6b BLOCK DIAGRAM OF RS131 LASER TRANSCEIVER 44

6c SCHEMATIC OF TRANSCEIVER 45

6d PCB LAYOUT 46

6e DB9JUMPERING 48

7a THE HEADER FILE 54

7b THESETI1NG 55

7c BIOSCOM EXAMPLE 56

7d BIOS_SERIALCOM EXAMPLE 57

XI

CHAPTERt

WIRELESS COMMUNICATION AN OVERVIEW

to An Introduction

A communication occurs when there was an infonnation flow The word

telecommunication is derive from the Greek tele far of and communicare to share

[1] The communication is the process of transferring interpreting and processing

infonnation (data) among the people machines and place This process implies that we

need a sender a medium and a receiver to perform infonnation flow Therefore the

telecommunication is the process of exchanging the data of information in any useable

fonn in any natural delivery among two or more user by using radio wire and light and

other mechanical means

1t Wireless Network

Consider a cellular telephone system that provided coverage in a geographical

area as figure ta shown

To provide wireless communication within a region a Radio Base Station (RBS) must be

set up The Radio Base Station will perfonn the function as access point to the mobile

user and a connection with Mobile Switching Center A mobile user connected to base

station through Common Air Interface which can also called Handshaking ProtocoL [2]

The Radio Base Station will connect to mobile Switching Center through landline The

mobile switching center will provide connectivity to Public Switch Telephone Network

The PSTN Switching Center will provide connectivity to global network

The basic concept of a wireless network was to establishing the mobile user to a base

station followed by connection with mobile switch center and from mobile center

connected to global network

1

Mobile SWltchlna Center(MSC) or

Mobile Telephone SWItohlna omce Voice and Data link

(Landline or ~microwave)

Q ~ ~P-

PSTN

regRadio Link air interface

Figure la The Block Diagram of a Typical Wireless Network [ 2 ]

PSTN network and mobile network will connect by either fix-line or radio wave For the

fixmiddotline It will be twisted copper cable coaxial cable fiber optics cable For the radio

wave it either use microwave and satellite link The characteristic of a PSTN network is

the user was fix at one location while the mobile network allowed the user to move

within the coverage area The process of moving within the coverage area called

Roaming

12 Fundamental of a Wireless Intemet System

To accessing the internet a cellular user need to use a PCMCIA card with the adapter to

connected to laptop in the area where PSTN line was not accessible For example the

product of Celcom Data2Go for wireless data communication can have the following

function shy

e Electronic mail system

e Sending and receiving fax

2

bull Accessing Company database

bull Submit customer order

bull On-line information service

bull accessing Internet-surfing into Netscape

bull terminal mode- billinwregistration

The network ofData2Go by Celcomtradeas shown shy

Figure Ib Celcomtrade Data2Go Network 14 I

Software uses for this type ofnetwork are

bull Delrina WinFaxPro

bull Microsoft Mail

bull Netscape

bull Lotus Notes

13 The purpose of this paper

The main purpose of this project is to develop a useable technique that suitable for

sending data wireless via RS232 communication port The system component will consist

of a desktop computer that act as input device a standard RS232 interface a transceiver

for transmit and receive signal and a modify laser poniter The suggested system will be

3

set and tested in a point-to-point configuration As the figure show below the network

diagram stated shy

J -~HJj----tcooo ~ IEco~codl---=RS=232=--_~ Personal computer Signal RS232 Laser Transceiver RS2321aser Transceiver Personal computer

Figure lc The Simples point to point data communication via RS131laser transceiver

4

Cbapter2

RS-232 INTERFACE AND SERIAL COMMUNICATION

20 Overview

RS 232 Interface in a simple universal well knows data interface RS means

Recommended Standard1 The female connector attaches to Data Communication

Equipment and male connector attaches to Data Terminal Equipment Mostly today PCs

are equipped with two RS232 ports via COMI or COM2 The additional COM port

COM3 and COM4 required additional card

RS-232 defines 25-pin communication line Every line has their own function to

accessing data The configurations ofevery pin layout are show in figure 2a

Normally The ground signal refers to pin 7 Two computers can communicate by using a

null modem A null modem is a special made direct cable and connector It is functioning

like a modem but has limited transmission range Figure 2b illustrated the common

method to wiring a null modem Pin2 and pin3 are wire together and all the cables are

connect in such a way a modem simulated between two computers

The electrical characteristic define by RS232 as

(a) Total capacitance not less than 2500 pF

(b) (b) A binary high logic output lines is + 5to + 15 volts input lines is from +3

to + 15 volts

(c) A binary low logic output lines is from -5 to -15 volts input lines is from -3

to -15 volts

(d) output lines voltages -5 and +5 -3 and +3 volts for input lines are undefined

5

Shelld~ Secondary

tntnsmltted data Transmlttins

Signal element timlne (DCEoTE)

Secondary

Relcetver received data

Signal tlmlne(DCEoTE) Looak

Loopok Secondary

Request To8end

DTERudy

Rem_ Loopb8ok amp Signal Qua

Decmlctor RinS indicator

l reg

Transmitted Data

Request to Send

DCEReady

Rivedline 818nal Detector

Reserved (Testing)

Secondary Received Lne Signel Detector

Recetve Data

reg

Crto8ent

Signal Ground Comman RetUrn

reg Rrved (Testing)

Datas18nal

I 10

rate ct UnusedTnulSmitter signal Signed

element -f

timing (DTE-DCE) bull Tnt Mode 8eooundary~ 13 c

To8ent~

Figure 2a The RS232 pin configuration [81

Pin Number Line Line Pin Number

2 m m 2

3 RD RD 3

4 RTS RTS 4

5 CTS CTS 5

6 DSR---- DSR 6

7 Common 7

8 DCD DCD 8

20 DTR DTR 20

22 R1 R1 22

Figure 2b A Null Modem Configuration [8]

6

21 The Explanation For RS1Jl Pin Abbreviation

Hence is the detail ofeach line in DB9 and DB25 function

Clear to Send (CTS)

Data Carrier Detect (OCR)

Data Set Ready (DSR)

Data Terminal Ready (DTR)

Receive Data (RO)

Ring Indicator (RI)

Requested to Send (RTS)

Transmit Data (TD)

asserted (logic state 1) by DCE it is ready to receive data

logic state 1 whenever there is data link in progress

logic state 1 when DCE is ready to communicated withDTE

logic state 1 when DTE is ready to communicated withDCE

use by DCE to send data to DTE

logic 1 by DCE when a ring is detect

logic state 1 by DTE when it want to transmit data toDCE

Use by DTE to send data to DCE

Figure lc The Detail Explanation of Abbreviation [ 8]

22 UART

UART Universal Asynchronous Receiver Transmitter is a special hardware in RS232

serial interface It sometime called as Asynchronous Communication Element

Most of the new personal computer today is equip with 16450 and 16550 UART The

function ofUART chip is to convert the parallel data to a serial data format that enable a

serial communication between two computers The UART chip also uses to convert back

7

the serial bits to parallel bits format The operation of UART mostly control by one or

more register The process of read writes data to register are through input and output

ports Figure ld showing the address of a UART for COMI and COM4

The UART have FIFO or First in First out buffer FIFO bring the meaning as the first

data to enter the buffer are first to leave The function of buffer is to hold data temporary

before it was feed to the transmission medium The modem 16550A UART have16 bytes

FIFO This means 16 bytes can be writes to UART before anything was overwrite The

16550 UART was necessary for a high-speed communication under windows or

application running under window environment

Serial port Base Register Port Address

COM 1 3F8H COM2 2F8H COM3 3E8H COM3 2E8H

Figure ld The Serial Port Base Register Port [7 ]

23 Serial Communication

Serial communication is transmission of data over a serial interface one data bit at a time

In other word data are transfer through and forth over a single wire Therefore serial

communication is more cost effective than parallel communication RS232 is an example

for serial communication interface

24 Parallel Interface

Parallel communication is a way to sending more than one data at a time (normally eight

data bits) over to a parallel device or a Com Port For an example a computer will send

eight data bits of information to a parallel printer A very simple diagram of parallel

communication was present as Figure 2e The parallel interfaces require separated wire

8

------_------------__shyp

for sending separated data and therefor allowed faster and efficient data transmission On

the other hand to setting up a parallel communication network will be more costly than

serial communication network

1 Printer Interface

1 3 4 5 6 7 8

1 Computer Interface

2 3 4 5 6 7 8

Figure 2e A parallel Printer to Computer Interface [7 ]

25 Asynchronous and synchronous data

For two devices to communicate a way of synchronizing data must be set There are two

way ofdata formatting by using either asynchronous or synchronous

The synchronous operation is such a way that for each line data transmit it has a

separated clock to synchronous that data on a time of period For example data are

transfer once in each direction to and from the computer The synchronous data format

was show in figure 2f

While the asynchronous data is such a way that data are synchronous without clock

Each time the data are transmitting the receiver need to figure out how fast the data is

running The frame of asynchronous data has start and stops bit In another world the

frame always added with additional start and stop bit The asynchronous data format was

show in figure 2g

9

01100011100 o 1 1 1 11 0 0 0 0 001 0110 1 1 0

Unique Code

Continuous Block

Direction offlow

Figure 2f Synchronous data format I 8 ]

Start Stop d7 d6 d5 d4 d3 d2 dl dO Start

1 0 1 0 1 1 0 0I 1 I IMSB LSB

Start bit Stop bit1 Data-bits 1 I

r space mark mark space mark space mark mark space space

Serial Communication

Figure 2g Asynchronous Data Format Adopted form [8]

26 The Start Parity and Stop bits

For two machines to communicate to each other first thing both machines must agree on

the rate of speed for data transfer Second thing is the data must fonnatted for

synchronous or asynchronous operation Therefor for asynchronous operation the data

fonnatted in such a way that contains start and stop bit

271 Start bit

10

The TD line at interface device (Pin3) will go high when no data been transmit To start

transmit a data Transmit serial device will set TD line to low by means ofa start bit The

synchronous operation of DCE is waiting the TD line sign change from high bit to low

bit than DCE pauses half of a bit time and start sampling the incoming data until all the

character has been completely transmit To maintain synchronimtion DCE always

sampling the incoming data string at middle ofeach bit

272 Data bits

The data bits are the bits that contain character Nonnallyone character contains eight

bits Hence is the data bits showing character Amiddot 4tH

l start bit 41----shy Data bits j

shy

I t I Io 0 0 0 0 0

1 1deg1 1

Figure 2h The Data bits Format ( 7 ]

273 Parity bits

Four basic fonns ofparity bits are NONE EVEN ODD MARK and SPACE NONE use

for transmits a character without parity bit EVEN parity use to indicate by send logic 1

after a character if there is an odd number of logic 1 bit after a character data bit

Otherwise logic for EVEN parity goes to zero Odd parity will indicate by sending logic

1 after a data of a character bits if there is an even number of logic 1 after a characters

data bits Otherwise logic for ODD parity goes to zero Mark is logic 1 parity bit after a

data character and SPACE is logic zero after the data character

11

274 Stop bits

The stop bit indicated the end of a character The serial device was always send logic 1

for stop bit

28 Data Transmit and Receive Process

281 Transmit of a character

Several steps take before characters are transmitting from processor to modem

For an example communication between processor and 8251A USART

First the processor configures UART according to the communication protocol

Second an instruction was send to UART and set the flag TxEN Next The processor

was send the character to the data buffer ofUART Then this data buffer transfer the

character to transmit buffer for preparation for transmission Once data buffer was

complete transfer the character and ready to receive a new character the TXRDY flag

will set When processor automatically write in data buffer TXRDY flag automatically

reset

Next RTS (Ready to Send)pin output pin ofUART will alerted by modem that the bits

are about to transmit RTS pin for UART is tie together with modem RTS pin while the

modem realizes about to receive character from UART CTS pin will activated Then the

character was automatically transfer to modem The internal flag TxEMPTY will set

once the character was completely transmit from UART to modem

282 Receive of a character

The process of data receiving was also take several sequence First processor configures

UART according to standard protocol Then to receive a character the processor sends a

12

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf
Page 2: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

DEDICATION

For God so loved the world that he gave his only Son so that everyone who believes in him will not perish but have eternallwe

[John 316]

II

au

PENGBARGAAN

Penulis ingin merakam penghargaan ikhlas kepada penyelia tesis EnNg Liang Yew dan

En Hushari Hj Zen di alas keperihatinan dan sokongan yang diberi sepanjang tempoh

penyelidikan tesis ini

Penghargaan kepada Pembantu Makmal En Zakaria atas sokongan beliau dalam

menjayakan projek tesis ini

Penghargaan juga diberi kepada sesiapa yang samada secara langsung atau tidak

langsung membantu dalam projek ini

III

i

ABSTRAK

Adalah menjadi satu masalah untuk mencapai maklumat di kawasan yang terpencil

Pembangunan rangkaian untuk kawasan tersebut biasanya bennasalah disebabkan beberapa

faktor Pertama kawasan tersebut adalah jauh dari rangkaian yang sediaada Kedua faktor

geographi kos pelaburan kos operasi serta pulangan yang rendah tidak menggalakan

syarikat telekomunikasi melabur di kawasan tersebut Ketiga tenaga mahir diperlukan kos

buruh mungkin tinggi Keempat lesen dari pihak berkuasa tempatan mungkin diperlukan

Kertas ini akan membincangkan satu pendekatan yang membolehkan individu berkomunikasi

secara tanpa wayar dengan menggunakan standard RS232 dan cabaya Laser sebagai

pembawa maklumat Perbincangan kertas ini merangkumi asas-asas rangkaian

telekommunikasi piawaian RS232 kaedah pemodulatan tanpa wayar analisa perisian dan

litar sistem tersebut Cadangan kertas ini ialah menggunakan RS232 Tranceiver yang

kedapatan dari Electronics Australia bertarikh October 1999 muka surat 56-61

IV

ABSTRACT

Is always a problem to access the data at a remote area The implementation on wireless

network for remote area is difficult due to certain reason First The places was isolated and

far from existing telecommunication access point Second the geographical factor high

investment cost of operation and maintenance low return will made a telecommunication

firm reluctant to put their investment in such area Third a highly skill personnel is need and

labour cost could be higher Forth the license from the authority concern might be required

Therefore this paper was to discuss a solution that allowed individual to communicate via

RS232 port using Laser light as communication medium This topics will cover the

fundamental of telecommunication network standard RS232 interface standard wireless

modulation technique Laser fundamental hardware and software analysis This paper is

designing to use RS232 Laser transceiver adapted from Electronics Australia dated Oct 1997

pg56-61

v

TABLE OF CONTENTS

Contents Pages

iiDEDICATION

ACKNOWLEDGEMENT iii

ABSTRAK iv

ABSTRACT v

TABLE OF CONTENTS vi

LIST OF ILLUSTRATION ix

Chapter 1 Wireless Communication An Overview

10 An Introduction 1 11 Wireless Network 1 12 Fundamental ofa Wireless Internet System 2 13 The Purpose of This Paper 2

CbapterZ RSZ3Z Interface amp Serial Communication

20 Overview 5 21 RS232 Pin Abbreviation 6 22 DART 7 23 Serial Communication 8 24 Parallel Communication 8 25 Asynchronous amp Synchronous Data 9 26 The Start Data Parity and Stop bit 10

261 Start bit 11 262 Data bits 11 263 Parity bits 11 264 Stop bit 12

27 Data Transmit amp Receive Process 12 281 Transmit ofa character 12 282 Receive ofa character 13

28 COM Port Setting 14

VI

Chapter 3 Laser as a Communication Medium

30 Fundamental of light 15 31 What is Laser 17 32 Characteristic ofa Laser Beam 19 33 Type ofLaser 20

331 Semiconductor Laser 20 332 Gas Lasers 20 333 Solid State Laser Nd YAG Laser 21

34 Light Modulation Scheme 22 35 Several Optical Modulation Techniques 25

351 Analog modulation 25 352 Pulse Modulation Technique 27

Chapter 4 Modulation Technique for Wireless System

40 Why Need Modulation 29 41 Amplitude Modulation 29 42 Frequency Modulation-AMPS 30 43 Generation ofFrequency Modula 31 44 Digital Modulation Technique 32 45 Frequency Shift Keying 32 46 Phase Shift Keying 35 47 Quadrature Phase Shift Keying 36 48 Offset Quadrature Phase Shift Keying 37 49 Minimum Shift Keying 39

Chapter 5 Laser Safety

50 Laser Beam Hazard 41 51 Safety Precaution amp Control Procedure 41 52 Class ofLaser 42

Chapter 6 System Design

60 Basic Overview 43 61 System Design 44 62 The Block Diagram 44 63 Function For Each Block 45 64 The Construction 45 65 Construction PCB 47 66 Observation 47 67 Testing

VII

p

Chapter 7 Software Analysis

70 Software Overview 50 71 Include Header File 53 72 Define The Setting 54 73 The Other Function 54 74 The Other Testing Program 55

ChapterS Conclusion

80 The Conclusion 58 81 The Future Work 58

APPENDIX A 60

REFERENCE 61

vm

LIST OF ILLUSTRATION

Figure Page

18 THE BLOCK DIAGRAM OF TYPICAL NETWORK 2

Ib CELCOMtrade DATA2GONETWORK

Ie SIMPLEST POINT-TO-POINT DATA COMMUNICATION VIA

2

RS232 LASER TRANSCEIVER 4

28 THE RS232 PIN CONFIGURATION 6

2b A NULL MODEM CONFIGURATION 6

2e DETAIL EXPLANATION OF RS232 PIN ABBREVIATION 7

2d THE SERIAL PORT BASE REGISTER 8

2e A PARALLEL PRINTER TO COMPUTER CONFIGURATION 9

2f SYNCHRONOUS DATA FORMAT 10

2g ASYNCBRONOUS DATA FORMAT 10

2h THE DATA BIT FORMAT 11

2i USART BLOCK DIAGRAM 13

3a ELECTRIC AND MAGNETIC FIELD IN PLANE ELECTROMAGNETIC WAVE 16

3b ILLUSTRATION OF ENERGY DIAGRAM FOR TWO LEVEL ENERGY SYSTEM ABSORPTION STIMULATED EMISSION 19 SPONTANEOUS EMISSION

3e SPATIAL COHERENT AT FOCUSING POINT 20

IX

po

3d EXCITATION OF GASEOUS LASER MEDIUM REFLECTION 21 OF PHOTON DURING STIMULATED EMISSION EXITING PHOTON IN LASER BEAM

SIGNAL (C) INTENSITY OF LIGHT

3e SCHEMATIC DIAGRAM FOR AN END PUMPED ND YAGLASER 22

3f THE ELECTROMAGNETIC SPECTRUM 23

3g AMPLITUDE MODULATION OF OPTICAL LIGHT BEAM 24

3h NON RETURN ZERO FORMAT 24

3i RETURN TO ZERO FORMAT 24

3j USING FM MODULATION TO MODULATED INTENSITY OF tiGHT (A) MASSAGE AMPUTUDE (B) FM MODULATION 25

4a AM SIGNAL MODULATION 30

4b FM SIGNAL MODULATION 31

4c FREQUENCY MODULATION 32

4d FSKFORMAT 33

4e FORMATION OF FSK SIGNAL 34

4f NON COHERENT DEMODULATION 35

4g COHERENT DEMODULATION 35

4h PSK WAVEFORM 36

4i THE GENERATION OF QPSK SIGNAL 37

4j OQPSK WAVEFORM (HALF SYMBOL OFFSET) 38

4k GENERATION ON OQPSK SIGNAL 39

41 GENERATION OF MSK WAVEFORM 40

4m OUTPUT WAVEFORM OF MSK SIGNAL 41

x

5a LASER WARNING LABEL 42

6a SIMPLE BLOCK DIAGRAM RS131 LASER COMMUNICATION SYSTEM 43

6b BLOCK DIAGRAM OF RS131 LASER TRANSCEIVER 44

6c SCHEMATIC OF TRANSCEIVER 45

6d PCB LAYOUT 46

6e DB9JUMPERING 48

7a THE HEADER FILE 54

7b THESETI1NG 55

7c BIOSCOM EXAMPLE 56

7d BIOS_SERIALCOM EXAMPLE 57

XI

CHAPTERt

WIRELESS COMMUNICATION AN OVERVIEW

to An Introduction

A communication occurs when there was an infonnation flow The word

telecommunication is derive from the Greek tele far of and communicare to share

[1] The communication is the process of transferring interpreting and processing

infonnation (data) among the people machines and place This process implies that we

need a sender a medium and a receiver to perform infonnation flow Therefore the

telecommunication is the process of exchanging the data of information in any useable

fonn in any natural delivery among two or more user by using radio wire and light and

other mechanical means

1t Wireless Network

Consider a cellular telephone system that provided coverage in a geographical

area as figure ta shown

To provide wireless communication within a region a Radio Base Station (RBS) must be

set up The Radio Base Station will perfonn the function as access point to the mobile

user and a connection with Mobile Switching Center A mobile user connected to base

station through Common Air Interface which can also called Handshaking ProtocoL [2]

The Radio Base Station will connect to mobile Switching Center through landline The

mobile switching center will provide connectivity to Public Switch Telephone Network

The PSTN Switching Center will provide connectivity to global network

The basic concept of a wireless network was to establishing the mobile user to a base

station followed by connection with mobile switch center and from mobile center

connected to global network

1

Mobile SWltchlna Center(MSC) or

Mobile Telephone SWItohlna omce Voice and Data link

(Landline or ~microwave)

Q ~ ~P-

PSTN

regRadio Link air interface

Figure la The Block Diagram of a Typical Wireless Network [ 2 ]

PSTN network and mobile network will connect by either fix-line or radio wave For the

fixmiddotline It will be twisted copper cable coaxial cable fiber optics cable For the radio

wave it either use microwave and satellite link The characteristic of a PSTN network is

the user was fix at one location while the mobile network allowed the user to move

within the coverage area The process of moving within the coverage area called

Roaming

12 Fundamental of a Wireless Intemet System

To accessing the internet a cellular user need to use a PCMCIA card with the adapter to

connected to laptop in the area where PSTN line was not accessible For example the

product of Celcom Data2Go for wireless data communication can have the following

function shy

e Electronic mail system

e Sending and receiving fax

2

bull Accessing Company database

bull Submit customer order

bull On-line information service

bull accessing Internet-surfing into Netscape

bull terminal mode- billinwregistration

The network ofData2Go by Celcomtradeas shown shy

Figure Ib Celcomtrade Data2Go Network 14 I

Software uses for this type ofnetwork are

bull Delrina WinFaxPro

bull Microsoft Mail

bull Netscape

bull Lotus Notes

13 The purpose of this paper

The main purpose of this project is to develop a useable technique that suitable for

sending data wireless via RS232 communication port The system component will consist

of a desktop computer that act as input device a standard RS232 interface a transceiver

for transmit and receive signal and a modify laser poniter The suggested system will be

3

set and tested in a point-to-point configuration As the figure show below the network

diagram stated shy

J -~HJj----tcooo ~ IEco~codl---=RS=232=--_~ Personal computer Signal RS232 Laser Transceiver RS2321aser Transceiver Personal computer

Figure lc The Simples point to point data communication via RS131laser transceiver

4

Cbapter2

RS-232 INTERFACE AND SERIAL COMMUNICATION

20 Overview

RS 232 Interface in a simple universal well knows data interface RS means

Recommended Standard1 The female connector attaches to Data Communication

Equipment and male connector attaches to Data Terminal Equipment Mostly today PCs

are equipped with two RS232 ports via COMI or COM2 The additional COM port

COM3 and COM4 required additional card

RS-232 defines 25-pin communication line Every line has their own function to

accessing data The configurations ofevery pin layout are show in figure 2a

Normally The ground signal refers to pin 7 Two computers can communicate by using a

null modem A null modem is a special made direct cable and connector It is functioning

like a modem but has limited transmission range Figure 2b illustrated the common

method to wiring a null modem Pin2 and pin3 are wire together and all the cables are

connect in such a way a modem simulated between two computers

The electrical characteristic define by RS232 as

(a) Total capacitance not less than 2500 pF

(b) (b) A binary high logic output lines is + 5to + 15 volts input lines is from +3

to + 15 volts

(c) A binary low logic output lines is from -5 to -15 volts input lines is from -3

to -15 volts

(d) output lines voltages -5 and +5 -3 and +3 volts for input lines are undefined

5

Shelld~ Secondary

tntnsmltted data Transmlttins

Signal element timlne (DCEoTE)

Secondary

Relcetver received data

Signal tlmlne(DCEoTE) Looak

Loopok Secondary

Request To8end

DTERudy

Rem_ Loopb8ok amp Signal Qua

Decmlctor RinS indicator

l reg

Transmitted Data

Request to Send

DCEReady

Rivedline 818nal Detector

Reserved (Testing)

Secondary Received Lne Signel Detector

Recetve Data

reg

Crto8ent

Signal Ground Comman RetUrn

reg Rrved (Testing)

Datas18nal

I 10

rate ct UnusedTnulSmitter signal Signed

element -f

timing (DTE-DCE) bull Tnt Mode 8eooundary~ 13 c

To8ent~

Figure 2a The RS232 pin configuration [81

Pin Number Line Line Pin Number

2 m m 2

3 RD RD 3

4 RTS RTS 4

5 CTS CTS 5

6 DSR---- DSR 6

7 Common 7

8 DCD DCD 8

20 DTR DTR 20

22 R1 R1 22

Figure 2b A Null Modem Configuration [8]

6

21 The Explanation For RS1Jl Pin Abbreviation

Hence is the detail ofeach line in DB9 and DB25 function

Clear to Send (CTS)

Data Carrier Detect (OCR)

Data Set Ready (DSR)

Data Terminal Ready (DTR)

Receive Data (RO)

Ring Indicator (RI)

Requested to Send (RTS)

Transmit Data (TD)

asserted (logic state 1) by DCE it is ready to receive data

logic state 1 whenever there is data link in progress

logic state 1 when DCE is ready to communicated withDTE

logic state 1 when DTE is ready to communicated withDCE

use by DCE to send data to DTE

logic 1 by DCE when a ring is detect

logic state 1 by DTE when it want to transmit data toDCE

Use by DTE to send data to DCE

Figure lc The Detail Explanation of Abbreviation [ 8]

22 UART

UART Universal Asynchronous Receiver Transmitter is a special hardware in RS232

serial interface It sometime called as Asynchronous Communication Element

Most of the new personal computer today is equip with 16450 and 16550 UART The

function ofUART chip is to convert the parallel data to a serial data format that enable a

serial communication between two computers The UART chip also uses to convert back

7

the serial bits to parallel bits format The operation of UART mostly control by one or

more register The process of read writes data to register are through input and output

ports Figure ld showing the address of a UART for COMI and COM4

The UART have FIFO or First in First out buffer FIFO bring the meaning as the first

data to enter the buffer are first to leave The function of buffer is to hold data temporary

before it was feed to the transmission medium The modem 16550A UART have16 bytes

FIFO This means 16 bytes can be writes to UART before anything was overwrite The

16550 UART was necessary for a high-speed communication under windows or

application running under window environment

Serial port Base Register Port Address

COM 1 3F8H COM2 2F8H COM3 3E8H COM3 2E8H

Figure ld The Serial Port Base Register Port [7 ]

23 Serial Communication

Serial communication is transmission of data over a serial interface one data bit at a time

In other word data are transfer through and forth over a single wire Therefore serial

communication is more cost effective than parallel communication RS232 is an example

for serial communication interface

24 Parallel Interface

Parallel communication is a way to sending more than one data at a time (normally eight

data bits) over to a parallel device or a Com Port For an example a computer will send

eight data bits of information to a parallel printer A very simple diagram of parallel

communication was present as Figure 2e The parallel interfaces require separated wire

8

------_------------__shyp

for sending separated data and therefor allowed faster and efficient data transmission On

the other hand to setting up a parallel communication network will be more costly than

serial communication network

1 Printer Interface

1 3 4 5 6 7 8

1 Computer Interface

2 3 4 5 6 7 8

Figure 2e A parallel Printer to Computer Interface [7 ]

25 Asynchronous and synchronous data

For two devices to communicate a way of synchronizing data must be set There are two

way ofdata formatting by using either asynchronous or synchronous

The synchronous operation is such a way that for each line data transmit it has a

separated clock to synchronous that data on a time of period For example data are

transfer once in each direction to and from the computer The synchronous data format

was show in figure 2f

While the asynchronous data is such a way that data are synchronous without clock

Each time the data are transmitting the receiver need to figure out how fast the data is

running The frame of asynchronous data has start and stops bit In another world the

frame always added with additional start and stop bit The asynchronous data format was

show in figure 2g

9

01100011100 o 1 1 1 11 0 0 0 0 001 0110 1 1 0

Unique Code

Continuous Block

Direction offlow

Figure 2f Synchronous data format I 8 ]

Start Stop d7 d6 d5 d4 d3 d2 dl dO Start

1 0 1 0 1 1 0 0I 1 I IMSB LSB

Start bit Stop bit1 Data-bits 1 I

r space mark mark space mark space mark mark space space

Serial Communication

Figure 2g Asynchronous Data Format Adopted form [8]

26 The Start Parity and Stop bits

For two machines to communicate to each other first thing both machines must agree on

the rate of speed for data transfer Second thing is the data must fonnatted for

synchronous or asynchronous operation Therefor for asynchronous operation the data

fonnatted in such a way that contains start and stop bit

271 Start bit

10

The TD line at interface device (Pin3) will go high when no data been transmit To start

transmit a data Transmit serial device will set TD line to low by means ofa start bit The

synchronous operation of DCE is waiting the TD line sign change from high bit to low

bit than DCE pauses half of a bit time and start sampling the incoming data until all the

character has been completely transmit To maintain synchronimtion DCE always

sampling the incoming data string at middle ofeach bit

272 Data bits

The data bits are the bits that contain character Nonnallyone character contains eight

bits Hence is the data bits showing character Amiddot 4tH

l start bit 41----shy Data bits j

shy

I t I Io 0 0 0 0 0

1 1deg1 1

Figure 2h The Data bits Format ( 7 ]

273 Parity bits

Four basic fonns ofparity bits are NONE EVEN ODD MARK and SPACE NONE use

for transmits a character without parity bit EVEN parity use to indicate by send logic 1

after a character if there is an odd number of logic 1 bit after a character data bit

Otherwise logic for EVEN parity goes to zero Odd parity will indicate by sending logic

1 after a data of a character bits if there is an even number of logic 1 after a characters

data bits Otherwise logic for ODD parity goes to zero Mark is logic 1 parity bit after a

data character and SPACE is logic zero after the data character

11

274 Stop bits

The stop bit indicated the end of a character The serial device was always send logic 1

for stop bit

28 Data Transmit and Receive Process

281 Transmit of a character

Several steps take before characters are transmitting from processor to modem

For an example communication between processor and 8251A USART

First the processor configures UART according to the communication protocol

Second an instruction was send to UART and set the flag TxEN Next The processor

was send the character to the data buffer ofUART Then this data buffer transfer the

character to transmit buffer for preparation for transmission Once data buffer was

complete transfer the character and ready to receive a new character the TXRDY flag

will set When processor automatically write in data buffer TXRDY flag automatically

reset

Next RTS (Ready to Send)pin output pin ofUART will alerted by modem that the bits

are about to transmit RTS pin for UART is tie together with modem RTS pin while the

modem realizes about to receive character from UART CTS pin will activated Then the

character was automatically transfer to modem The internal flag TxEMPTY will set

once the character was completely transmit from UART to modem

282 Receive of a character

The process of data receiving was also take several sequence First processor configures

UART according to standard protocol Then to receive a character the processor sends a

12

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf
Page 3: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

PENGBARGAAN

Penulis ingin merakam penghargaan ikhlas kepada penyelia tesis EnNg Liang Yew dan

En Hushari Hj Zen di alas keperihatinan dan sokongan yang diberi sepanjang tempoh

penyelidikan tesis ini

Penghargaan kepada Pembantu Makmal En Zakaria atas sokongan beliau dalam

menjayakan projek tesis ini

Penghargaan juga diberi kepada sesiapa yang samada secara langsung atau tidak

langsung membantu dalam projek ini

III

i

ABSTRAK

Adalah menjadi satu masalah untuk mencapai maklumat di kawasan yang terpencil

Pembangunan rangkaian untuk kawasan tersebut biasanya bennasalah disebabkan beberapa

faktor Pertama kawasan tersebut adalah jauh dari rangkaian yang sediaada Kedua faktor

geographi kos pelaburan kos operasi serta pulangan yang rendah tidak menggalakan

syarikat telekomunikasi melabur di kawasan tersebut Ketiga tenaga mahir diperlukan kos

buruh mungkin tinggi Keempat lesen dari pihak berkuasa tempatan mungkin diperlukan

Kertas ini akan membincangkan satu pendekatan yang membolehkan individu berkomunikasi

secara tanpa wayar dengan menggunakan standard RS232 dan cabaya Laser sebagai

pembawa maklumat Perbincangan kertas ini merangkumi asas-asas rangkaian

telekommunikasi piawaian RS232 kaedah pemodulatan tanpa wayar analisa perisian dan

litar sistem tersebut Cadangan kertas ini ialah menggunakan RS232 Tranceiver yang

kedapatan dari Electronics Australia bertarikh October 1999 muka surat 56-61

IV

ABSTRACT

Is always a problem to access the data at a remote area The implementation on wireless

network for remote area is difficult due to certain reason First The places was isolated and

far from existing telecommunication access point Second the geographical factor high

investment cost of operation and maintenance low return will made a telecommunication

firm reluctant to put their investment in such area Third a highly skill personnel is need and

labour cost could be higher Forth the license from the authority concern might be required

Therefore this paper was to discuss a solution that allowed individual to communicate via

RS232 port using Laser light as communication medium This topics will cover the

fundamental of telecommunication network standard RS232 interface standard wireless

modulation technique Laser fundamental hardware and software analysis This paper is

designing to use RS232 Laser transceiver adapted from Electronics Australia dated Oct 1997

pg56-61

v

TABLE OF CONTENTS

Contents Pages

iiDEDICATION

ACKNOWLEDGEMENT iii

ABSTRAK iv

ABSTRACT v

TABLE OF CONTENTS vi

LIST OF ILLUSTRATION ix

Chapter 1 Wireless Communication An Overview

10 An Introduction 1 11 Wireless Network 1 12 Fundamental ofa Wireless Internet System 2 13 The Purpose of This Paper 2

CbapterZ RSZ3Z Interface amp Serial Communication

20 Overview 5 21 RS232 Pin Abbreviation 6 22 DART 7 23 Serial Communication 8 24 Parallel Communication 8 25 Asynchronous amp Synchronous Data 9 26 The Start Data Parity and Stop bit 10

261 Start bit 11 262 Data bits 11 263 Parity bits 11 264 Stop bit 12

27 Data Transmit amp Receive Process 12 281 Transmit ofa character 12 282 Receive ofa character 13

28 COM Port Setting 14

VI

Chapter 3 Laser as a Communication Medium

30 Fundamental of light 15 31 What is Laser 17 32 Characteristic ofa Laser Beam 19 33 Type ofLaser 20

331 Semiconductor Laser 20 332 Gas Lasers 20 333 Solid State Laser Nd YAG Laser 21

34 Light Modulation Scheme 22 35 Several Optical Modulation Techniques 25

351 Analog modulation 25 352 Pulse Modulation Technique 27

Chapter 4 Modulation Technique for Wireless System

40 Why Need Modulation 29 41 Amplitude Modulation 29 42 Frequency Modulation-AMPS 30 43 Generation ofFrequency Modula 31 44 Digital Modulation Technique 32 45 Frequency Shift Keying 32 46 Phase Shift Keying 35 47 Quadrature Phase Shift Keying 36 48 Offset Quadrature Phase Shift Keying 37 49 Minimum Shift Keying 39

Chapter 5 Laser Safety

50 Laser Beam Hazard 41 51 Safety Precaution amp Control Procedure 41 52 Class ofLaser 42

Chapter 6 System Design

60 Basic Overview 43 61 System Design 44 62 The Block Diagram 44 63 Function For Each Block 45 64 The Construction 45 65 Construction PCB 47 66 Observation 47 67 Testing

VII

p

Chapter 7 Software Analysis

70 Software Overview 50 71 Include Header File 53 72 Define The Setting 54 73 The Other Function 54 74 The Other Testing Program 55

ChapterS Conclusion

80 The Conclusion 58 81 The Future Work 58

APPENDIX A 60

REFERENCE 61

vm

LIST OF ILLUSTRATION

Figure Page

18 THE BLOCK DIAGRAM OF TYPICAL NETWORK 2

Ib CELCOMtrade DATA2GONETWORK

Ie SIMPLEST POINT-TO-POINT DATA COMMUNICATION VIA

2

RS232 LASER TRANSCEIVER 4

28 THE RS232 PIN CONFIGURATION 6

2b A NULL MODEM CONFIGURATION 6

2e DETAIL EXPLANATION OF RS232 PIN ABBREVIATION 7

2d THE SERIAL PORT BASE REGISTER 8

2e A PARALLEL PRINTER TO COMPUTER CONFIGURATION 9

2f SYNCHRONOUS DATA FORMAT 10

2g ASYNCBRONOUS DATA FORMAT 10

2h THE DATA BIT FORMAT 11

2i USART BLOCK DIAGRAM 13

3a ELECTRIC AND MAGNETIC FIELD IN PLANE ELECTROMAGNETIC WAVE 16

3b ILLUSTRATION OF ENERGY DIAGRAM FOR TWO LEVEL ENERGY SYSTEM ABSORPTION STIMULATED EMISSION 19 SPONTANEOUS EMISSION

3e SPATIAL COHERENT AT FOCUSING POINT 20

IX

po

3d EXCITATION OF GASEOUS LASER MEDIUM REFLECTION 21 OF PHOTON DURING STIMULATED EMISSION EXITING PHOTON IN LASER BEAM

SIGNAL (C) INTENSITY OF LIGHT

3e SCHEMATIC DIAGRAM FOR AN END PUMPED ND YAGLASER 22

3f THE ELECTROMAGNETIC SPECTRUM 23

3g AMPLITUDE MODULATION OF OPTICAL LIGHT BEAM 24

3h NON RETURN ZERO FORMAT 24

3i RETURN TO ZERO FORMAT 24

3j USING FM MODULATION TO MODULATED INTENSITY OF tiGHT (A) MASSAGE AMPUTUDE (B) FM MODULATION 25

4a AM SIGNAL MODULATION 30

4b FM SIGNAL MODULATION 31

4c FREQUENCY MODULATION 32

4d FSKFORMAT 33

4e FORMATION OF FSK SIGNAL 34

4f NON COHERENT DEMODULATION 35

4g COHERENT DEMODULATION 35

4h PSK WAVEFORM 36

4i THE GENERATION OF QPSK SIGNAL 37

4j OQPSK WAVEFORM (HALF SYMBOL OFFSET) 38

4k GENERATION ON OQPSK SIGNAL 39

41 GENERATION OF MSK WAVEFORM 40

4m OUTPUT WAVEFORM OF MSK SIGNAL 41

x

5a LASER WARNING LABEL 42

6a SIMPLE BLOCK DIAGRAM RS131 LASER COMMUNICATION SYSTEM 43

6b BLOCK DIAGRAM OF RS131 LASER TRANSCEIVER 44

6c SCHEMATIC OF TRANSCEIVER 45

6d PCB LAYOUT 46

6e DB9JUMPERING 48

7a THE HEADER FILE 54

7b THESETI1NG 55

7c BIOSCOM EXAMPLE 56

7d BIOS_SERIALCOM EXAMPLE 57

XI

CHAPTERt

WIRELESS COMMUNICATION AN OVERVIEW

to An Introduction

A communication occurs when there was an infonnation flow The word

telecommunication is derive from the Greek tele far of and communicare to share

[1] The communication is the process of transferring interpreting and processing

infonnation (data) among the people machines and place This process implies that we

need a sender a medium and a receiver to perform infonnation flow Therefore the

telecommunication is the process of exchanging the data of information in any useable

fonn in any natural delivery among two or more user by using radio wire and light and

other mechanical means

1t Wireless Network

Consider a cellular telephone system that provided coverage in a geographical

area as figure ta shown

To provide wireless communication within a region a Radio Base Station (RBS) must be

set up The Radio Base Station will perfonn the function as access point to the mobile

user and a connection with Mobile Switching Center A mobile user connected to base

station through Common Air Interface which can also called Handshaking ProtocoL [2]

The Radio Base Station will connect to mobile Switching Center through landline The

mobile switching center will provide connectivity to Public Switch Telephone Network

The PSTN Switching Center will provide connectivity to global network

The basic concept of a wireless network was to establishing the mobile user to a base

station followed by connection with mobile switch center and from mobile center

connected to global network

1

Mobile SWltchlna Center(MSC) or

Mobile Telephone SWItohlna omce Voice and Data link

(Landline or ~microwave)

Q ~ ~P-

PSTN

regRadio Link air interface

Figure la The Block Diagram of a Typical Wireless Network [ 2 ]

PSTN network and mobile network will connect by either fix-line or radio wave For the

fixmiddotline It will be twisted copper cable coaxial cable fiber optics cable For the radio

wave it either use microwave and satellite link The characteristic of a PSTN network is

the user was fix at one location while the mobile network allowed the user to move

within the coverage area The process of moving within the coverage area called

Roaming

12 Fundamental of a Wireless Intemet System

To accessing the internet a cellular user need to use a PCMCIA card with the adapter to

connected to laptop in the area where PSTN line was not accessible For example the

product of Celcom Data2Go for wireless data communication can have the following

function shy

e Electronic mail system

e Sending and receiving fax

2

bull Accessing Company database

bull Submit customer order

bull On-line information service

bull accessing Internet-surfing into Netscape

bull terminal mode- billinwregistration

The network ofData2Go by Celcomtradeas shown shy

Figure Ib Celcomtrade Data2Go Network 14 I

Software uses for this type ofnetwork are

bull Delrina WinFaxPro

bull Microsoft Mail

bull Netscape

bull Lotus Notes

13 The purpose of this paper

The main purpose of this project is to develop a useable technique that suitable for

sending data wireless via RS232 communication port The system component will consist

of a desktop computer that act as input device a standard RS232 interface a transceiver

for transmit and receive signal and a modify laser poniter The suggested system will be

3

set and tested in a point-to-point configuration As the figure show below the network

diagram stated shy

J -~HJj----tcooo ~ IEco~codl---=RS=232=--_~ Personal computer Signal RS232 Laser Transceiver RS2321aser Transceiver Personal computer

Figure lc The Simples point to point data communication via RS131laser transceiver

4

Cbapter2

RS-232 INTERFACE AND SERIAL COMMUNICATION

20 Overview

RS 232 Interface in a simple universal well knows data interface RS means

Recommended Standard1 The female connector attaches to Data Communication

Equipment and male connector attaches to Data Terminal Equipment Mostly today PCs

are equipped with two RS232 ports via COMI or COM2 The additional COM port

COM3 and COM4 required additional card

RS-232 defines 25-pin communication line Every line has their own function to

accessing data The configurations ofevery pin layout are show in figure 2a

Normally The ground signal refers to pin 7 Two computers can communicate by using a

null modem A null modem is a special made direct cable and connector It is functioning

like a modem but has limited transmission range Figure 2b illustrated the common

method to wiring a null modem Pin2 and pin3 are wire together and all the cables are

connect in such a way a modem simulated between two computers

The electrical characteristic define by RS232 as

(a) Total capacitance not less than 2500 pF

(b) (b) A binary high logic output lines is + 5to + 15 volts input lines is from +3

to + 15 volts

(c) A binary low logic output lines is from -5 to -15 volts input lines is from -3

to -15 volts

(d) output lines voltages -5 and +5 -3 and +3 volts for input lines are undefined

5

Shelld~ Secondary

tntnsmltted data Transmlttins

Signal element timlne (DCEoTE)

Secondary

Relcetver received data

Signal tlmlne(DCEoTE) Looak

Loopok Secondary

Request To8end

DTERudy

Rem_ Loopb8ok amp Signal Qua

Decmlctor RinS indicator

l reg

Transmitted Data

Request to Send

DCEReady

Rivedline 818nal Detector

Reserved (Testing)

Secondary Received Lne Signel Detector

Recetve Data

reg

Crto8ent

Signal Ground Comman RetUrn

reg Rrved (Testing)

Datas18nal

I 10

rate ct UnusedTnulSmitter signal Signed

element -f

timing (DTE-DCE) bull Tnt Mode 8eooundary~ 13 c

To8ent~

Figure 2a The RS232 pin configuration [81

Pin Number Line Line Pin Number

2 m m 2

3 RD RD 3

4 RTS RTS 4

5 CTS CTS 5

6 DSR---- DSR 6

7 Common 7

8 DCD DCD 8

20 DTR DTR 20

22 R1 R1 22

Figure 2b A Null Modem Configuration [8]

6

21 The Explanation For RS1Jl Pin Abbreviation

Hence is the detail ofeach line in DB9 and DB25 function

Clear to Send (CTS)

Data Carrier Detect (OCR)

Data Set Ready (DSR)

Data Terminal Ready (DTR)

Receive Data (RO)

Ring Indicator (RI)

Requested to Send (RTS)

Transmit Data (TD)

asserted (logic state 1) by DCE it is ready to receive data

logic state 1 whenever there is data link in progress

logic state 1 when DCE is ready to communicated withDTE

logic state 1 when DTE is ready to communicated withDCE

use by DCE to send data to DTE

logic 1 by DCE when a ring is detect

logic state 1 by DTE when it want to transmit data toDCE

Use by DTE to send data to DCE

Figure lc The Detail Explanation of Abbreviation [ 8]

22 UART

UART Universal Asynchronous Receiver Transmitter is a special hardware in RS232

serial interface It sometime called as Asynchronous Communication Element

Most of the new personal computer today is equip with 16450 and 16550 UART The

function ofUART chip is to convert the parallel data to a serial data format that enable a

serial communication between two computers The UART chip also uses to convert back

7

the serial bits to parallel bits format The operation of UART mostly control by one or

more register The process of read writes data to register are through input and output

ports Figure ld showing the address of a UART for COMI and COM4

The UART have FIFO or First in First out buffer FIFO bring the meaning as the first

data to enter the buffer are first to leave The function of buffer is to hold data temporary

before it was feed to the transmission medium The modem 16550A UART have16 bytes

FIFO This means 16 bytes can be writes to UART before anything was overwrite The

16550 UART was necessary for a high-speed communication under windows or

application running under window environment

Serial port Base Register Port Address

COM 1 3F8H COM2 2F8H COM3 3E8H COM3 2E8H

Figure ld The Serial Port Base Register Port [7 ]

23 Serial Communication

Serial communication is transmission of data over a serial interface one data bit at a time

In other word data are transfer through and forth over a single wire Therefore serial

communication is more cost effective than parallel communication RS232 is an example

for serial communication interface

24 Parallel Interface

Parallel communication is a way to sending more than one data at a time (normally eight

data bits) over to a parallel device or a Com Port For an example a computer will send

eight data bits of information to a parallel printer A very simple diagram of parallel

communication was present as Figure 2e The parallel interfaces require separated wire

8

------_------------__shyp

for sending separated data and therefor allowed faster and efficient data transmission On

the other hand to setting up a parallel communication network will be more costly than

serial communication network

1 Printer Interface

1 3 4 5 6 7 8

1 Computer Interface

2 3 4 5 6 7 8

Figure 2e A parallel Printer to Computer Interface [7 ]

25 Asynchronous and synchronous data

For two devices to communicate a way of synchronizing data must be set There are two

way ofdata formatting by using either asynchronous or synchronous

The synchronous operation is such a way that for each line data transmit it has a

separated clock to synchronous that data on a time of period For example data are

transfer once in each direction to and from the computer The synchronous data format

was show in figure 2f

While the asynchronous data is such a way that data are synchronous without clock

Each time the data are transmitting the receiver need to figure out how fast the data is

running The frame of asynchronous data has start and stops bit In another world the

frame always added with additional start and stop bit The asynchronous data format was

show in figure 2g

9

01100011100 o 1 1 1 11 0 0 0 0 001 0110 1 1 0

Unique Code

Continuous Block

Direction offlow

Figure 2f Synchronous data format I 8 ]

Start Stop d7 d6 d5 d4 d3 d2 dl dO Start

1 0 1 0 1 1 0 0I 1 I IMSB LSB

Start bit Stop bit1 Data-bits 1 I

r space mark mark space mark space mark mark space space

Serial Communication

Figure 2g Asynchronous Data Format Adopted form [8]

26 The Start Parity and Stop bits

For two machines to communicate to each other first thing both machines must agree on

the rate of speed for data transfer Second thing is the data must fonnatted for

synchronous or asynchronous operation Therefor for asynchronous operation the data

fonnatted in such a way that contains start and stop bit

271 Start bit

10

The TD line at interface device (Pin3) will go high when no data been transmit To start

transmit a data Transmit serial device will set TD line to low by means ofa start bit The

synchronous operation of DCE is waiting the TD line sign change from high bit to low

bit than DCE pauses half of a bit time and start sampling the incoming data until all the

character has been completely transmit To maintain synchronimtion DCE always

sampling the incoming data string at middle ofeach bit

272 Data bits

The data bits are the bits that contain character Nonnallyone character contains eight

bits Hence is the data bits showing character Amiddot 4tH

l start bit 41----shy Data bits j

shy

I t I Io 0 0 0 0 0

1 1deg1 1

Figure 2h The Data bits Format ( 7 ]

273 Parity bits

Four basic fonns ofparity bits are NONE EVEN ODD MARK and SPACE NONE use

for transmits a character without parity bit EVEN parity use to indicate by send logic 1

after a character if there is an odd number of logic 1 bit after a character data bit

Otherwise logic for EVEN parity goes to zero Odd parity will indicate by sending logic

1 after a data of a character bits if there is an even number of logic 1 after a characters

data bits Otherwise logic for ODD parity goes to zero Mark is logic 1 parity bit after a

data character and SPACE is logic zero after the data character

11

274 Stop bits

The stop bit indicated the end of a character The serial device was always send logic 1

for stop bit

28 Data Transmit and Receive Process

281 Transmit of a character

Several steps take before characters are transmitting from processor to modem

For an example communication between processor and 8251A USART

First the processor configures UART according to the communication protocol

Second an instruction was send to UART and set the flag TxEN Next The processor

was send the character to the data buffer ofUART Then this data buffer transfer the

character to transmit buffer for preparation for transmission Once data buffer was

complete transfer the character and ready to receive a new character the TXRDY flag

will set When processor automatically write in data buffer TXRDY flag automatically

reset

Next RTS (Ready to Send)pin output pin ofUART will alerted by modem that the bits

are about to transmit RTS pin for UART is tie together with modem RTS pin while the

modem realizes about to receive character from UART CTS pin will activated Then the

character was automatically transfer to modem The internal flag TxEMPTY will set

once the character was completely transmit from UART to modem

282 Receive of a character

The process of data receiving was also take several sequence First processor configures

UART according to standard protocol Then to receive a character the processor sends a

12

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf
Page 4: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

ABSTRAK

Adalah menjadi satu masalah untuk mencapai maklumat di kawasan yang terpencil

Pembangunan rangkaian untuk kawasan tersebut biasanya bennasalah disebabkan beberapa

faktor Pertama kawasan tersebut adalah jauh dari rangkaian yang sediaada Kedua faktor

geographi kos pelaburan kos operasi serta pulangan yang rendah tidak menggalakan

syarikat telekomunikasi melabur di kawasan tersebut Ketiga tenaga mahir diperlukan kos

buruh mungkin tinggi Keempat lesen dari pihak berkuasa tempatan mungkin diperlukan

Kertas ini akan membincangkan satu pendekatan yang membolehkan individu berkomunikasi

secara tanpa wayar dengan menggunakan standard RS232 dan cabaya Laser sebagai

pembawa maklumat Perbincangan kertas ini merangkumi asas-asas rangkaian

telekommunikasi piawaian RS232 kaedah pemodulatan tanpa wayar analisa perisian dan

litar sistem tersebut Cadangan kertas ini ialah menggunakan RS232 Tranceiver yang

kedapatan dari Electronics Australia bertarikh October 1999 muka surat 56-61

IV

ABSTRACT

Is always a problem to access the data at a remote area The implementation on wireless

network for remote area is difficult due to certain reason First The places was isolated and

far from existing telecommunication access point Second the geographical factor high

investment cost of operation and maintenance low return will made a telecommunication

firm reluctant to put their investment in such area Third a highly skill personnel is need and

labour cost could be higher Forth the license from the authority concern might be required

Therefore this paper was to discuss a solution that allowed individual to communicate via

RS232 port using Laser light as communication medium This topics will cover the

fundamental of telecommunication network standard RS232 interface standard wireless

modulation technique Laser fundamental hardware and software analysis This paper is

designing to use RS232 Laser transceiver adapted from Electronics Australia dated Oct 1997

pg56-61

v

TABLE OF CONTENTS

Contents Pages

iiDEDICATION

ACKNOWLEDGEMENT iii

ABSTRAK iv

ABSTRACT v

TABLE OF CONTENTS vi

LIST OF ILLUSTRATION ix

Chapter 1 Wireless Communication An Overview

10 An Introduction 1 11 Wireless Network 1 12 Fundamental ofa Wireless Internet System 2 13 The Purpose of This Paper 2

CbapterZ RSZ3Z Interface amp Serial Communication

20 Overview 5 21 RS232 Pin Abbreviation 6 22 DART 7 23 Serial Communication 8 24 Parallel Communication 8 25 Asynchronous amp Synchronous Data 9 26 The Start Data Parity and Stop bit 10

261 Start bit 11 262 Data bits 11 263 Parity bits 11 264 Stop bit 12

27 Data Transmit amp Receive Process 12 281 Transmit ofa character 12 282 Receive ofa character 13

28 COM Port Setting 14

VI

Chapter 3 Laser as a Communication Medium

30 Fundamental of light 15 31 What is Laser 17 32 Characteristic ofa Laser Beam 19 33 Type ofLaser 20

331 Semiconductor Laser 20 332 Gas Lasers 20 333 Solid State Laser Nd YAG Laser 21

34 Light Modulation Scheme 22 35 Several Optical Modulation Techniques 25

351 Analog modulation 25 352 Pulse Modulation Technique 27

Chapter 4 Modulation Technique for Wireless System

40 Why Need Modulation 29 41 Amplitude Modulation 29 42 Frequency Modulation-AMPS 30 43 Generation ofFrequency Modula 31 44 Digital Modulation Technique 32 45 Frequency Shift Keying 32 46 Phase Shift Keying 35 47 Quadrature Phase Shift Keying 36 48 Offset Quadrature Phase Shift Keying 37 49 Minimum Shift Keying 39

Chapter 5 Laser Safety

50 Laser Beam Hazard 41 51 Safety Precaution amp Control Procedure 41 52 Class ofLaser 42

Chapter 6 System Design

60 Basic Overview 43 61 System Design 44 62 The Block Diagram 44 63 Function For Each Block 45 64 The Construction 45 65 Construction PCB 47 66 Observation 47 67 Testing

VII

p

Chapter 7 Software Analysis

70 Software Overview 50 71 Include Header File 53 72 Define The Setting 54 73 The Other Function 54 74 The Other Testing Program 55

ChapterS Conclusion

80 The Conclusion 58 81 The Future Work 58

APPENDIX A 60

REFERENCE 61

vm

LIST OF ILLUSTRATION

Figure Page

18 THE BLOCK DIAGRAM OF TYPICAL NETWORK 2

Ib CELCOMtrade DATA2GONETWORK

Ie SIMPLEST POINT-TO-POINT DATA COMMUNICATION VIA

2

RS232 LASER TRANSCEIVER 4

28 THE RS232 PIN CONFIGURATION 6

2b A NULL MODEM CONFIGURATION 6

2e DETAIL EXPLANATION OF RS232 PIN ABBREVIATION 7

2d THE SERIAL PORT BASE REGISTER 8

2e A PARALLEL PRINTER TO COMPUTER CONFIGURATION 9

2f SYNCHRONOUS DATA FORMAT 10

2g ASYNCBRONOUS DATA FORMAT 10

2h THE DATA BIT FORMAT 11

2i USART BLOCK DIAGRAM 13

3a ELECTRIC AND MAGNETIC FIELD IN PLANE ELECTROMAGNETIC WAVE 16

3b ILLUSTRATION OF ENERGY DIAGRAM FOR TWO LEVEL ENERGY SYSTEM ABSORPTION STIMULATED EMISSION 19 SPONTANEOUS EMISSION

3e SPATIAL COHERENT AT FOCUSING POINT 20

IX

po

3d EXCITATION OF GASEOUS LASER MEDIUM REFLECTION 21 OF PHOTON DURING STIMULATED EMISSION EXITING PHOTON IN LASER BEAM

SIGNAL (C) INTENSITY OF LIGHT

3e SCHEMATIC DIAGRAM FOR AN END PUMPED ND YAGLASER 22

3f THE ELECTROMAGNETIC SPECTRUM 23

3g AMPLITUDE MODULATION OF OPTICAL LIGHT BEAM 24

3h NON RETURN ZERO FORMAT 24

3i RETURN TO ZERO FORMAT 24

3j USING FM MODULATION TO MODULATED INTENSITY OF tiGHT (A) MASSAGE AMPUTUDE (B) FM MODULATION 25

4a AM SIGNAL MODULATION 30

4b FM SIGNAL MODULATION 31

4c FREQUENCY MODULATION 32

4d FSKFORMAT 33

4e FORMATION OF FSK SIGNAL 34

4f NON COHERENT DEMODULATION 35

4g COHERENT DEMODULATION 35

4h PSK WAVEFORM 36

4i THE GENERATION OF QPSK SIGNAL 37

4j OQPSK WAVEFORM (HALF SYMBOL OFFSET) 38

4k GENERATION ON OQPSK SIGNAL 39

41 GENERATION OF MSK WAVEFORM 40

4m OUTPUT WAVEFORM OF MSK SIGNAL 41

x

5a LASER WARNING LABEL 42

6a SIMPLE BLOCK DIAGRAM RS131 LASER COMMUNICATION SYSTEM 43

6b BLOCK DIAGRAM OF RS131 LASER TRANSCEIVER 44

6c SCHEMATIC OF TRANSCEIVER 45

6d PCB LAYOUT 46

6e DB9JUMPERING 48

7a THE HEADER FILE 54

7b THESETI1NG 55

7c BIOSCOM EXAMPLE 56

7d BIOS_SERIALCOM EXAMPLE 57

XI

CHAPTERt

WIRELESS COMMUNICATION AN OVERVIEW

to An Introduction

A communication occurs when there was an infonnation flow The word

telecommunication is derive from the Greek tele far of and communicare to share

[1] The communication is the process of transferring interpreting and processing

infonnation (data) among the people machines and place This process implies that we

need a sender a medium and a receiver to perform infonnation flow Therefore the

telecommunication is the process of exchanging the data of information in any useable

fonn in any natural delivery among two or more user by using radio wire and light and

other mechanical means

1t Wireless Network

Consider a cellular telephone system that provided coverage in a geographical

area as figure ta shown

To provide wireless communication within a region a Radio Base Station (RBS) must be

set up The Radio Base Station will perfonn the function as access point to the mobile

user and a connection with Mobile Switching Center A mobile user connected to base

station through Common Air Interface which can also called Handshaking ProtocoL [2]

The Radio Base Station will connect to mobile Switching Center through landline The

mobile switching center will provide connectivity to Public Switch Telephone Network

The PSTN Switching Center will provide connectivity to global network

The basic concept of a wireless network was to establishing the mobile user to a base

station followed by connection with mobile switch center and from mobile center

connected to global network

1

Mobile SWltchlna Center(MSC) or

Mobile Telephone SWItohlna omce Voice and Data link

(Landline or ~microwave)

Q ~ ~P-

PSTN

regRadio Link air interface

Figure la The Block Diagram of a Typical Wireless Network [ 2 ]

PSTN network and mobile network will connect by either fix-line or radio wave For the

fixmiddotline It will be twisted copper cable coaxial cable fiber optics cable For the radio

wave it either use microwave and satellite link The characteristic of a PSTN network is

the user was fix at one location while the mobile network allowed the user to move

within the coverage area The process of moving within the coverage area called

Roaming

12 Fundamental of a Wireless Intemet System

To accessing the internet a cellular user need to use a PCMCIA card with the adapter to

connected to laptop in the area where PSTN line was not accessible For example the

product of Celcom Data2Go for wireless data communication can have the following

function shy

e Electronic mail system

e Sending and receiving fax

2

bull Accessing Company database

bull Submit customer order

bull On-line information service

bull accessing Internet-surfing into Netscape

bull terminal mode- billinwregistration

The network ofData2Go by Celcomtradeas shown shy

Figure Ib Celcomtrade Data2Go Network 14 I

Software uses for this type ofnetwork are

bull Delrina WinFaxPro

bull Microsoft Mail

bull Netscape

bull Lotus Notes

13 The purpose of this paper

The main purpose of this project is to develop a useable technique that suitable for

sending data wireless via RS232 communication port The system component will consist

of a desktop computer that act as input device a standard RS232 interface a transceiver

for transmit and receive signal and a modify laser poniter The suggested system will be

3

set and tested in a point-to-point configuration As the figure show below the network

diagram stated shy

J -~HJj----tcooo ~ IEco~codl---=RS=232=--_~ Personal computer Signal RS232 Laser Transceiver RS2321aser Transceiver Personal computer

Figure lc The Simples point to point data communication via RS131laser transceiver

4

Cbapter2

RS-232 INTERFACE AND SERIAL COMMUNICATION

20 Overview

RS 232 Interface in a simple universal well knows data interface RS means

Recommended Standard1 The female connector attaches to Data Communication

Equipment and male connector attaches to Data Terminal Equipment Mostly today PCs

are equipped with two RS232 ports via COMI or COM2 The additional COM port

COM3 and COM4 required additional card

RS-232 defines 25-pin communication line Every line has their own function to

accessing data The configurations ofevery pin layout are show in figure 2a

Normally The ground signal refers to pin 7 Two computers can communicate by using a

null modem A null modem is a special made direct cable and connector It is functioning

like a modem but has limited transmission range Figure 2b illustrated the common

method to wiring a null modem Pin2 and pin3 are wire together and all the cables are

connect in such a way a modem simulated between two computers

The electrical characteristic define by RS232 as

(a) Total capacitance not less than 2500 pF

(b) (b) A binary high logic output lines is + 5to + 15 volts input lines is from +3

to + 15 volts

(c) A binary low logic output lines is from -5 to -15 volts input lines is from -3

to -15 volts

(d) output lines voltages -5 and +5 -3 and +3 volts for input lines are undefined

5

Shelld~ Secondary

tntnsmltted data Transmlttins

Signal element timlne (DCEoTE)

Secondary

Relcetver received data

Signal tlmlne(DCEoTE) Looak

Loopok Secondary

Request To8end

DTERudy

Rem_ Loopb8ok amp Signal Qua

Decmlctor RinS indicator

l reg

Transmitted Data

Request to Send

DCEReady

Rivedline 818nal Detector

Reserved (Testing)

Secondary Received Lne Signel Detector

Recetve Data

reg

Crto8ent

Signal Ground Comman RetUrn

reg Rrved (Testing)

Datas18nal

I 10

rate ct UnusedTnulSmitter signal Signed

element -f

timing (DTE-DCE) bull Tnt Mode 8eooundary~ 13 c

To8ent~

Figure 2a The RS232 pin configuration [81

Pin Number Line Line Pin Number

2 m m 2

3 RD RD 3

4 RTS RTS 4

5 CTS CTS 5

6 DSR---- DSR 6

7 Common 7

8 DCD DCD 8

20 DTR DTR 20

22 R1 R1 22

Figure 2b A Null Modem Configuration [8]

6

21 The Explanation For RS1Jl Pin Abbreviation

Hence is the detail ofeach line in DB9 and DB25 function

Clear to Send (CTS)

Data Carrier Detect (OCR)

Data Set Ready (DSR)

Data Terminal Ready (DTR)

Receive Data (RO)

Ring Indicator (RI)

Requested to Send (RTS)

Transmit Data (TD)

asserted (logic state 1) by DCE it is ready to receive data

logic state 1 whenever there is data link in progress

logic state 1 when DCE is ready to communicated withDTE

logic state 1 when DTE is ready to communicated withDCE

use by DCE to send data to DTE

logic 1 by DCE when a ring is detect

logic state 1 by DTE when it want to transmit data toDCE

Use by DTE to send data to DCE

Figure lc The Detail Explanation of Abbreviation [ 8]

22 UART

UART Universal Asynchronous Receiver Transmitter is a special hardware in RS232

serial interface It sometime called as Asynchronous Communication Element

Most of the new personal computer today is equip with 16450 and 16550 UART The

function ofUART chip is to convert the parallel data to a serial data format that enable a

serial communication between two computers The UART chip also uses to convert back

7

the serial bits to parallel bits format The operation of UART mostly control by one or

more register The process of read writes data to register are through input and output

ports Figure ld showing the address of a UART for COMI and COM4

The UART have FIFO or First in First out buffer FIFO bring the meaning as the first

data to enter the buffer are first to leave The function of buffer is to hold data temporary

before it was feed to the transmission medium The modem 16550A UART have16 bytes

FIFO This means 16 bytes can be writes to UART before anything was overwrite The

16550 UART was necessary for a high-speed communication under windows or

application running under window environment

Serial port Base Register Port Address

COM 1 3F8H COM2 2F8H COM3 3E8H COM3 2E8H

Figure ld The Serial Port Base Register Port [7 ]

23 Serial Communication

Serial communication is transmission of data over a serial interface one data bit at a time

In other word data are transfer through and forth over a single wire Therefore serial

communication is more cost effective than parallel communication RS232 is an example

for serial communication interface

24 Parallel Interface

Parallel communication is a way to sending more than one data at a time (normally eight

data bits) over to a parallel device or a Com Port For an example a computer will send

eight data bits of information to a parallel printer A very simple diagram of parallel

communication was present as Figure 2e The parallel interfaces require separated wire

8

------_------------__shyp

for sending separated data and therefor allowed faster and efficient data transmission On

the other hand to setting up a parallel communication network will be more costly than

serial communication network

1 Printer Interface

1 3 4 5 6 7 8

1 Computer Interface

2 3 4 5 6 7 8

Figure 2e A parallel Printer to Computer Interface [7 ]

25 Asynchronous and synchronous data

For two devices to communicate a way of synchronizing data must be set There are two

way ofdata formatting by using either asynchronous or synchronous

The synchronous operation is such a way that for each line data transmit it has a

separated clock to synchronous that data on a time of period For example data are

transfer once in each direction to and from the computer The synchronous data format

was show in figure 2f

While the asynchronous data is such a way that data are synchronous without clock

Each time the data are transmitting the receiver need to figure out how fast the data is

running The frame of asynchronous data has start and stops bit In another world the

frame always added with additional start and stop bit The asynchronous data format was

show in figure 2g

9

01100011100 o 1 1 1 11 0 0 0 0 001 0110 1 1 0

Unique Code

Continuous Block

Direction offlow

Figure 2f Synchronous data format I 8 ]

Start Stop d7 d6 d5 d4 d3 d2 dl dO Start

1 0 1 0 1 1 0 0I 1 I IMSB LSB

Start bit Stop bit1 Data-bits 1 I

r space mark mark space mark space mark mark space space

Serial Communication

Figure 2g Asynchronous Data Format Adopted form [8]

26 The Start Parity and Stop bits

For two machines to communicate to each other first thing both machines must agree on

the rate of speed for data transfer Second thing is the data must fonnatted for

synchronous or asynchronous operation Therefor for asynchronous operation the data

fonnatted in such a way that contains start and stop bit

271 Start bit

10

The TD line at interface device (Pin3) will go high when no data been transmit To start

transmit a data Transmit serial device will set TD line to low by means ofa start bit The

synchronous operation of DCE is waiting the TD line sign change from high bit to low

bit than DCE pauses half of a bit time and start sampling the incoming data until all the

character has been completely transmit To maintain synchronimtion DCE always

sampling the incoming data string at middle ofeach bit

272 Data bits

The data bits are the bits that contain character Nonnallyone character contains eight

bits Hence is the data bits showing character Amiddot 4tH

l start bit 41----shy Data bits j

shy

I t I Io 0 0 0 0 0

1 1deg1 1

Figure 2h The Data bits Format ( 7 ]

273 Parity bits

Four basic fonns ofparity bits are NONE EVEN ODD MARK and SPACE NONE use

for transmits a character without parity bit EVEN parity use to indicate by send logic 1

after a character if there is an odd number of logic 1 bit after a character data bit

Otherwise logic for EVEN parity goes to zero Odd parity will indicate by sending logic

1 after a data of a character bits if there is an even number of logic 1 after a characters

data bits Otherwise logic for ODD parity goes to zero Mark is logic 1 parity bit after a

data character and SPACE is logic zero after the data character

11

274 Stop bits

The stop bit indicated the end of a character The serial device was always send logic 1

for stop bit

28 Data Transmit and Receive Process

281 Transmit of a character

Several steps take before characters are transmitting from processor to modem

For an example communication between processor and 8251A USART

First the processor configures UART according to the communication protocol

Second an instruction was send to UART and set the flag TxEN Next The processor

was send the character to the data buffer ofUART Then this data buffer transfer the

character to transmit buffer for preparation for transmission Once data buffer was

complete transfer the character and ready to receive a new character the TXRDY flag

will set When processor automatically write in data buffer TXRDY flag automatically

reset

Next RTS (Ready to Send)pin output pin ofUART will alerted by modem that the bits

are about to transmit RTS pin for UART is tie together with modem RTS pin while the

modem realizes about to receive character from UART CTS pin will activated Then the

character was automatically transfer to modem The internal flag TxEMPTY will set

once the character was completely transmit from UART to modem

282 Receive of a character

The process of data receiving was also take several sequence First processor configures

UART according to standard protocol Then to receive a character the processor sends a

12

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf
Page 5: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

ABSTRACT

Is always a problem to access the data at a remote area The implementation on wireless

network for remote area is difficult due to certain reason First The places was isolated and

far from existing telecommunication access point Second the geographical factor high

investment cost of operation and maintenance low return will made a telecommunication

firm reluctant to put their investment in such area Third a highly skill personnel is need and

labour cost could be higher Forth the license from the authority concern might be required

Therefore this paper was to discuss a solution that allowed individual to communicate via

RS232 port using Laser light as communication medium This topics will cover the

fundamental of telecommunication network standard RS232 interface standard wireless

modulation technique Laser fundamental hardware and software analysis This paper is

designing to use RS232 Laser transceiver adapted from Electronics Australia dated Oct 1997

pg56-61

v

TABLE OF CONTENTS

Contents Pages

iiDEDICATION

ACKNOWLEDGEMENT iii

ABSTRAK iv

ABSTRACT v

TABLE OF CONTENTS vi

LIST OF ILLUSTRATION ix

Chapter 1 Wireless Communication An Overview

10 An Introduction 1 11 Wireless Network 1 12 Fundamental ofa Wireless Internet System 2 13 The Purpose of This Paper 2

CbapterZ RSZ3Z Interface amp Serial Communication

20 Overview 5 21 RS232 Pin Abbreviation 6 22 DART 7 23 Serial Communication 8 24 Parallel Communication 8 25 Asynchronous amp Synchronous Data 9 26 The Start Data Parity and Stop bit 10

261 Start bit 11 262 Data bits 11 263 Parity bits 11 264 Stop bit 12

27 Data Transmit amp Receive Process 12 281 Transmit ofa character 12 282 Receive ofa character 13

28 COM Port Setting 14

VI

Chapter 3 Laser as a Communication Medium

30 Fundamental of light 15 31 What is Laser 17 32 Characteristic ofa Laser Beam 19 33 Type ofLaser 20

331 Semiconductor Laser 20 332 Gas Lasers 20 333 Solid State Laser Nd YAG Laser 21

34 Light Modulation Scheme 22 35 Several Optical Modulation Techniques 25

351 Analog modulation 25 352 Pulse Modulation Technique 27

Chapter 4 Modulation Technique for Wireless System

40 Why Need Modulation 29 41 Amplitude Modulation 29 42 Frequency Modulation-AMPS 30 43 Generation ofFrequency Modula 31 44 Digital Modulation Technique 32 45 Frequency Shift Keying 32 46 Phase Shift Keying 35 47 Quadrature Phase Shift Keying 36 48 Offset Quadrature Phase Shift Keying 37 49 Minimum Shift Keying 39

Chapter 5 Laser Safety

50 Laser Beam Hazard 41 51 Safety Precaution amp Control Procedure 41 52 Class ofLaser 42

Chapter 6 System Design

60 Basic Overview 43 61 System Design 44 62 The Block Diagram 44 63 Function For Each Block 45 64 The Construction 45 65 Construction PCB 47 66 Observation 47 67 Testing

VII

p

Chapter 7 Software Analysis

70 Software Overview 50 71 Include Header File 53 72 Define The Setting 54 73 The Other Function 54 74 The Other Testing Program 55

ChapterS Conclusion

80 The Conclusion 58 81 The Future Work 58

APPENDIX A 60

REFERENCE 61

vm

LIST OF ILLUSTRATION

Figure Page

18 THE BLOCK DIAGRAM OF TYPICAL NETWORK 2

Ib CELCOMtrade DATA2GONETWORK

Ie SIMPLEST POINT-TO-POINT DATA COMMUNICATION VIA

2

RS232 LASER TRANSCEIVER 4

28 THE RS232 PIN CONFIGURATION 6

2b A NULL MODEM CONFIGURATION 6

2e DETAIL EXPLANATION OF RS232 PIN ABBREVIATION 7

2d THE SERIAL PORT BASE REGISTER 8

2e A PARALLEL PRINTER TO COMPUTER CONFIGURATION 9

2f SYNCHRONOUS DATA FORMAT 10

2g ASYNCBRONOUS DATA FORMAT 10

2h THE DATA BIT FORMAT 11

2i USART BLOCK DIAGRAM 13

3a ELECTRIC AND MAGNETIC FIELD IN PLANE ELECTROMAGNETIC WAVE 16

3b ILLUSTRATION OF ENERGY DIAGRAM FOR TWO LEVEL ENERGY SYSTEM ABSORPTION STIMULATED EMISSION 19 SPONTANEOUS EMISSION

3e SPATIAL COHERENT AT FOCUSING POINT 20

IX

po

3d EXCITATION OF GASEOUS LASER MEDIUM REFLECTION 21 OF PHOTON DURING STIMULATED EMISSION EXITING PHOTON IN LASER BEAM

SIGNAL (C) INTENSITY OF LIGHT

3e SCHEMATIC DIAGRAM FOR AN END PUMPED ND YAGLASER 22

3f THE ELECTROMAGNETIC SPECTRUM 23

3g AMPLITUDE MODULATION OF OPTICAL LIGHT BEAM 24

3h NON RETURN ZERO FORMAT 24

3i RETURN TO ZERO FORMAT 24

3j USING FM MODULATION TO MODULATED INTENSITY OF tiGHT (A) MASSAGE AMPUTUDE (B) FM MODULATION 25

4a AM SIGNAL MODULATION 30

4b FM SIGNAL MODULATION 31

4c FREQUENCY MODULATION 32

4d FSKFORMAT 33

4e FORMATION OF FSK SIGNAL 34

4f NON COHERENT DEMODULATION 35

4g COHERENT DEMODULATION 35

4h PSK WAVEFORM 36

4i THE GENERATION OF QPSK SIGNAL 37

4j OQPSK WAVEFORM (HALF SYMBOL OFFSET) 38

4k GENERATION ON OQPSK SIGNAL 39

41 GENERATION OF MSK WAVEFORM 40

4m OUTPUT WAVEFORM OF MSK SIGNAL 41

x

5a LASER WARNING LABEL 42

6a SIMPLE BLOCK DIAGRAM RS131 LASER COMMUNICATION SYSTEM 43

6b BLOCK DIAGRAM OF RS131 LASER TRANSCEIVER 44

6c SCHEMATIC OF TRANSCEIVER 45

6d PCB LAYOUT 46

6e DB9JUMPERING 48

7a THE HEADER FILE 54

7b THESETI1NG 55

7c BIOSCOM EXAMPLE 56

7d BIOS_SERIALCOM EXAMPLE 57

XI

CHAPTERt

WIRELESS COMMUNICATION AN OVERVIEW

to An Introduction

A communication occurs when there was an infonnation flow The word

telecommunication is derive from the Greek tele far of and communicare to share

[1] The communication is the process of transferring interpreting and processing

infonnation (data) among the people machines and place This process implies that we

need a sender a medium and a receiver to perform infonnation flow Therefore the

telecommunication is the process of exchanging the data of information in any useable

fonn in any natural delivery among two or more user by using radio wire and light and

other mechanical means

1t Wireless Network

Consider a cellular telephone system that provided coverage in a geographical

area as figure ta shown

To provide wireless communication within a region a Radio Base Station (RBS) must be

set up The Radio Base Station will perfonn the function as access point to the mobile

user and a connection with Mobile Switching Center A mobile user connected to base

station through Common Air Interface which can also called Handshaking ProtocoL [2]

The Radio Base Station will connect to mobile Switching Center through landline The

mobile switching center will provide connectivity to Public Switch Telephone Network

The PSTN Switching Center will provide connectivity to global network

The basic concept of a wireless network was to establishing the mobile user to a base

station followed by connection with mobile switch center and from mobile center

connected to global network

1

Mobile SWltchlna Center(MSC) or

Mobile Telephone SWItohlna omce Voice and Data link

(Landline or ~microwave)

Q ~ ~P-

PSTN

regRadio Link air interface

Figure la The Block Diagram of a Typical Wireless Network [ 2 ]

PSTN network and mobile network will connect by either fix-line or radio wave For the

fixmiddotline It will be twisted copper cable coaxial cable fiber optics cable For the radio

wave it either use microwave and satellite link The characteristic of a PSTN network is

the user was fix at one location while the mobile network allowed the user to move

within the coverage area The process of moving within the coverage area called

Roaming

12 Fundamental of a Wireless Intemet System

To accessing the internet a cellular user need to use a PCMCIA card with the adapter to

connected to laptop in the area where PSTN line was not accessible For example the

product of Celcom Data2Go for wireless data communication can have the following

function shy

e Electronic mail system

e Sending and receiving fax

2

bull Accessing Company database

bull Submit customer order

bull On-line information service

bull accessing Internet-surfing into Netscape

bull terminal mode- billinwregistration

The network ofData2Go by Celcomtradeas shown shy

Figure Ib Celcomtrade Data2Go Network 14 I

Software uses for this type ofnetwork are

bull Delrina WinFaxPro

bull Microsoft Mail

bull Netscape

bull Lotus Notes

13 The purpose of this paper

The main purpose of this project is to develop a useable technique that suitable for

sending data wireless via RS232 communication port The system component will consist

of a desktop computer that act as input device a standard RS232 interface a transceiver

for transmit and receive signal and a modify laser poniter The suggested system will be

3

set and tested in a point-to-point configuration As the figure show below the network

diagram stated shy

J -~HJj----tcooo ~ IEco~codl---=RS=232=--_~ Personal computer Signal RS232 Laser Transceiver RS2321aser Transceiver Personal computer

Figure lc The Simples point to point data communication via RS131laser transceiver

4

Cbapter2

RS-232 INTERFACE AND SERIAL COMMUNICATION

20 Overview

RS 232 Interface in a simple universal well knows data interface RS means

Recommended Standard1 The female connector attaches to Data Communication

Equipment and male connector attaches to Data Terminal Equipment Mostly today PCs

are equipped with two RS232 ports via COMI or COM2 The additional COM port

COM3 and COM4 required additional card

RS-232 defines 25-pin communication line Every line has their own function to

accessing data The configurations ofevery pin layout are show in figure 2a

Normally The ground signal refers to pin 7 Two computers can communicate by using a

null modem A null modem is a special made direct cable and connector It is functioning

like a modem but has limited transmission range Figure 2b illustrated the common

method to wiring a null modem Pin2 and pin3 are wire together and all the cables are

connect in such a way a modem simulated between two computers

The electrical characteristic define by RS232 as

(a) Total capacitance not less than 2500 pF

(b) (b) A binary high logic output lines is + 5to + 15 volts input lines is from +3

to + 15 volts

(c) A binary low logic output lines is from -5 to -15 volts input lines is from -3

to -15 volts

(d) output lines voltages -5 and +5 -3 and +3 volts for input lines are undefined

5

Shelld~ Secondary

tntnsmltted data Transmlttins

Signal element timlne (DCEoTE)

Secondary

Relcetver received data

Signal tlmlne(DCEoTE) Looak

Loopok Secondary

Request To8end

DTERudy

Rem_ Loopb8ok amp Signal Qua

Decmlctor RinS indicator

l reg

Transmitted Data

Request to Send

DCEReady

Rivedline 818nal Detector

Reserved (Testing)

Secondary Received Lne Signel Detector

Recetve Data

reg

Crto8ent

Signal Ground Comman RetUrn

reg Rrved (Testing)

Datas18nal

I 10

rate ct UnusedTnulSmitter signal Signed

element -f

timing (DTE-DCE) bull Tnt Mode 8eooundary~ 13 c

To8ent~

Figure 2a The RS232 pin configuration [81

Pin Number Line Line Pin Number

2 m m 2

3 RD RD 3

4 RTS RTS 4

5 CTS CTS 5

6 DSR---- DSR 6

7 Common 7

8 DCD DCD 8

20 DTR DTR 20

22 R1 R1 22

Figure 2b A Null Modem Configuration [8]

6

21 The Explanation For RS1Jl Pin Abbreviation

Hence is the detail ofeach line in DB9 and DB25 function

Clear to Send (CTS)

Data Carrier Detect (OCR)

Data Set Ready (DSR)

Data Terminal Ready (DTR)

Receive Data (RO)

Ring Indicator (RI)

Requested to Send (RTS)

Transmit Data (TD)

asserted (logic state 1) by DCE it is ready to receive data

logic state 1 whenever there is data link in progress

logic state 1 when DCE is ready to communicated withDTE

logic state 1 when DTE is ready to communicated withDCE

use by DCE to send data to DTE

logic 1 by DCE when a ring is detect

logic state 1 by DTE when it want to transmit data toDCE

Use by DTE to send data to DCE

Figure lc The Detail Explanation of Abbreviation [ 8]

22 UART

UART Universal Asynchronous Receiver Transmitter is a special hardware in RS232

serial interface It sometime called as Asynchronous Communication Element

Most of the new personal computer today is equip with 16450 and 16550 UART The

function ofUART chip is to convert the parallel data to a serial data format that enable a

serial communication between two computers The UART chip also uses to convert back

7

the serial bits to parallel bits format The operation of UART mostly control by one or

more register The process of read writes data to register are through input and output

ports Figure ld showing the address of a UART for COMI and COM4

The UART have FIFO or First in First out buffer FIFO bring the meaning as the first

data to enter the buffer are first to leave The function of buffer is to hold data temporary

before it was feed to the transmission medium The modem 16550A UART have16 bytes

FIFO This means 16 bytes can be writes to UART before anything was overwrite The

16550 UART was necessary for a high-speed communication under windows or

application running under window environment

Serial port Base Register Port Address

COM 1 3F8H COM2 2F8H COM3 3E8H COM3 2E8H

Figure ld The Serial Port Base Register Port [7 ]

23 Serial Communication

Serial communication is transmission of data over a serial interface one data bit at a time

In other word data are transfer through and forth over a single wire Therefore serial

communication is more cost effective than parallel communication RS232 is an example

for serial communication interface

24 Parallel Interface

Parallel communication is a way to sending more than one data at a time (normally eight

data bits) over to a parallel device or a Com Port For an example a computer will send

eight data bits of information to a parallel printer A very simple diagram of parallel

communication was present as Figure 2e The parallel interfaces require separated wire

8

------_------------__shyp

for sending separated data and therefor allowed faster and efficient data transmission On

the other hand to setting up a parallel communication network will be more costly than

serial communication network

1 Printer Interface

1 3 4 5 6 7 8

1 Computer Interface

2 3 4 5 6 7 8

Figure 2e A parallel Printer to Computer Interface [7 ]

25 Asynchronous and synchronous data

For two devices to communicate a way of synchronizing data must be set There are two

way ofdata formatting by using either asynchronous or synchronous

The synchronous operation is such a way that for each line data transmit it has a

separated clock to synchronous that data on a time of period For example data are

transfer once in each direction to and from the computer The synchronous data format

was show in figure 2f

While the asynchronous data is such a way that data are synchronous without clock

Each time the data are transmitting the receiver need to figure out how fast the data is

running The frame of asynchronous data has start and stops bit In another world the

frame always added with additional start and stop bit The asynchronous data format was

show in figure 2g

9

01100011100 o 1 1 1 11 0 0 0 0 001 0110 1 1 0

Unique Code

Continuous Block

Direction offlow

Figure 2f Synchronous data format I 8 ]

Start Stop d7 d6 d5 d4 d3 d2 dl dO Start

1 0 1 0 1 1 0 0I 1 I IMSB LSB

Start bit Stop bit1 Data-bits 1 I

r space mark mark space mark space mark mark space space

Serial Communication

Figure 2g Asynchronous Data Format Adopted form [8]

26 The Start Parity and Stop bits

For two machines to communicate to each other first thing both machines must agree on

the rate of speed for data transfer Second thing is the data must fonnatted for

synchronous or asynchronous operation Therefor for asynchronous operation the data

fonnatted in such a way that contains start and stop bit

271 Start bit

10

The TD line at interface device (Pin3) will go high when no data been transmit To start

transmit a data Transmit serial device will set TD line to low by means ofa start bit The

synchronous operation of DCE is waiting the TD line sign change from high bit to low

bit than DCE pauses half of a bit time and start sampling the incoming data until all the

character has been completely transmit To maintain synchronimtion DCE always

sampling the incoming data string at middle ofeach bit

272 Data bits

The data bits are the bits that contain character Nonnallyone character contains eight

bits Hence is the data bits showing character Amiddot 4tH

l start bit 41----shy Data bits j

shy

I t I Io 0 0 0 0 0

1 1deg1 1

Figure 2h The Data bits Format ( 7 ]

273 Parity bits

Four basic fonns ofparity bits are NONE EVEN ODD MARK and SPACE NONE use

for transmits a character without parity bit EVEN parity use to indicate by send logic 1

after a character if there is an odd number of logic 1 bit after a character data bit

Otherwise logic for EVEN parity goes to zero Odd parity will indicate by sending logic

1 after a data of a character bits if there is an even number of logic 1 after a characters

data bits Otherwise logic for ODD parity goes to zero Mark is logic 1 parity bit after a

data character and SPACE is logic zero after the data character

11

274 Stop bits

The stop bit indicated the end of a character The serial device was always send logic 1

for stop bit

28 Data Transmit and Receive Process

281 Transmit of a character

Several steps take before characters are transmitting from processor to modem

For an example communication between processor and 8251A USART

First the processor configures UART according to the communication protocol

Second an instruction was send to UART and set the flag TxEN Next The processor

was send the character to the data buffer ofUART Then this data buffer transfer the

character to transmit buffer for preparation for transmission Once data buffer was

complete transfer the character and ready to receive a new character the TXRDY flag

will set When processor automatically write in data buffer TXRDY flag automatically

reset

Next RTS (Ready to Send)pin output pin ofUART will alerted by modem that the bits

are about to transmit RTS pin for UART is tie together with modem RTS pin while the

modem realizes about to receive character from UART CTS pin will activated Then the

character was automatically transfer to modem The internal flag TxEMPTY will set

once the character was completely transmit from UART to modem

282 Receive of a character

The process of data receiving was also take several sequence First processor configures

UART according to standard protocol Then to receive a character the processor sends a

12

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf
Page 6: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

TABLE OF CONTENTS

Contents Pages

iiDEDICATION

ACKNOWLEDGEMENT iii

ABSTRAK iv

ABSTRACT v

TABLE OF CONTENTS vi

LIST OF ILLUSTRATION ix

Chapter 1 Wireless Communication An Overview

10 An Introduction 1 11 Wireless Network 1 12 Fundamental ofa Wireless Internet System 2 13 The Purpose of This Paper 2

CbapterZ RSZ3Z Interface amp Serial Communication

20 Overview 5 21 RS232 Pin Abbreviation 6 22 DART 7 23 Serial Communication 8 24 Parallel Communication 8 25 Asynchronous amp Synchronous Data 9 26 The Start Data Parity and Stop bit 10

261 Start bit 11 262 Data bits 11 263 Parity bits 11 264 Stop bit 12

27 Data Transmit amp Receive Process 12 281 Transmit ofa character 12 282 Receive ofa character 13

28 COM Port Setting 14

VI

Chapter 3 Laser as a Communication Medium

30 Fundamental of light 15 31 What is Laser 17 32 Characteristic ofa Laser Beam 19 33 Type ofLaser 20

331 Semiconductor Laser 20 332 Gas Lasers 20 333 Solid State Laser Nd YAG Laser 21

34 Light Modulation Scheme 22 35 Several Optical Modulation Techniques 25

351 Analog modulation 25 352 Pulse Modulation Technique 27

Chapter 4 Modulation Technique for Wireless System

40 Why Need Modulation 29 41 Amplitude Modulation 29 42 Frequency Modulation-AMPS 30 43 Generation ofFrequency Modula 31 44 Digital Modulation Technique 32 45 Frequency Shift Keying 32 46 Phase Shift Keying 35 47 Quadrature Phase Shift Keying 36 48 Offset Quadrature Phase Shift Keying 37 49 Minimum Shift Keying 39

Chapter 5 Laser Safety

50 Laser Beam Hazard 41 51 Safety Precaution amp Control Procedure 41 52 Class ofLaser 42

Chapter 6 System Design

60 Basic Overview 43 61 System Design 44 62 The Block Diagram 44 63 Function For Each Block 45 64 The Construction 45 65 Construction PCB 47 66 Observation 47 67 Testing

VII

p

Chapter 7 Software Analysis

70 Software Overview 50 71 Include Header File 53 72 Define The Setting 54 73 The Other Function 54 74 The Other Testing Program 55

ChapterS Conclusion

80 The Conclusion 58 81 The Future Work 58

APPENDIX A 60

REFERENCE 61

vm

LIST OF ILLUSTRATION

Figure Page

18 THE BLOCK DIAGRAM OF TYPICAL NETWORK 2

Ib CELCOMtrade DATA2GONETWORK

Ie SIMPLEST POINT-TO-POINT DATA COMMUNICATION VIA

2

RS232 LASER TRANSCEIVER 4

28 THE RS232 PIN CONFIGURATION 6

2b A NULL MODEM CONFIGURATION 6

2e DETAIL EXPLANATION OF RS232 PIN ABBREVIATION 7

2d THE SERIAL PORT BASE REGISTER 8

2e A PARALLEL PRINTER TO COMPUTER CONFIGURATION 9

2f SYNCHRONOUS DATA FORMAT 10

2g ASYNCBRONOUS DATA FORMAT 10

2h THE DATA BIT FORMAT 11

2i USART BLOCK DIAGRAM 13

3a ELECTRIC AND MAGNETIC FIELD IN PLANE ELECTROMAGNETIC WAVE 16

3b ILLUSTRATION OF ENERGY DIAGRAM FOR TWO LEVEL ENERGY SYSTEM ABSORPTION STIMULATED EMISSION 19 SPONTANEOUS EMISSION

3e SPATIAL COHERENT AT FOCUSING POINT 20

IX

po

3d EXCITATION OF GASEOUS LASER MEDIUM REFLECTION 21 OF PHOTON DURING STIMULATED EMISSION EXITING PHOTON IN LASER BEAM

SIGNAL (C) INTENSITY OF LIGHT

3e SCHEMATIC DIAGRAM FOR AN END PUMPED ND YAGLASER 22

3f THE ELECTROMAGNETIC SPECTRUM 23

3g AMPLITUDE MODULATION OF OPTICAL LIGHT BEAM 24

3h NON RETURN ZERO FORMAT 24

3i RETURN TO ZERO FORMAT 24

3j USING FM MODULATION TO MODULATED INTENSITY OF tiGHT (A) MASSAGE AMPUTUDE (B) FM MODULATION 25

4a AM SIGNAL MODULATION 30

4b FM SIGNAL MODULATION 31

4c FREQUENCY MODULATION 32

4d FSKFORMAT 33

4e FORMATION OF FSK SIGNAL 34

4f NON COHERENT DEMODULATION 35

4g COHERENT DEMODULATION 35

4h PSK WAVEFORM 36

4i THE GENERATION OF QPSK SIGNAL 37

4j OQPSK WAVEFORM (HALF SYMBOL OFFSET) 38

4k GENERATION ON OQPSK SIGNAL 39

41 GENERATION OF MSK WAVEFORM 40

4m OUTPUT WAVEFORM OF MSK SIGNAL 41

x

5a LASER WARNING LABEL 42

6a SIMPLE BLOCK DIAGRAM RS131 LASER COMMUNICATION SYSTEM 43

6b BLOCK DIAGRAM OF RS131 LASER TRANSCEIVER 44

6c SCHEMATIC OF TRANSCEIVER 45

6d PCB LAYOUT 46

6e DB9JUMPERING 48

7a THE HEADER FILE 54

7b THESETI1NG 55

7c BIOSCOM EXAMPLE 56

7d BIOS_SERIALCOM EXAMPLE 57

XI

CHAPTERt

WIRELESS COMMUNICATION AN OVERVIEW

to An Introduction

A communication occurs when there was an infonnation flow The word

telecommunication is derive from the Greek tele far of and communicare to share

[1] The communication is the process of transferring interpreting and processing

infonnation (data) among the people machines and place This process implies that we

need a sender a medium and a receiver to perform infonnation flow Therefore the

telecommunication is the process of exchanging the data of information in any useable

fonn in any natural delivery among two or more user by using radio wire and light and

other mechanical means

1t Wireless Network

Consider a cellular telephone system that provided coverage in a geographical

area as figure ta shown

To provide wireless communication within a region a Radio Base Station (RBS) must be

set up The Radio Base Station will perfonn the function as access point to the mobile

user and a connection with Mobile Switching Center A mobile user connected to base

station through Common Air Interface which can also called Handshaking ProtocoL [2]

The Radio Base Station will connect to mobile Switching Center through landline The

mobile switching center will provide connectivity to Public Switch Telephone Network

The PSTN Switching Center will provide connectivity to global network

The basic concept of a wireless network was to establishing the mobile user to a base

station followed by connection with mobile switch center and from mobile center

connected to global network

1

Mobile SWltchlna Center(MSC) or

Mobile Telephone SWItohlna omce Voice and Data link

(Landline or ~microwave)

Q ~ ~P-

PSTN

regRadio Link air interface

Figure la The Block Diagram of a Typical Wireless Network [ 2 ]

PSTN network and mobile network will connect by either fix-line or radio wave For the

fixmiddotline It will be twisted copper cable coaxial cable fiber optics cable For the radio

wave it either use microwave and satellite link The characteristic of a PSTN network is

the user was fix at one location while the mobile network allowed the user to move

within the coverage area The process of moving within the coverage area called

Roaming

12 Fundamental of a Wireless Intemet System

To accessing the internet a cellular user need to use a PCMCIA card with the adapter to

connected to laptop in the area where PSTN line was not accessible For example the

product of Celcom Data2Go for wireless data communication can have the following

function shy

e Electronic mail system

e Sending and receiving fax

2

bull Accessing Company database

bull Submit customer order

bull On-line information service

bull accessing Internet-surfing into Netscape

bull terminal mode- billinwregistration

The network ofData2Go by Celcomtradeas shown shy

Figure Ib Celcomtrade Data2Go Network 14 I

Software uses for this type ofnetwork are

bull Delrina WinFaxPro

bull Microsoft Mail

bull Netscape

bull Lotus Notes

13 The purpose of this paper

The main purpose of this project is to develop a useable technique that suitable for

sending data wireless via RS232 communication port The system component will consist

of a desktop computer that act as input device a standard RS232 interface a transceiver

for transmit and receive signal and a modify laser poniter The suggested system will be

3

set and tested in a point-to-point configuration As the figure show below the network

diagram stated shy

J -~HJj----tcooo ~ IEco~codl---=RS=232=--_~ Personal computer Signal RS232 Laser Transceiver RS2321aser Transceiver Personal computer

Figure lc The Simples point to point data communication via RS131laser transceiver

4

Cbapter2

RS-232 INTERFACE AND SERIAL COMMUNICATION

20 Overview

RS 232 Interface in a simple universal well knows data interface RS means

Recommended Standard1 The female connector attaches to Data Communication

Equipment and male connector attaches to Data Terminal Equipment Mostly today PCs

are equipped with two RS232 ports via COMI or COM2 The additional COM port

COM3 and COM4 required additional card

RS-232 defines 25-pin communication line Every line has their own function to

accessing data The configurations ofevery pin layout are show in figure 2a

Normally The ground signal refers to pin 7 Two computers can communicate by using a

null modem A null modem is a special made direct cable and connector It is functioning

like a modem but has limited transmission range Figure 2b illustrated the common

method to wiring a null modem Pin2 and pin3 are wire together and all the cables are

connect in such a way a modem simulated between two computers

The electrical characteristic define by RS232 as

(a) Total capacitance not less than 2500 pF

(b) (b) A binary high logic output lines is + 5to + 15 volts input lines is from +3

to + 15 volts

(c) A binary low logic output lines is from -5 to -15 volts input lines is from -3

to -15 volts

(d) output lines voltages -5 and +5 -3 and +3 volts for input lines are undefined

5

Shelld~ Secondary

tntnsmltted data Transmlttins

Signal element timlne (DCEoTE)

Secondary

Relcetver received data

Signal tlmlne(DCEoTE) Looak

Loopok Secondary

Request To8end

DTERudy

Rem_ Loopb8ok amp Signal Qua

Decmlctor RinS indicator

l reg

Transmitted Data

Request to Send

DCEReady

Rivedline 818nal Detector

Reserved (Testing)

Secondary Received Lne Signel Detector

Recetve Data

reg

Crto8ent

Signal Ground Comman RetUrn

reg Rrved (Testing)

Datas18nal

I 10

rate ct UnusedTnulSmitter signal Signed

element -f

timing (DTE-DCE) bull Tnt Mode 8eooundary~ 13 c

To8ent~

Figure 2a The RS232 pin configuration [81

Pin Number Line Line Pin Number

2 m m 2

3 RD RD 3

4 RTS RTS 4

5 CTS CTS 5

6 DSR---- DSR 6

7 Common 7

8 DCD DCD 8

20 DTR DTR 20

22 R1 R1 22

Figure 2b A Null Modem Configuration [8]

6

21 The Explanation For RS1Jl Pin Abbreviation

Hence is the detail ofeach line in DB9 and DB25 function

Clear to Send (CTS)

Data Carrier Detect (OCR)

Data Set Ready (DSR)

Data Terminal Ready (DTR)

Receive Data (RO)

Ring Indicator (RI)

Requested to Send (RTS)

Transmit Data (TD)

asserted (logic state 1) by DCE it is ready to receive data

logic state 1 whenever there is data link in progress

logic state 1 when DCE is ready to communicated withDTE

logic state 1 when DTE is ready to communicated withDCE

use by DCE to send data to DTE

logic 1 by DCE when a ring is detect

logic state 1 by DTE when it want to transmit data toDCE

Use by DTE to send data to DCE

Figure lc The Detail Explanation of Abbreviation [ 8]

22 UART

UART Universal Asynchronous Receiver Transmitter is a special hardware in RS232

serial interface It sometime called as Asynchronous Communication Element

Most of the new personal computer today is equip with 16450 and 16550 UART The

function ofUART chip is to convert the parallel data to a serial data format that enable a

serial communication between two computers The UART chip also uses to convert back

7

the serial bits to parallel bits format The operation of UART mostly control by one or

more register The process of read writes data to register are through input and output

ports Figure ld showing the address of a UART for COMI and COM4

The UART have FIFO or First in First out buffer FIFO bring the meaning as the first

data to enter the buffer are first to leave The function of buffer is to hold data temporary

before it was feed to the transmission medium The modem 16550A UART have16 bytes

FIFO This means 16 bytes can be writes to UART before anything was overwrite The

16550 UART was necessary for a high-speed communication under windows or

application running under window environment

Serial port Base Register Port Address

COM 1 3F8H COM2 2F8H COM3 3E8H COM3 2E8H

Figure ld The Serial Port Base Register Port [7 ]

23 Serial Communication

Serial communication is transmission of data over a serial interface one data bit at a time

In other word data are transfer through and forth over a single wire Therefore serial

communication is more cost effective than parallel communication RS232 is an example

for serial communication interface

24 Parallel Interface

Parallel communication is a way to sending more than one data at a time (normally eight

data bits) over to a parallel device or a Com Port For an example a computer will send

eight data bits of information to a parallel printer A very simple diagram of parallel

communication was present as Figure 2e The parallel interfaces require separated wire

8

------_------------__shyp

for sending separated data and therefor allowed faster and efficient data transmission On

the other hand to setting up a parallel communication network will be more costly than

serial communication network

1 Printer Interface

1 3 4 5 6 7 8

1 Computer Interface

2 3 4 5 6 7 8

Figure 2e A parallel Printer to Computer Interface [7 ]

25 Asynchronous and synchronous data

For two devices to communicate a way of synchronizing data must be set There are two

way ofdata formatting by using either asynchronous or synchronous

The synchronous operation is such a way that for each line data transmit it has a

separated clock to synchronous that data on a time of period For example data are

transfer once in each direction to and from the computer The synchronous data format

was show in figure 2f

While the asynchronous data is such a way that data are synchronous without clock

Each time the data are transmitting the receiver need to figure out how fast the data is

running The frame of asynchronous data has start and stops bit In another world the

frame always added with additional start and stop bit The asynchronous data format was

show in figure 2g

9

01100011100 o 1 1 1 11 0 0 0 0 001 0110 1 1 0

Unique Code

Continuous Block

Direction offlow

Figure 2f Synchronous data format I 8 ]

Start Stop d7 d6 d5 d4 d3 d2 dl dO Start

1 0 1 0 1 1 0 0I 1 I IMSB LSB

Start bit Stop bit1 Data-bits 1 I

r space mark mark space mark space mark mark space space

Serial Communication

Figure 2g Asynchronous Data Format Adopted form [8]

26 The Start Parity and Stop bits

For two machines to communicate to each other first thing both machines must agree on

the rate of speed for data transfer Second thing is the data must fonnatted for

synchronous or asynchronous operation Therefor for asynchronous operation the data

fonnatted in such a way that contains start and stop bit

271 Start bit

10

The TD line at interface device (Pin3) will go high when no data been transmit To start

transmit a data Transmit serial device will set TD line to low by means ofa start bit The

synchronous operation of DCE is waiting the TD line sign change from high bit to low

bit than DCE pauses half of a bit time and start sampling the incoming data until all the

character has been completely transmit To maintain synchronimtion DCE always

sampling the incoming data string at middle ofeach bit

272 Data bits

The data bits are the bits that contain character Nonnallyone character contains eight

bits Hence is the data bits showing character Amiddot 4tH

l start bit 41----shy Data bits j

shy

I t I Io 0 0 0 0 0

1 1deg1 1

Figure 2h The Data bits Format ( 7 ]

273 Parity bits

Four basic fonns ofparity bits are NONE EVEN ODD MARK and SPACE NONE use

for transmits a character without parity bit EVEN parity use to indicate by send logic 1

after a character if there is an odd number of logic 1 bit after a character data bit

Otherwise logic for EVEN parity goes to zero Odd parity will indicate by sending logic

1 after a data of a character bits if there is an even number of logic 1 after a characters

data bits Otherwise logic for ODD parity goes to zero Mark is logic 1 parity bit after a

data character and SPACE is logic zero after the data character

11

274 Stop bits

The stop bit indicated the end of a character The serial device was always send logic 1

for stop bit

28 Data Transmit and Receive Process

281 Transmit of a character

Several steps take before characters are transmitting from processor to modem

For an example communication between processor and 8251A USART

First the processor configures UART according to the communication protocol

Second an instruction was send to UART and set the flag TxEN Next The processor

was send the character to the data buffer ofUART Then this data buffer transfer the

character to transmit buffer for preparation for transmission Once data buffer was

complete transfer the character and ready to receive a new character the TXRDY flag

will set When processor automatically write in data buffer TXRDY flag automatically

reset

Next RTS (Ready to Send)pin output pin ofUART will alerted by modem that the bits

are about to transmit RTS pin for UART is tie together with modem RTS pin while the

modem realizes about to receive character from UART CTS pin will activated Then the

character was automatically transfer to modem The internal flag TxEMPTY will set

once the character was completely transmit from UART to modem

282 Receive of a character

The process of data receiving was also take several sequence First processor configures

UART according to standard protocol Then to receive a character the processor sends a

12

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf
Page 7: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

Chapter 3 Laser as a Communication Medium

30 Fundamental of light 15 31 What is Laser 17 32 Characteristic ofa Laser Beam 19 33 Type ofLaser 20

331 Semiconductor Laser 20 332 Gas Lasers 20 333 Solid State Laser Nd YAG Laser 21

34 Light Modulation Scheme 22 35 Several Optical Modulation Techniques 25

351 Analog modulation 25 352 Pulse Modulation Technique 27

Chapter 4 Modulation Technique for Wireless System

40 Why Need Modulation 29 41 Amplitude Modulation 29 42 Frequency Modulation-AMPS 30 43 Generation ofFrequency Modula 31 44 Digital Modulation Technique 32 45 Frequency Shift Keying 32 46 Phase Shift Keying 35 47 Quadrature Phase Shift Keying 36 48 Offset Quadrature Phase Shift Keying 37 49 Minimum Shift Keying 39

Chapter 5 Laser Safety

50 Laser Beam Hazard 41 51 Safety Precaution amp Control Procedure 41 52 Class ofLaser 42

Chapter 6 System Design

60 Basic Overview 43 61 System Design 44 62 The Block Diagram 44 63 Function For Each Block 45 64 The Construction 45 65 Construction PCB 47 66 Observation 47 67 Testing

VII

p

Chapter 7 Software Analysis

70 Software Overview 50 71 Include Header File 53 72 Define The Setting 54 73 The Other Function 54 74 The Other Testing Program 55

ChapterS Conclusion

80 The Conclusion 58 81 The Future Work 58

APPENDIX A 60

REFERENCE 61

vm

LIST OF ILLUSTRATION

Figure Page

18 THE BLOCK DIAGRAM OF TYPICAL NETWORK 2

Ib CELCOMtrade DATA2GONETWORK

Ie SIMPLEST POINT-TO-POINT DATA COMMUNICATION VIA

2

RS232 LASER TRANSCEIVER 4

28 THE RS232 PIN CONFIGURATION 6

2b A NULL MODEM CONFIGURATION 6

2e DETAIL EXPLANATION OF RS232 PIN ABBREVIATION 7

2d THE SERIAL PORT BASE REGISTER 8

2e A PARALLEL PRINTER TO COMPUTER CONFIGURATION 9

2f SYNCHRONOUS DATA FORMAT 10

2g ASYNCBRONOUS DATA FORMAT 10

2h THE DATA BIT FORMAT 11

2i USART BLOCK DIAGRAM 13

3a ELECTRIC AND MAGNETIC FIELD IN PLANE ELECTROMAGNETIC WAVE 16

3b ILLUSTRATION OF ENERGY DIAGRAM FOR TWO LEVEL ENERGY SYSTEM ABSORPTION STIMULATED EMISSION 19 SPONTANEOUS EMISSION

3e SPATIAL COHERENT AT FOCUSING POINT 20

IX

po

3d EXCITATION OF GASEOUS LASER MEDIUM REFLECTION 21 OF PHOTON DURING STIMULATED EMISSION EXITING PHOTON IN LASER BEAM

SIGNAL (C) INTENSITY OF LIGHT

3e SCHEMATIC DIAGRAM FOR AN END PUMPED ND YAGLASER 22

3f THE ELECTROMAGNETIC SPECTRUM 23

3g AMPLITUDE MODULATION OF OPTICAL LIGHT BEAM 24

3h NON RETURN ZERO FORMAT 24

3i RETURN TO ZERO FORMAT 24

3j USING FM MODULATION TO MODULATED INTENSITY OF tiGHT (A) MASSAGE AMPUTUDE (B) FM MODULATION 25

4a AM SIGNAL MODULATION 30

4b FM SIGNAL MODULATION 31

4c FREQUENCY MODULATION 32

4d FSKFORMAT 33

4e FORMATION OF FSK SIGNAL 34

4f NON COHERENT DEMODULATION 35

4g COHERENT DEMODULATION 35

4h PSK WAVEFORM 36

4i THE GENERATION OF QPSK SIGNAL 37

4j OQPSK WAVEFORM (HALF SYMBOL OFFSET) 38

4k GENERATION ON OQPSK SIGNAL 39

41 GENERATION OF MSK WAVEFORM 40

4m OUTPUT WAVEFORM OF MSK SIGNAL 41

x

5a LASER WARNING LABEL 42

6a SIMPLE BLOCK DIAGRAM RS131 LASER COMMUNICATION SYSTEM 43

6b BLOCK DIAGRAM OF RS131 LASER TRANSCEIVER 44

6c SCHEMATIC OF TRANSCEIVER 45

6d PCB LAYOUT 46

6e DB9JUMPERING 48

7a THE HEADER FILE 54

7b THESETI1NG 55

7c BIOSCOM EXAMPLE 56

7d BIOS_SERIALCOM EXAMPLE 57

XI

CHAPTERt

WIRELESS COMMUNICATION AN OVERVIEW

to An Introduction

A communication occurs when there was an infonnation flow The word

telecommunication is derive from the Greek tele far of and communicare to share

[1] The communication is the process of transferring interpreting and processing

infonnation (data) among the people machines and place This process implies that we

need a sender a medium and a receiver to perform infonnation flow Therefore the

telecommunication is the process of exchanging the data of information in any useable

fonn in any natural delivery among two or more user by using radio wire and light and

other mechanical means

1t Wireless Network

Consider a cellular telephone system that provided coverage in a geographical

area as figure ta shown

To provide wireless communication within a region a Radio Base Station (RBS) must be

set up The Radio Base Station will perfonn the function as access point to the mobile

user and a connection with Mobile Switching Center A mobile user connected to base

station through Common Air Interface which can also called Handshaking ProtocoL [2]

The Radio Base Station will connect to mobile Switching Center through landline The

mobile switching center will provide connectivity to Public Switch Telephone Network

The PSTN Switching Center will provide connectivity to global network

The basic concept of a wireless network was to establishing the mobile user to a base

station followed by connection with mobile switch center and from mobile center

connected to global network

1

Mobile SWltchlna Center(MSC) or

Mobile Telephone SWItohlna omce Voice and Data link

(Landline or ~microwave)

Q ~ ~P-

PSTN

regRadio Link air interface

Figure la The Block Diagram of a Typical Wireless Network [ 2 ]

PSTN network and mobile network will connect by either fix-line or radio wave For the

fixmiddotline It will be twisted copper cable coaxial cable fiber optics cable For the radio

wave it either use microwave and satellite link The characteristic of a PSTN network is

the user was fix at one location while the mobile network allowed the user to move

within the coverage area The process of moving within the coverage area called

Roaming

12 Fundamental of a Wireless Intemet System

To accessing the internet a cellular user need to use a PCMCIA card with the adapter to

connected to laptop in the area where PSTN line was not accessible For example the

product of Celcom Data2Go for wireless data communication can have the following

function shy

e Electronic mail system

e Sending and receiving fax

2

bull Accessing Company database

bull Submit customer order

bull On-line information service

bull accessing Internet-surfing into Netscape

bull terminal mode- billinwregistration

The network ofData2Go by Celcomtradeas shown shy

Figure Ib Celcomtrade Data2Go Network 14 I

Software uses for this type ofnetwork are

bull Delrina WinFaxPro

bull Microsoft Mail

bull Netscape

bull Lotus Notes

13 The purpose of this paper

The main purpose of this project is to develop a useable technique that suitable for

sending data wireless via RS232 communication port The system component will consist

of a desktop computer that act as input device a standard RS232 interface a transceiver

for transmit and receive signal and a modify laser poniter The suggested system will be

3

set and tested in a point-to-point configuration As the figure show below the network

diagram stated shy

J -~HJj----tcooo ~ IEco~codl---=RS=232=--_~ Personal computer Signal RS232 Laser Transceiver RS2321aser Transceiver Personal computer

Figure lc The Simples point to point data communication via RS131laser transceiver

4

Cbapter2

RS-232 INTERFACE AND SERIAL COMMUNICATION

20 Overview

RS 232 Interface in a simple universal well knows data interface RS means

Recommended Standard1 The female connector attaches to Data Communication

Equipment and male connector attaches to Data Terminal Equipment Mostly today PCs

are equipped with two RS232 ports via COMI or COM2 The additional COM port

COM3 and COM4 required additional card

RS-232 defines 25-pin communication line Every line has their own function to

accessing data The configurations ofevery pin layout are show in figure 2a

Normally The ground signal refers to pin 7 Two computers can communicate by using a

null modem A null modem is a special made direct cable and connector It is functioning

like a modem but has limited transmission range Figure 2b illustrated the common

method to wiring a null modem Pin2 and pin3 are wire together and all the cables are

connect in such a way a modem simulated between two computers

The electrical characteristic define by RS232 as

(a) Total capacitance not less than 2500 pF

(b) (b) A binary high logic output lines is + 5to + 15 volts input lines is from +3

to + 15 volts

(c) A binary low logic output lines is from -5 to -15 volts input lines is from -3

to -15 volts

(d) output lines voltages -5 and +5 -3 and +3 volts for input lines are undefined

5

Shelld~ Secondary

tntnsmltted data Transmlttins

Signal element timlne (DCEoTE)

Secondary

Relcetver received data

Signal tlmlne(DCEoTE) Looak

Loopok Secondary

Request To8end

DTERudy

Rem_ Loopb8ok amp Signal Qua

Decmlctor RinS indicator

l reg

Transmitted Data

Request to Send

DCEReady

Rivedline 818nal Detector

Reserved (Testing)

Secondary Received Lne Signel Detector

Recetve Data

reg

Crto8ent

Signal Ground Comman RetUrn

reg Rrved (Testing)

Datas18nal

I 10

rate ct UnusedTnulSmitter signal Signed

element -f

timing (DTE-DCE) bull Tnt Mode 8eooundary~ 13 c

To8ent~

Figure 2a The RS232 pin configuration [81

Pin Number Line Line Pin Number

2 m m 2

3 RD RD 3

4 RTS RTS 4

5 CTS CTS 5

6 DSR---- DSR 6

7 Common 7

8 DCD DCD 8

20 DTR DTR 20

22 R1 R1 22

Figure 2b A Null Modem Configuration [8]

6

21 The Explanation For RS1Jl Pin Abbreviation

Hence is the detail ofeach line in DB9 and DB25 function

Clear to Send (CTS)

Data Carrier Detect (OCR)

Data Set Ready (DSR)

Data Terminal Ready (DTR)

Receive Data (RO)

Ring Indicator (RI)

Requested to Send (RTS)

Transmit Data (TD)

asserted (logic state 1) by DCE it is ready to receive data

logic state 1 whenever there is data link in progress

logic state 1 when DCE is ready to communicated withDTE

logic state 1 when DTE is ready to communicated withDCE

use by DCE to send data to DTE

logic 1 by DCE when a ring is detect

logic state 1 by DTE when it want to transmit data toDCE

Use by DTE to send data to DCE

Figure lc The Detail Explanation of Abbreviation [ 8]

22 UART

UART Universal Asynchronous Receiver Transmitter is a special hardware in RS232

serial interface It sometime called as Asynchronous Communication Element

Most of the new personal computer today is equip with 16450 and 16550 UART The

function ofUART chip is to convert the parallel data to a serial data format that enable a

serial communication between two computers The UART chip also uses to convert back

7

the serial bits to parallel bits format The operation of UART mostly control by one or

more register The process of read writes data to register are through input and output

ports Figure ld showing the address of a UART for COMI and COM4

The UART have FIFO or First in First out buffer FIFO bring the meaning as the first

data to enter the buffer are first to leave The function of buffer is to hold data temporary

before it was feed to the transmission medium The modem 16550A UART have16 bytes

FIFO This means 16 bytes can be writes to UART before anything was overwrite The

16550 UART was necessary for a high-speed communication under windows or

application running under window environment

Serial port Base Register Port Address

COM 1 3F8H COM2 2F8H COM3 3E8H COM3 2E8H

Figure ld The Serial Port Base Register Port [7 ]

23 Serial Communication

Serial communication is transmission of data over a serial interface one data bit at a time

In other word data are transfer through and forth over a single wire Therefore serial

communication is more cost effective than parallel communication RS232 is an example

for serial communication interface

24 Parallel Interface

Parallel communication is a way to sending more than one data at a time (normally eight

data bits) over to a parallel device or a Com Port For an example a computer will send

eight data bits of information to a parallel printer A very simple diagram of parallel

communication was present as Figure 2e The parallel interfaces require separated wire

8

------_------------__shyp

for sending separated data and therefor allowed faster and efficient data transmission On

the other hand to setting up a parallel communication network will be more costly than

serial communication network

1 Printer Interface

1 3 4 5 6 7 8

1 Computer Interface

2 3 4 5 6 7 8

Figure 2e A parallel Printer to Computer Interface [7 ]

25 Asynchronous and synchronous data

For two devices to communicate a way of synchronizing data must be set There are two

way ofdata formatting by using either asynchronous or synchronous

The synchronous operation is such a way that for each line data transmit it has a

separated clock to synchronous that data on a time of period For example data are

transfer once in each direction to and from the computer The synchronous data format

was show in figure 2f

While the asynchronous data is such a way that data are synchronous without clock

Each time the data are transmitting the receiver need to figure out how fast the data is

running The frame of asynchronous data has start and stops bit In another world the

frame always added with additional start and stop bit The asynchronous data format was

show in figure 2g

9

01100011100 o 1 1 1 11 0 0 0 0 001 0110 1 1 0

Unique Code

Continuous Block

Direction offlow

Figure 2f Synchronous data format I 8 ]

Start Stop d7 d6 d5 d4 d3 d2 dl dO Start

1 0 1 0 1 1 0 0I 1 I IMSB LSB

Start bit Stop bit1 Data-bits 1 I

r space mark mark space mark space mark mark space space

Serial Communication

Figure 2g Asynchronous Data Format Adopted form [8]

26 The Start Parity and Stop bits

For two machines to communicate to each other first thing both machines must agree on

the rate of speed for data transfer Second thing is the data must fonnatted for

synchronous or asynchronous operation Therefor for asynchronous operation the data

fonnatted in such a way that contains start and stop bit

271 Start bit

10

The TD line at interface device (Pin3) will go high when no data been transmit To start

transmit a data Transmit serial device will set TD line to low by means ofa start bit The

synchronous operation of DCE is waiting the TD line sign change from high bit to low

bit than DCE pauses half of a bit time and start sampling the incoming data until all the

character has been completely transmit To maintain synchronimtion DCE always

sampling the incoming data string at middle ofeach bit

272 Data bits

The data bits are the bits that contain character Nonnallyone character contains eight

bits Hence is the data bits showing character Amiddot 4tH

l start bit 41----shy Data bits j

shy

I t I Io 0 0 0 0 0

1 1deg1 1

Figure 2h The Data bits Format ( 7 ]

273 Parity bits

Four basic fonns ofparity bits are NONE EVEN ODD MARK and SPACE NONE use

for transmits a character without parity bit EVEN parity use to indicate by send logic 1

after a character if there is an odd number of logic 1 bit after a character data bit

Otherwise logic for EVEN parity goes to zero Odd parity will indicate by sending logic

1 after a data of a character bits if there is an even number of logic 1 after a characters

data bits Otherwise logic for ODD parity goes to zero Mark is logic 1 parity bit after a

data character and SPACE is logic zero after the data character

11

274 Stop bits

The stop bit indicated the end of a character The serial device was always send logic 1

for stop bit

28 Data Transmit and Receive Process

281 Transmit of a character

Several steps take before characters are transmitting from processor to modem

For an example communication between processor and 8251A USART

First the processor configures UART according to the communication protocol

Second an instruction was send to UART and set the flag TxEN Next The processor

was send the character to the data buffer ofUART Then this data buffer transfer the

character to transmit buffer for preparation for transmission Once data buffer was

complete transfer the character and ready to receive a new character the TXRDY flag

will set When processor automatically write in data buffer TXRDY flag automatically

reset

Next RTS (Ready to Send)pin output pin ofUART will alerted by modem that the bits

are about to transmit RTS pin for UART is tie together with modem RTS pin while the

modem realizes about to receive character from UART CTS pin will activated Then the

character was automatically transfer to modem The internal flag TxEMPTY will set

once the character was completely transmit from UART to modem

282 Receive of a character

The process of data receiving was also take several sequence First processor configures

UART according to standard protocol Then to receive a character the processor sends a

12

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf
Page 8: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

p

Chapter 7 Software Analysis

70 Software Overview 50 71 Include Header File 53 72 Define The Setting 54 73 The Other Function 54 74 The Other Testing Program 55

ChapterS Conclusion

80 The Conclusion 58 81 The Future Work 58

APPENDIX A 60

REFERENCE 61

vm

LIST OF ILLUSTRATION

Figure Page

18 THE BLOCK DIAGRAM OF TYPICAL NETWORK 2

Ib CELCOMtrade DATA2GONETWORK

Ie SIMPLEST POINT-TO-POINT DATA COMMUNICATION VIA

2

RS232 LASER TRANSCEIVER 4

28 THE RS232 PIN CONFIGURATION 6

2b A NULL MODEM CONFIGURATION 6

2e DETAIL EXPLANATION OF RS232 PIN ABBREVIATION 7

2d THE SERIAL PORT BASE REGISTER 8

2e A PARALLEL PRINTER TO COMPUTER CONFIGURATION 9

2f SYNCHRONOUS DATA FORMAT 10

2g ASYNCBRONOUS DATA FORMAT 10

2h THE DATA BIT FORMAT 11

2i USART BLOCK DIAGRAM 13

3a ELECTRIC AND MAGNETIC FIELD IN PLANE ELECTROMAGNETIC WAVE 16

3b ILLUSTRATION OF ENERGY DIAGRAM FOR TWO LEVEL ENERGY SYSTEM ABSORPTION STIMULATED EMISSION 19 SPONTANEOUS EMISSION

3e SPATIAL COHERENT AT FOCUSING POINT 20

IX

po

3d EXCITATION OF GASEOUS LASER MEDIUM REFLECTION 21 OF PHOTON DURING STIMULATED EMISSION EXITING PHOTON IN LASER BEAM

SIGNAL (C) INTENSITY OF LIGHT

3e SCHEMATIC DIAGRAM FOR AN END PUMPED ND YAGLASER 22

3f THE ELECTROMAGNETIC SPECTRUM 23

3g AMPLITUDE MODULATION OF OPTICAL LIGHT BEAM 24

3h NON RETURN ZERO FORMAT 24

3i RETURN TO ZERO FORMAT 24

3j USING FM MODULATION TO MODULATED INTENSITY OF tiGHT (A) MASSAGE AMPUTUDE (B) FM MODULATION 25

4a AM SIGNAL MODULATION 30

4b FM SIGNAL MODULATION 31

4c FREQUENCY MODULATION 32

4d FSKFORMAT 33

4e FORMATION OF FSK SIGNAL 34

4f NON COHERENT DEMODULATION 35

4g COHERENT DEMODULATION 35

4h PSK WAVEFORM 36

4i THE GENERATION OF QPSK SIGNAL 37

4j OQPSK WAVEFORM (HALF SYMBOL OFFSET) 38

4k GENERATION ON OQPSK SIGNAL 39

41 GENERATION OF MSK WAVEFORM 40

4m OUTPUT WAVEFORM OF MSK SIGNAL 41

x

5a LASER WARNING LABEL 42

6a SIMPLE BLOCK DIAGRAM RS131 LASER COMMUNICATION SYSTEM 43

6b BLOCK DIAGRAM OF RS131 LASER TRANSCEIVER 44

6c SCHEMATIC OF TRANSCEIVER 45

6d PCB LAYOUT 46

6e DB9JUMPERING 48

7a THE HEADER FILE 54

7b THESETI1NG 55

7c BIOSCOM EXAMPLE 56

7d BIOS_SERIALCOM EXAMPLE 57

XI

CHAPTERt

WIRELESS COMMUNICATION AN OVERVIEW

to An Introduction

A communication occurs when there was an infonnation flow The word

telecommunication is derive from the Greek tele far of and communicare to share

[1] The communication is the process of transferring interpreting and processing

infonnation (data) among the people machines and place This process implies that we

need a sender a medium and a receiver to perform infonnation flow Therefore the

telecommunication is the process of exchanging the data of information in any useable

fonn in any natural delivery among two or more user by using radio wire and light and

other mechanical means

1t Wireless Network

Consider a cellular telephone system that provided coverage in a geographical

area as figure ta shown

To provide wireless communication within a region a Radio Base Station (RBS) must be

set up The Radio Base Station will perfonn the function as access point to the mobile

user and a connection with Mobile Switching Center A mobile user connected to base

station through Common Air Interface which can also called Handshaking ProtocoL [2]

The Radio Base Station will connect to mobile Switching Center through landline The

mobile switching center will provide connectivity to Public Switch Telephone Network

The PSTN Switching Center will provide connectivity to global network

The basic concept of a wireless network was to establishing the mobile user to a base

station followed by connection with mobile switch center and from mobile center

connected to global network

1

Mobile SWltchlna Center(MSC) or

Mobile Telephone SWItohlna omce Voice and Data link

(Landline or ~microwave)

Q ~ ~P-

PSTN

regRadio Link air interface

Figure la The Block Diagram of a Typical Wireless Network [ 2 ]

PSTN network and mobile network will connect by either fix-line or radio wave For the

fixmiddotline It will be twisted copper cable coaxial cable fiber optics cable For the radio

wave it either use microwave and satellite link The characteristic of a PSTN network is

the user was fix at one location while the mobile network allowed the user to move

within the coverage area The process of moving within the coverage area called

Roaming

12 Fundamental of a Wireless Intemet System

To accessing the internet a cellular user need to use a PCMCIA card with the adapter to

connected to laptop in the area where PSTN line was not accessible For example the

product of Celcom Data2Go for wireless data communication can have the following

function shy

e Electronic mail system

e Sending and receiving fax

2

bull Accessing Company database

bull Submit customer order

bull On-line information service

bull accessing Internet-surfing into Netscape

bull terminal mode- billinwregistration

The network ofData2Go by Celcomtradeas shown shy

Figure Ib Celcomtrade Data2Go Network 14 I

Software uses for this type ofnetwork are

bull Delrina WinFaxPro

bull Microsoft Mail

bull Netscape

bull Lotus Notes

13 The purpose of this paper

The main purpose of this project is to develop a useable technique that suitable for

sending data wireless via RS232 communication port The system component will consist

of a desktop computer that act as input device a standard RS232 interface a transceiver

for transmit and receive signal and a modify laser poniter The suggested system will be

3

set and tested in a point-to-point configuration As the figure show below the network

diagram stated shy

J -~HJj----tcooo ~ IEco~codl---=RS=232=--_~ Personal computer Signal RS232 Laser Transceiver RS2321aser Transceiver Personal computer

Figure lc The Simples point to point data communication via RS131laser transceiver

4

Cbapter2

RS-232 INTERFACE AND SERIAL COMMUNICATION

20 Overview

RS 232 Interface in a simple universal well knows data interface RS means

Recommended Standard1 The female connector attaches to Data Communication

Equipment and male connector attaches to Data Terminal Equipment Mostly today PCs

are equipped with two RS232 ports via COMI or COM2 The additional COM port

COM3 and COM4 required additional card

RS-232 defines 25-pin communication line Every line has their own function to

accessing data The configurations ofevery pin layout are show in figure 2a

Normally The ground signal refers to pin 7 Two computers can communicate by using a

null modem A null modem is a special made direct cable and connector It is functioning

like a modem but has limited transmission range Figure 2b illustrated the common

method to wiring a null modem Pin2 and pin3 are wire together and all the cables are

connect in such a way a modem simulated between two computers

The electrical characteristic define by RS232 as

(a) Total capacitance not less than 2500 pF

(b) (b) A binary high logic output lines is + 5to + 15 volts input lines is from +3

to + 15 volts

(c) A binary low logic output lines is from -5 to -15 volts input lines is from -3

to -15 volts

(d) output lines voltages -5 and +5 -3 and +3 volts for input lines are undefined

5

Shelld~ Secondary

tntnsmltted data Transmlttins

Signal element timlne (DCEoTE)

Secondary

Relcetver received data

Signal tlmlne(DCEoTE) Looak

Loopok Secondary

Request To8end

DTERudy

Rem_ Loopb8ok amp Signal Qua

Decmlctor RinS indicator

l reg

Transmitted Data

Request to Send

DCEReady

Rivedline 818nal Detector

Reserved (Testing)

Secondary Received Lne Signel Detector

Recetve Data

reg

Crto8ent

Signal Ground Comman RetUrn

reg Rrved (Testing)

Datas18nal

I 10

rate ct UnusedTnulSmitter signal Signed

element -f

timing (DTE-DCE) bull Tnt Mode 8eooundary~ 13 c

To8ent~

Figure 2a The RS232 pin configuration [81

Pin Number Line Line Pin Number

2 m m 2

3 RD RD 3

4 RTS RTS 4

5 CTS CTS 5

6 DSR---- DSR 6

7 Common 7

8 DCD DCD 8

20 DTR DTR 20

22 R1 R1 22

Figure 2b A Null Modem Configuration [8]

6

21 The Explanation For RS1Jl Pin Abbreviation

Hence is the detail ofeach line in DB9 and DB25 function

Clear to Send (CTS)

Data Carrier Detect (OCR)

Data Set Ready (DSR)

Data Terminal Ready (DTR)

Receive Data (RO)

Ring Indicator (RI)

Requested to Send (RTS)

Transmit Data (TD)

asserted (logic state 1) by DCE it is ready to receive data

logic state 1 whenever there is data link in progress

logic state 1 when DCE is ready to communicated withDTE

logic state 1 when DTE is ready to communicated withDCE

use by DCE to send data to DTE

logic 1 by DCE when a ring is detect

logic state 1 by DTE when it want to transmit data toDCE

Use by DTE to send data to DCE

Figure lc The Detail Explanation of Abbreviation [ 8]

22 UART

UART Universal Asynchronous Receiver Transmitter is a special hardware in RS232

serial interface It sometime called as Asynchronous Communication Element

Most of the new personal computer today is equip with 16450 and 16550 UART The

function ofUART chip is to convert the parallel data to a serial data format that enable a

serial communication between two computers The UART chip also uses to convert back

7

the serial bits to parallel bits format The operation of UART mostly control by one or

more register The process of read writes data to register are through input and output

ports Figure ld showing the address of a UART for COMI and COM4

The UART have FIFO or First in First out buffer FIFO bring the meaning as the first

data to enter the buffer are first to leave The function of buffer is to hold data temporary

before it was feed to the transmission medium The modem 16550A UART have16 bytes

FIFO This means 16 bytes can be writes to UART before anything was overwrite The

16550 UART was necessary for a high-speed communication under windows or

application running under window environment

Serial port Base Register Port Address

COM 1 3F8H COM2 2F8H COM3 3E8H COM3 2E8H

Figure ld The Serial Port Base Register Port [7 ]

23 Serial Communication

Serial communication is transmission of data over a serial interface one data bit at a time

In other word data are transfer through and forth over a single wire Therefore serial

communication is more cost effective than parallel communication RS232 is an example

for serial communication interface

24 Parallel Interface

Parallel communication is a way to sending more than one data at a time (normally eight

data bits) over to a parallel device or a Com Port For an example a computer will send

eight data bits of information to a parallel printer A very simple diagram of parallel

communication was present as Figure 2e The parallel interfaces require separated wire

8

------_------------__shyp

for sending separated data and therefor allowed faster and efficient data transmission On

the other hand to setting up a parallel communication network will be more costly than

serial communication network

1 Printer Interface

1 3 4 5 6 7 8

1 Computer Interface

2 3 4 5 6 7 8

Figure 2e A parallel Printer to Computer Interface [7 ]

25 Asynchronous and synchronous data

For two devices to communicate a way of synchronizing data must be set There are two

way ofdata formatting by using either asynchronous or synchronous

The synchronous operation is such a way that for each line data transmit it has a

separated clock to synchronous that data on a time of period For example data are

transfer once in each direction to and from the computer The synchronous data format

was show in figure 2f

While the asynchronous data is such a way that data are synchronous without clock

Each time the data are transmitting the receiver need to figure out how fast the data is

running The frame of asynchronous data has start and stops bit In another world the

frame always added with additional start and stop bit The asynchronous data format was

show in figure 2g

9

01100011100 o 1 1 1 11 0 0 0 0 001 0110 1 1 0

Unique Code

Continuous Block

Direction offlow

Figure 2f Synchronous data format I 8 ]

Start Stop d7 d6 d5 d4 d3 d2 dl dO Start

1 0 1 0 1 1 0 0I 1 I IMSB LSB

Start bit Stop bit1 Data-bits 1 I

r space mark mark space mark space mark mark space space

Serial Communication

Figure 2g Asynchronous Data Format Adopted form [8]

26 The Start Parity and Stop bits

For two machines to communicate to each other first thing both machines must agree on

the rate of speed for data transfer Second thing is the data must fonnatted for

synchronous or asynchronous operation Therefor for asynchronous operation the data

fonnatted in such a way that contains start and stop bit

271 Start bit

10

The TD line at interface device (Pin3) will go high when no data been transmit To start

transmit a data Transmit serial device will set TD line to low by means ofa start bit The

synchronous operation of DCE is waiting the TD line sign change from high bit to low

bit than DCE pauses half of a bit time and start sampling the incoming data until all the

character has been completely transmit To maintain synchronimtion DCE always

sampling the incoming data string at middle ofeach bit

272 Data bits

The data bits are the bits that contain character Nonnallyone character contains eight

bits Hence is the data bits showing character Amiddot 4tH

l start bit 41----shy Data bits j

shy

I t I Io 0 0 0 0 0

1 1deg1 1

Figure 2h The Data bits Format ( 7 ]

273 Parity bits

Four basic fonns ofparity bits are NONE EVEN ODD MARK and SPACE NONE use

for transmits a character without parity bit EVEN parity use to indicate by send logic 1

after a character if there is an odd number of logic 1 bit after a character data bit

Otherwise logic for EVEN parity goes to zero Odd parity will indicate by sending logic

1 after a data of a character bits if there is an even number of logic 1 after a characters

data bits Otherwise logic for ODD parity goes to zero Mark is logic 1 parity bit after a

data character and SPACE is logic zero after the data character

11

274 Stop bits

The stop bit indicated the end of a character The serial device was always send logic 1

for stop bit

28 Data Transmit and Receive Process

281 Transmit of a character

Several steps take before characters are transmitting from processor to modem

For an example communication between processor and 8251A USART

First the processor configures UART according to the communication protocol

Second an instruction was send to UART and set the flag TxEN Next The processor

was send the character to the data buffer ofUART Then this data buffer transfer the

character to transmit buffer for preparation for transmission Once data buffer was

complete transfer the character and ready to receive a new character the TXRDY flag

will set When processor automatically write in data buffer TXRDY flag automatically

reset

Next RTS (Ready to Send)pin output pin ofUART will alerted by modem that the bits

are about to transmit RTS pin for UART is tie together with modem RTS pin while the

modem realizes about to receive character from UART CTS pin will activated Then the

character was automatically transfer to modem The internal flag TxEMPTY will set

once the character was completely transmit from UART to modem

282 Receive of a character

The process of data receiving was also take several sequence First processor configures

UART according to standard protocol Then to receive a character the processor sends a

12

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf
Page 9: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

LIST OF ILLUSTRATION

Figure Page

18 THE BLOCK DIAGRAM OF TYPICAL NETWORK 2

Ib CELCOMtrade DATA2GONETWORK

Ie SIMPLEST POINT-TO-POINT DATA COMMUNICATION VIA

2

RS232 LASER TRANSCEIVER 4

28 THE RS232 PIN CONFIGURATION 6

2b A NULL MODEM CONFIGURATION 6

2e DETAIL EXPLANATION OF RS232 PIN ABBREVIATION 7

2d THE SERIAL PORT BASE REGISTER 8

2e A PARALLEL PRINTER TO COMPUTER CONFIGURATION 9

2f SYNCHRONOUS DATA FORMAT 10

2g ASYNCBRONOUS DATA FORMAT 10

2h THE DATA BIT FORMAT 11

2i USART BLOCK DIAGRAM 13

3a ELECTRIC AND MAGNETIC FIELD IN PLANE ELECTROMAGNETIC WAVE 16

3b ILLUSTRATION OF ENERGY DIAGRAM FOR TWO LEVEL ENERGY SYSTEM ABSORPTION STIMULATED EMISSION 19 SPONTANEOUS EMISSION

3e SPATIAL COHERENT AT FOCUSING POINT 20

IX

po

3d EXCITATION OF GASEOUS LASER MEDIUM REFLECTION 21 OF PHOTON DURING STIMULATED EMISSION EXITING PHOTON IN LASER BEAM

SIGNAL (C) INTENSITY OF LIGHT

3e SCHEMATIC DIAGRAM FOR AN END PUMPED ND YAGLASER 22

3f THE ELECTROMAGNETIC SPECTRUM 23

3g AMPLITUDE MODULATION OF OPTICAL LIGHT BEAM 24

3h NON RETURN ZERO FORMAT 24

3i RETURN TO ZERO FORMAT 24

3j USING FM MODULATION TO MODULATED INTENSITY OF tiGHT (A) MASSAGE AMPUTUDE (B) FM MODULATION 25

4a AM SIGNAL MODULATION 30

4b FM SIGNAL MODULATION 31

4c FREQUENCY MODULATION 32

4d FSKFORMAT 33

4e FORMATION OF FSK SIGNAL 34

4f NON COHERENT DEMODULATION 35

4g COHERENT DEMODULATION 35

4h PSK WAVEFORM 36

4i THE GENERATION OF QPSK SIGNAL 37

4j OQPSK WAVEFORM (HALF SYMBOL OFFSET) 38

4k GENERATION ON OQPSK SIGNAL 39

41 GENERATION OF MSK WAVEFORM 40

4m OUTPUT WAVEFORM OF MSK SIGNAL 41

x

5a LASER WARNING LABEL 42

6a SIMPLE BLOCK DIAGRAM RS131 LASER COMMUNICATION SYSTEM 43

6b BLOCK DIAGRAM OF RS131 LASER TRANSCEIVER 44

6c SCHEMATIC OF TRANSCEIVER 45

6d PCB LAYOUT 46

6e DB9JUMPERING 48

7a THE HEADER FILE 54

7b THESETI1NG 55

7c BIOSCOM EXAMPLE 56

7d BIOS_SERIALCOM EXAMPLE 57

XI

CHAPTERt

WIRELESS COMMUNICATION AN OVERVIEW

to An Introduction

A communication occurs when there was an infonnation flow The word

telecommunication is derive from the Greek tele far of and communicare to share

[1] The communication is the process of transferring interpreting and processing

infonnation (data) among the people machines and place This process implies that we

need a sender a medium and a receiver to perform infonnation flow Therefore the

telecommunication is the process of exchanging the data of information in any useable

fonn in any natural delivery among two or more user by using radio wire and light and

other mechanical means

1t Wireless Network

Consider a cellular telephone system that provided coverage in a geographical

area as figure ta shown

To provide wireless communication within a region a Radio Base Station (RBS) must be

set up The Radio Base Station will perfonn the function as access point to the mobile

user and a connection with Mobile Switching Center A mobile user connected to base

station through Common Air Interface which can also called Handshaking ProtocoL [2]

The Radio Base Station will connect to mobile Switching Center through landline The

mobile switching center will provide connectivity to Public Switch Telephone Network

The PSTN Switching Center will provide connectivity to global network

The basic concept of a wireless network was to establishing the mobile user to a base

station followed by connection with mobile switch center and from mobile center

connected to global network

1

Mobile SWltchlna Center(MSC) or

Mobile Telephone SWItohlna omce Voice and Data link

(Landline or ~microwave)

Q ~ ~P-

PSTN

regRadio Link air interface

Figure la The Block Diagram of a Typical Wireless Network [ 2 ]

PSTN network and mobile network will connect by either fix-line or radio wave For the

fixmiddotline It will be twisted copper cable coaxial cable fiber optics cable For the radio

wave it either use microwave and satellite link The characteristic of a PSTN network is

the user was fix at one location while the mobile network allowed the user to move

within the coverage area The process of moving within the coverage area called

Roaming

12 Fundamental of a Wireless Intemet System

To accessing the internet a cellular user need to use a PCMCIA card with the adapter to

connected to laptop in the area where PSTN line was not accessible For example the

product of Celcom Data2Go for wireless data communication can have the following

function shy

e Electronic mail system

e Sending and receiving fax

2

bull Accessing Company database

bull Submit customer order

bull On-line information service

bull accessing Internet-surfing into Netscape

bull terminal mode- billinwregistration

The network ofData2Go by Celcomtradeas shown shy

Figure Ib Celcomtrade Data2Go Network 14 I

Software uses for this type ofnetwork are

bull Delrina WinFaxPro

bull Microsoft Mail

bull Netscape

bull Lotus Notes

13 The purpose of this paper

The main purpose of this project is to develop a useable technique that suitable for

sending data wireless via RS232 communication port The system component will consist

of a desktop computer that act as input device a standard RS232 interface a transceiver

for transmit and receive signal and a modify laser poniter The suggested system will be

3

set and tested in a point-to-point configuration As the figure show below the network

diagram stated shy

J -~HJj----tcooo ~ IEco~codl---=RS=232=--_~ Personal computer Signal RS232 Laser Transceiver RS2321aser Transceiver Personal computer

Figure lc The Simples point to point data communication via RS131laser transceiver

4

Cbapter2

RS-232 INTERFACE AND SERIAL COMMUNICATION

20 Overview

RS 232 Interface in a simple universal well knows data interface RS means

Recommended Standard1 The female connector attaches to Data Communication

Equipment and male connector attaches to Data Terminal Equipment Mostly today PCs

are equipped with two RS232 ports via COMI or COM2 The additional COM port

COM3 and COM4 required additional card

RS-232 defines 25-pin communication line Every line has their own function to

accessing data The configurations ofevery pin layout are show in figure 2a

Normally The ground signal refers to pin 7 Two computers can communicate by using a

null modem A null modem is a special made direct cable and connector It is functioning

like a modem but has limited transmission range Figure 2b illustrated the common

method to wiring a null modem Pin2 and pin3 are wire together and all the cables are

connect in such a way a modem simulated between two computers

The electrical characteristic define by RS232 as

(a) Total capacitance not less than 2500 pF

(b) (b) A binary high logic output lines is + 5to + 15 volts input lines is from +3

to + 15 volts

(c) A binary low logic output lines is from -5 to -15 volts input lines is from -3

to -15 volts

(d) output lines voltages -5 and +5 -3 and +3 volts for input lines are undefined

5

Shelld~ Secondary

tntnsmltted data Transmlttins

Signal element timlne (DCEoTE)

Secondary

Relcetver received data

Signal tlmlne(DCEoTE) Looak

Loopok Secondary

Request To8end

DTERudy

Rem_ Loopb8ok amp Signal Qua

Decmlctor RinS indicator

l reg

Transmitted Data

Request to Send

DCEReady

Rivedline 818nal Detector

Reserved (Testing)

Secondary Received Lne Signel Detector

Recetve Data

reg

Crto8ent

Signal Ground Comman RetUrn

reg Rrved (Testing)

Datas18nal

I 10

rate ct UnusedTnulSmitter signal Signed

element -f

timing (DTE-DCE) bull Tnt Mode 8eooundary~ 13 c

To8ent~

Figure 2a The RS232 pin configuration [81

Pin Number Line Line Pin Number

2 m m 2

3 RD RD 3

4 RTS RTS 4

5 CTS CTS 5

6 DSR---- DSR 6

7 Common 7

8 DCD DCD 8

20 DTR DTR 20

22 R1 R1 22

Figure 2b A Null Modem Configuration [8]

6

21 The Explanation For RS1Jl Pin Abbreviation

Hence is the detail ofeach line in DB9 and DB25 function

Clear to Send (CTS)

Data Carrier Detect (OCR)

Data Set Ready (DSR)

Data Terminal Ready (DTR)

Receive Data (RO)

Ring Indicator (RI)

Requested to Send (RTS)

Transmit Data (TD)

asserted (logic state 1) by DCE it is ready to receive data

logic state 1 whenever there is data link in progress

logic state 1 when DCE is ready to communicated withDTE

logic state 1 when DTE is ready to communicated withDCE

use by DCE to send data to DTE

logic 1 by DCE when a ring is detect

logic state 1 by DTE when it want to transmit data toDCE

Use by DTE to send data to DCE

Figure lc The Detail Explanation of Abbreviation [ 8]

22 UART

UART Universal Asynchronous Receiver Transmitter is a special hardware in RS232

serial interface It sometime called as Asynchronous Communication Element

Most of the new personal computer today is equip with 16450 and 16550 UART The

function ofUART chip is to convert the parallel data to a serial data format that enable a

serial communication between two computers The UART chip also uses to convert back

7

the serial bits to parallel bits format The operation of UART mostly control by one or

more register The process of read writes data to register are through input and output

ports Figure ld showing the address of a UART for COMI and COM4

The UART have FIFO or First in First out buffer FIFO bring the meaning as the first

data to enter the buffer are first to leave The function of buffer is to hold data temporary

before it was feed to the transmission medium The modem 16550A UART have16 bytes

FIFO This means 16 bytes can be writes to UART before anything was overwrite The

16550 UART was necessary for a high-speed communication under windows or

application running under window environment

Serial port Base Register Port Address

COM 1 3F8H COM2 2F8H COM3 3E8H COM3 2E8H

Figure ld The Serial Port Base Register Port [7 ]

23 Serial Communication

Serial communication is transmission of data over a serial interface one data bit at a time

In other word data are transfer through and forth over a single wire Therefore serial

communication is more cost effective than parallel communication RS232 is an example

for serial communication interface

24 Parallel Interface

Parallel communication is a way to sending more than one data at a time (normally eight

data bits) over to a parallel device or a Com Port For an example a computer will send

eight data bits of information to a parallel printer A very simple diagram of parallel

communication was present as Figure 2e The parallel interfaces require separated wire

8

------_------------__shyp

for sending separated data and therefor allowed faster and efficient data transmission On

the other hand to setting up a parallel communication network will be more costly than

serial communication network

1 Printer Interface

1 3 4 5 6 7 8

1 Computer Interface

2 3 4 5 6 7 8

Figure 2e A parallel Printer to Computer Interface [7 ]

25 Asynchronous and synchronous data

For two devices to communicate a way of synchronizing data must be set There are two

way ofdata formatting by using either asynchronous or synchronous

The synchronous operation is such a way that for each line data transmit it has a

separated clock to synchronous that data on a time of period For example data are

transfer once in each direction to and from the computer The synchronous data format

was show in figure 2f

While the asynchronous data is such a way that data are synchronous without clock

Each time the data are transmitting the receiver need to figure out how fast the data is

running The frame of asynchronous data has start and stops bit In another world the

frame always added with additional start and stop bit The asynchronous data format was

show in figure 2g

9

01100011100 o 1 1 1 11 0 0 0 0 001 0110 1 1 0

Unique Code

Continuous Block

Direction offlow

Figure 2f Synchronous data format I 8 ]

Start Stop d7 d6 d5 d4 d3 d2 dl dO Start

1 0 1 0 1 1 0 0I 1 I IMSB LSB

Start bit Stop bit1 Data-bits 1 I

r space mark mark space mark space mark mark space space

Serial Communication

Figure 2g Asynchronous Data Format Adopted form [8]

26 The Start Parity and Stop bits

For two machines to communicate to each other first thing both machines must agree on

the rate of speed for data transfer Second thing is the data must fonnatted for

synchronous or asynchronous operation Therefor for asynchronous operation the data

fonnatted in such a way that contains start and stop bit

271 Start bit

10

The TD line at interface device (Pin3) will go high when no data been transmit To start

transmit a data Transmit serial device will set TD line to low by means ofa start bit The

synchronous operation of DCE is waiting the TD line sign change from high bit to low

bit than DCE pauses half of a bit time and start sampling the incoming data until all the

character has been completely transmit To maintain synchronimtion DCE always

sampling the incoming data string at middle ofeach bit

272 Data bits

The data bits are the bits that contain character Nonnallyone character contains eight

bits Hence is the data bits showing character Amiddot 4tH

l start bit 41----shy Data bits j

shy

I t I Io 0 0 0 0 0

1 1deg1 1

Figure 2h The Data bits Format ( 7 ]

273 Parity bits

Four basic fonns ofparity bits are NONE EVEN ODD MARK and SPACE NONE use

for transmits a character without parity bit EVEN parity use to indicate by send logic 1

after a character if there is an odd number of logic 1 bit after a character data bit

Otherwise logic for EVEN parity goes to zero Odd parity will indicate by sending logic

1 after a data of a character bits if there is an even number of logic 1 after a characters

data bits Otherwise logic for ODD parity goes to zero Mark is logic 1 parity bit after a

data character and SPACE is logic zero after the data character

11

274 Stop bits

The stop bit indicated the end of a character The serial device was always send logic 1

for stop bit

28 Data Transmit and Receive Process

281 Transmit of a character

Several steps take before characters are transmitting from processor to modem

For an example communication between processor and 8251A USART

First the processor configures UART according to the communication protocol

Second an instruction was send to UART and set the flag TxEN Next The processor

was send the character to the data buffer ofUART Then this data buffer transfer the

character to transmit buffer for preparation for transmission Once data buffer was

complete transfer the character and ready to receive a new character the TXRDY flag

will set When processor automatically write in data buffer TXRDY flag automatically

reset

Next RTS (Ready to Send)pin output pin ofUART will alerted by modem that the bits

are about to transmit RTS pin for UART is tie together with modem RTS pin while the

modem realizes about to receive character from UART CTS pin will activated Then the

character was automatically transfer to modem The internal flag TxEMPTY will set

once the character was completely transmit from UART to modem

282 Receive of a character

The process of data receiving was also take several sequence First processor configures

UART according to standard protocol Then to receive a character the processor sends a

12

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf
Page 10: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

po

3d EXCITATION OF GASEOUS LASER MEDIUM REFLECTION 21 OF PHOTON DURING STIMULATED EMISSION EXITING PHOTON IN LASER BEAM

SIGNAL (C) INTENSITY OF LIGHT

3e SCHEMATIC DIAGRAM FOR AN END PUMPED ND YAGLASER 22

3f THE ELECTROMAGNETIC SPECTRUM 23

3g AMPLITUDE MODULATION OF OPTICAL LIGHT BEAM 24

3h NON RETURN ZERO FORMAT 24

3i RETURN TO ZERO FORMAT 24

3j USING FM MODULATION TO MODULATED INTENSITY OF tiGHT (A) MASSAGE AMPUTUDE (B) FM MODULATION 25

4a AM SIGNAL MODULATION 30

4b FM SIGNAL MODULATION 31

4c FREQUENCY MODULATION 32

4d FSKFORMAT 33

4e FORMATION OF FSK SIGNAL 34

4f NON COHERENT DEMODULATION 35

4g COHERENT DEMODULATION 35

4h PSK WAVEFORM 36

4i THE GENERATION OF QPSK SIGNAL 37

4j OQPSK WAVEFORM (HALF SYMBOL OFFSET) 38

4k GENERATION ON OQPSK SIGNAL 39

41 GENERATION OF MSK WAVEFORM 40

4m OUTPUT WAVEFORM OF MSK SIGNAL 41

x

5a LASER WARNING LABEL 42

6a SIMPLE BLOCK DIAGRAM RS131 LASER COMMUNICATION SYSTEM 43

6b BLOCK DIAGRAM OF RS131 LASER TRANSCEIVER 44

6c SCHEMATIC OF TRANSCEIVER 45

6d PCB LAYOUT 46

6e DB9JUMPERING 48

7a THE HEADER FILE 54

7b THESETI1NG 55

7c BIOSCOM EXAMPLE 56

7d BIOS_SERIALCOM EXAMPLE 57

XI

CHAPTERt

WIRELESS COMMUNICATION AN OVERVIEW

to An Introduction

A communication occurs when there was an infonnation flow The word

telecommunication is derive from the Greek tele far of and communicare to share

[1] The communication is the process of transferring interpreting and processing

infonnation (data) among the people machines and place This process implies that we

need a sender a medium and a receiver to perform infonnation flow Therefore the

telecommunication is the process of exchanging the data of information in any useable

fonn in any natural delivery among two or more user by using radio wire and light and

other mechanical means

1t Wireless Network

Consider a cellular telephone system that provided coverage in a geographical

area as figure ta shown

To provide wireless communication within a region a Radio Base Station (RBS) must be

set up The Radio Base Station will perfonn the function as access point to the mobile

user and a connection with Mobile Switching Center A mobile user connected to base

station through Common Air Interface which can also called Handshaking ProtocoL [2]

The Radio Base Station will connect to mobile Switching Center through landline The

mobile switching center will provide connectivity to Public Switch Telephone Network

The PSTN Switching Center will provide connectivity to global network

The basic concept of a wireless network was to establishing the mobile user to a base

station followed by connection with mobile switch center and from mobile center

connected to global network

1

Mobile SWltchlna Center(MSC) or

Mobile Telephone SWItohlna omce Voice and Data link

(Landline or ~microwave)

Q ~ ~P-

PSTN

regRadio Link air interface

Figure la The Block Diagram of a Typical Wireless Network [ 2 ]

PSTN network and mobile network will connect by either fix-line or radio wave For the

fixmiddotline It will be twisted copper cable coaxial cable fiber optics cable For the radio

wave it either use microwave and satellite link The characteristic of a PSTN network is

the user was fix at one location while the mobile network allowed the user to move

within the coverage area The process of moving within the coverage area called

Roaming

12 Fundamental of a Wireless Intemet System

To accessing the internet a cellular user need to use a PCMCIA card with the adapter to

connected to laptop in the area where PSTN line was not accessible For example the

product of Celcom Data2Go for wireless data communication can have the following

function shy

e Electronic mail system

e Sending and receiving fax

2

bull Accessing Company database

bull Submit customer order

bull On-line information service

bull accessing Internet-surfing into Netscape

bull terminal mode- billinwregistration

The network ofData2Go by Celcomtradeas shown shy

Figure Ib Celcomtrade Data2Go Network 14 I

Software uses for this type ofnetwork are

bull Delrina WinFaxPro

bull Microsoft Mail

bull Netscape

bull Lotus Notes

13 The purpose of this paper

The main purpose of this project is to develop a useable technique that suitable for

sending data wireless via RS232 communication port The system component will consist

of a desktop computer that act as input device a standard RS232 interface a transceiver

for transmit and receive signal and a modify laser poniter The suggested system will be

3

set and tested in a point-to-point configuration As the figure show below the network

diagram stated shy

J -~HJj----tcooo ~ IEco~codl---=RS=232=--_~ Personal computer Signal RS232 Laser Transceiver RS2321aser Transceiver Personal computer

Figure lc The Simples point to point data communication via RS131laser transceiver

4

Cbapter2

RS-232 INTERFACE AND SERIAL COMMUNICATION

20 Overview

RS 232 Interface in a simple universal well knows data interface RS means

Recommended Standard1 The female connector attaches to Data Communication

Equipment and male connector attaches to Data Terminal Equipment Mostly today PCs

are equipped with two RS232 ports via COMI or COM2 The additional COM port

COM3 and COM4 required additional card

RS-232 defines 25-pin communication line Every line has their own function to

accessing data The configurations ofevery pin layout are show in figure 2a

Normally The ground signal refers to pin 7 Two computers can communicate by using a

null modem A null modem is a special made direct cable and connector It is functioning

like a modem but has limited transmission range Figure 2b illustrated the common

method to wiring a null modem Pin2 and pin3 are wire together and all the cables are

connect in such a way a modem simulated between two computers

The electrical characteristic define by RS232 as

(a) Total capacitance not less than 2500 pF

(b) (b) A binary high logic output lines is + 5to + 15 volts input lines is from +3

to + 15 volts

(c) A binary low logic output lines is from -5 to -15 volts input lines is from -3

to -15 volts

(d) output lines voltages -5 and +5 -3 and +3 volts for input lines are undefined

5

Shelld~ Secondary

tntnsmltted data Transmlttins

Signal element timlne (DCEoTE)

Secondary

Relcetver received data

Signal tlmlne(DCEoTE) Looak

Loopok Secondary

Request To8end

DTERudy

Rem_ Loopb8ok amp Signal Qua

Decmlctor RinS indicator

l reg

Transmitted Data

Request to Send

DCEReady

Rivedline 818nal Detector

Reserved (Testing)

Secondary Received Lne Signel Detector

Recetve Data

reg

Crto8ent

Signal Ground Comman RetUrn

reg Rrved (Testing)

Datas18nal

I 10

rate ct UnusedTnulSmitter signal Signed

element -f

timing (DTE-DCE) bull Tnt Mode 8eooundary~ 13 c

To8ent~

Figure 2a The RS232 pin configuration [81

Pin Number Line Line Pin Number

2 m m 2

3 RD RD 3

4 RTS RTS 4

5 CTS CTS 5

6 DSR---- DSR 6

7 Common 7

8 DCD DCD 8

20 DTR DTR 20

22 R1 R1 22

Figure 2b A Null Modem Configuration [8]

6

21 The Explanation For RS1Jl Pin Abbreviation

Hence is the detail ofeach line in DB9 and DB25 function

Clear to Send (CTS)

Data Carrier Detect (OCR)

Data Set Ready (DSR)

Data Terminal Ready (DTR)

Receive Data (RO)

Ring Indicator (RI)

Requested to Send (RTS)

Transmit Data (TD)

asserted (logic state 1) by DCE it is ready to receive data

logic state 1 whenever there is data link in progress

logic state 1 when DCE is ready to communicated withDTE

logic state 1 when DTE is ready to communicated withDCE

use by DCE to send data to DTE

logic 1 by DCE when a ring is detect

logic state 1 by DTE when it want to transmit data toDCE

Use by DTE to send data to DCE

Figure lc The Detail Explanation of Abbreviation [ 8]

22 UART

UART Universal Asynchronous Receiver Transmitter is a special hardware in RS232

serial interface It sometime called as Asynchronous Communication Element

Most of the new personal computer today is equip with 16450 and 16550 UART The

function ofUART chip is to convert the parallel data to a serial data format that enable a

serial communication between two computers The UART chip also uses to convert back

7

the serial bits to parallel bits format The operation of UART mostly control by one or

more register The process of read writes data to register are through input and output

ports Figure ld showing the address of a UART for COMI and COM4

The UART have FIFO or First in First out buffer FIFO bring the meaning as the first

data to enter the buffer are first to leave The function of buffer is to hold data temporary

before it was feed to the transmission medium The modem 16550A UART have16 bytes

FIFO This means 16 bytes can be writes to UART before anything was overwrite The

16550 UART was necessary for a high-speed communication under windows or

application running under window environment

Serial port Base Register Port Address

COM 1 3F8H COM2 2F8H COM3 3E8H COM3 2E8H

Figure ld The Serial Port Base Register Port [7 ]

23 Serial Communication

Serial communication is transmission of data over a serial interface one data bit at a time

In other word data are transfer through and forth over a single wire Therefore serial

communication is more cost effective than parallel communication RS232 is an example

for serial communication interface

24 Parallel Interface

Parallel communication is a way to sending more than one data at a time (normally eight

data bits) over to a parallel device or a Com Port For an example a computer will send

eight data bits of information to a parallel printer A very simple diagram of parallel

communication was present as Figure 2e The parallel interfaces require separated wire

8

------_------------__shyp

for sending separated data and therefor allowed faster and efficient data transmission On

the other hand to setting up a parallel communication network will be more costly than

serial communication network

1 Printer Interface

1 3 4 5 6 7 8

1 Computer Interface

2 3 4 5 6 7 8

Figure 2e A parallel Printer to Computer Interface [7 ]

25 Asynchronous and synchronous data

For two devices to communicate a way of synchronizing data must be set There are two

way ofdata formatting by using either asynchronous or synchronous

The synchronous operation is such a way that for each line data transmit it has a

separated clock to synchronous that data on a time of period For example data are

transfer once in each direction to and from the computer The synchronous data format

was show in figure 2f

While the asynchronous data is such a way that data are synchronous without clock

Each time the data are transmitting the receiver need to figure out how fast the data is

running The frame of asynchronous data has start and stops bit In another world the

frame always added with additional start and stop bit The asynchronous data format was

show in figure 2g

9

01100011100 o 1 1 1 11 0 0 0 0 001 0110 1 1 0

Unique Code

Continuous Block

Direction offlow

Figure 2f Synchronous data format I 8 ]

Start Stop d7 d6 d5 d4 d3 d2 dl dO Start

1 0 1 0 1 1 0 0I 1 I IMSB LSB

Start bit Stop bit1 Data-bits 1 I

r space mark mark space mark space mark mark space space

Serial Communication

Figure 2g Asynchronous Data Format Adopted form [8]

26 The Start Parity and Stop bits

For two machines to communicate to each other first thing both machines must agree on

the rate of speed for data transfer Second thing is the data must fonnatted for

synchronous or asynchronous operation Therefor for asynchronous operation the data

fonnatted in such a way that contains start and stop bit

271 Start bit

10

The TD line at interface device (Pin3) will go high when no data been transmit To start

transmit a data Transmit serial device will set TD line to low by means ofa start bit The

synchronous operation of DCE is waiting the TD line sign change from high bit to low

bit than DCE pauses half of a bit time and start sampling the incoming data until all the

character has been completely transmit To maintain synchronimtion DCE always

sampling the incoming data string at middle ofeach bit

272 Data bits

The data bits are the bits that contain character Nonnallyone character contains eight

bits Hence is the data bits showing character Amiddot 4tH

l start bit 41----shy Data bits j

shy

I t I Io 0 0 0 0 0

1 1deg1 1

Figure 2h The Data bits Format ( 7 ]

273 Parity bits

Four basic fonns ofparity bits are NONE EVEN ODD MARK and SPACE NONE use

for transmits a character without parity bit EVEN parity use to indicate by send logic 1

after a character if there is an odd number of logic 1 bit after a character data bit

Otherwise logic for EVEN parity goes to zero Odd parity will indicate by sending logic

1 after a data of a character bits if there is an even number of logic 1 after a characters

data bits Otherwise logic for ODD parity goes to zero Mark is logic 1 parity bit after a

data character and SPACE is logic zero after the data character

11

274 Stop bits

The stop bit indicated the end of a character The serial device was always send logic 1

for stop bit

28 Data Transmit and Receive Process

281 Transmit of a character

Several steps take before characters are transmitting from processor to modem

For an example communication between processor and 8251A USART

First the processor configures UART according to the communication protocol

Second an instruction was send to UART and set the flag TxEN Next The processor

was send the character to the data buffer ofUART Then this data buffer transfer the

character to transmit buffer for preparation for transmission Once data buffer was

complete transfer the character and ready to receive a new character the TXRDY flag

will set When processor automatically write in data buffer TXRDY flag automatically

reset

Next RTS (Ready to Send)pin output pin ofUART will alerted by modem that the bits

are about to transmit RTS pin for UART is tie together with modem RTS pin while the

modem realizes about to receive character from UART CTS pin will activated Then the

character was automatically transfer to modem The internal flag TxEMPTY will set

once the character was completely transmit from UART to modem

282 Receive of a character

The process of data receiving was also take several sequence First processor configures

UART according to standard protocol Then to receive a character the processor sends a

12

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf
Page 11: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

5a LASER WARNING LABEL 42

6a SIMPLE BLOCK DIAGRAM RS131 LASER COMMUNICATION SYSTEM 43

6b BLOCK DIAGRAM OF RS131 LASER TRANSCEIVER 44

6c SCHEMATIC OF TRANSCEIVER 45

6d PCB LAYOUT 46

6e DB9JUMPERING 48

7a THE HEADER FILE 54

7b THESETI1NG 55

7c BIOSCOM EXAMPLE 56

7d BIOS_SERIALCOM EXAMPLE 57

XI

CHAPTERt

WIRELESS COMMUNICATION AN OVERVIEW

to An Introduction

A communication occurs when there was an infonnation flow The word

telecommunication is derive from the Greek tele far of and communicare to share

[1] The communication is the process of transferring interpreting and processing

infonnation (data) among the people machines and place This process implies that we

need a sender a medium and a receiver to perform infonnation flow Therefore the

telecommunication is the process of exchanging the data of information in any useable

fonn in any natural delivery among two or more user by using radio wire and light and

other mechanical means

1t Wireless Network

Consider a cellular telephone system that provided coverage in a geographical

area as figure ta shown

To provide wireless communication within a region a Radio Base Station (RBS) must be

set up The Radio Base Station will perfonn the function as access point to the mobile

user and a connection with Mobile Switching Center A mobile user connected to base

station through Common Air Interface which can also called Handshaking ProtocoL [2]

The Radio Base Station will connect to mobile Switching Center through landline The

mobile switching center will provide connectivity to Public Switch Telephone Network

The PSTN Switching Center will provide connectivity to global network

The basic concept of a wireless network was to establishing the mobile user to a base

station followed by connection with mobile switch center and from mobile center

connected to global network

1

Mobile SWltchlna Center(MSC) or

Mobile Telephone SWItohlna omce Voice and Data link

(Landline or ~microwave)

Q ~ ~P-

PSTN

regRadio Link air interface

Figure la The Block Diagram of a Typical Wireless Network [ 2 ]

PSTN network and mobile network will connect by either fix-line or radio wave For the

fixmiddotline It will be twisted copper cable coaxial cable fiber optics cable For the radio

wave it either use microwave and satellite link The characteristic of a PSTN network is

the user was fix at one location while the mobile network allowed the user to move

within the coverage area The process of moving within the coverage area called

Roaming

12 Fundamental of a Wireless Intemet System

To accessing the internet a cellular user need to use a PCMCIA card with the adapter to

connected to laptop in the area where PSTN line was not accessible For example the

product of Celcom Data2Go for wireless data communication can have the following

function shy

e Electronic mail system

e Sending and receiving fax

2

bull Accessing Company database

bull Submit customer order

bull On-line information service

bull accessing Internet-surfing into Netscape

bull terminal mode- billinwregistration

The network ofData2Go by Celcomtradeas shown shy

Figure Ib Celcomtrade Data2Go Network 14 I

Software uses for this type ofnetwork are

bull Delrina WinFaxPro

bull Microsoft Mail

bull Netscape

bull Lotus Notes

13 The purpose of this paper

The main purpose of this project is to develop a useable technique that suitable for

sending data wireless via RS232 communication port The system component will consist

of a desktop computer that act as input device a standard RS232 interface a transceiver

for transmit and receive signal and a modify laser poniter The suggested system will be

3

set and tested in a point-to-point configuration As the figure show below the network

diagram stated shy

J -~HJj----tcooo ~ IEco~codl---=RS=232=--_~ Personal computer Signal RS232 Laser Transceiver RS2321aser Transceiver Personal computer

Figure lc The Simples point to point data communication via RS131laser transceiver

4

Cbapter2

RS-232 INTERFACE AND SERIAL COMMUNICATION

20 Overview

RS 232 Interface in a simple universal well knows data interface RS means

Recommended Standard1 The female connector attaches to Data Communication

Equipment and male connector attaches to Data Terminal Equipment Mostly today PCs

are equipped with two RS232 ports via COMI or COM2 The additional COM port

COM3 and COM4 required additional card

RS-232 defines 25-pin communication line Every line has their own function to

accessing data The configurations ofevery pin layout are show in figure 2a

Normally The ground signal refers to pin 7 Two computers can communicate by using a

null modem A null modem is a special made direct cable and connector It is functioning

like a modem but has limited transmission range Figure 2b illustrated the common

method to wiring a null modem Pin2 and pin3 are wire together and all the cables are

connect in such a way a modem simulated between two computers

The electrical characteristic define by RS232 as

(a) Total capacitance not less than 2500 pF

(b) (b) A binary high logic output lines is + 5to + 15 volts input lines is from +3

to + 15 volts

(c) A binary low logic output lines is from -5 to -15 volts input lines is from -3

to -15 volts

(d) output lines voltages -5 and +5 -3 and +3 volts for input lines are undefined

5

Shelld~ Secondary

tntnsmltted data Transmlttins

Signal element timlne (DCEoTE)

Secondary

Relcetver received data

Signal tlmlne(DCEoTE) Looak

Loopok Secondary

Request To8end

DTERudy

Rem_ Loopb8ok amp Signal Qua

Decmlctor RinS indicator

l reg

Transmitted Data

Request to Send

DCEReady

Rivedline 818nal Detector

Reserved (Testing)

Secondary Received Lne Signel Detector

Recetve Data

reg

Crto8ent

Signal Ground Comman RetUrn

reg Rrved (Testing)

Datas18nal

I 10

rate ct UnusedTnulSmitter signal Signed

element -f

timing (DTE-DCE) bull Tnt Mode 8eooundary~ 13 c

To8ent~

Figure 2a The RS232 pin configuration [81

Pin Number Line Line Pin Number

2 m m 2

3 RD RD 3

4 RTS RTS 4

5 CTS CTS 5

6 DSR---- DSR 6

7 Common 7

8 DCD DCD 8

20 DTR DTR 20

22 R1 R1 22

Figure 2b A Null Modem Configuration [8]

6

21 The Explanation For RS1Jl Pin Abbreviation

Hence is the detail ofeach line in DB9 and DB25 function

Clear to Send (CTS)

Data Carrier Detect (OCR)

Data Set Ready (DSR)

Data Terminal Ready (DTR)

Receive Data (RO)

Ring Indicator (RI)

Requested to Send (RTS)

Transmit Data (TD)

asserted (logic state 1) by DCE it is ready to receive data

logic state 1 whenever there is data link in progress

logic state 1 when DCE is ready to communicated withDTE

logic state 1 when DTE is ready to communicated withDCE

use by DCE to send data to DTE

logic 1 by DCE when a ring is detect

logic state 1 by DTE when it want to transmit data toDCE

Use by DTE to send data to DCE

Figure lc The Detail Explanation of Abbreviation [ 8]

22 UART

UART Universal Asynchronous Receiver Transmitter is a special hardware in RS232

serial interface It sometime called as Asynchronous Communication Element

Most of the new personal computer today is equip with 16450 and 16550 UART The

function ofUART chip is to convert the parallel data to a serial data format that enable a

serial communication between two computers The UART chip also uses to convert back

7

the serial bits to parallel bits format The operation of UART mostly control by one or

more register The process of read writes data to register are through input and output

ports Figure ld showing the address of a UART for COMI and COM4

The UART have FIFO or First in First out buffer FIFO bring the meaning as the first

data to enter the buffer are first to leave The function of buffer is to hold data temporary

before it was feed to the transmission medium The modem 16550A UART have16 bytes

FIFO This means 16 bytes can be writes to UART before anything was overwrite The

16550 UART was necessary for a high-speed communication under windows or

application running under window environment

Serial port Base Register Port Address

COM 1 3F8H COM2 2F8H COM3 3E8H COM3 2E8H

Figure ld The Serial Port Base Register Port [7 ]

23 Serial Communication

Serial communication is transmission of data over a serial interface one data bit at a time

In other word data are transfer through and forth over a single wire Therefore serial

communication is more cost effective than parallel communication RS232 is an example

for serial communication interface

24 Parallel Interface

Parallel communication is a way to sending more than one data at a time (normally eight

data bits) over to a parallel device or a Com Port For an example a computer will send

eight data bits of information to a parallel printer A very simple diagram of parallel

communication was present as Figure 2e The parallel interfaces require separated wire

8

------_------------__shyp

for sending separated data and therefor allowed faster and efficient data transmission On

the other hand to setting up a parallel communication network will be more costly than

serial communication network

1 Printer Interface

1 3 4 5 6 7 8

1 Computer Interface

2 3 4 5 6 7 8

Figure 2e A parallel Printer to Computer Interface [7 ]

25 Asynchronous and synchronous data

For two devices to communicate a way of synchronizing data must be set There are two

way ofdata formatting by using either asynchronous or synchronous

The synchronous operation is such a way that for each line data transmit it has a

separated clock to synchronous that data on a time of period For example data are

transfer once in each direction to and from the computer The synchronous data format

was show in figure 2f

While the asynchronous data is such a way that data are synchronous without clock

Each time the data are transmitting the receiver need to figure out how fast the data is

running The frame of asynchronous data has start and stops bit In another world the

frame always added with additional start and stop bit The asynchronous data format was

show in figure 2g

9

01100011100 o 1 1 1 11 0 0 0 0 001 0110 1 1 0

Unique Code

Continuous Block

Direction offlow

Figure 2f Synchronous data format I 8 ]

Start Stop d7 d6 d5 d4 d3 d2 dl dO Start

1 0 1 0 1 1 0 0I 1 I IMSB LSB

Start bit Stop bit1 Data-bits 1 I

r space mark mark space mark space mark mark space space

Serial Communication

Figure 2g Asynchronous Data Format Adopted form [8]

26 The Start Parity and Stop bits

For two machines to communicate to each other first thing both machines must agree on

the rate of speed for data transfer Second thing is the data must fonnatted for

synchronous or asynchronous operation Therefor for asynchronous operation the data

fonnatted in such a way that contains start and stop bit

271 Start bit

10

The TD line at interface device (Pin3) will go high when no data been transmit To start

transmit a data Transmit serial device will set TD line to low by means ofa start bit The

synchronous operation of DCE is waiting the TD line sign change from high bit to low

bit than DCE pauses half of a bit time and start sampling the incoming data until all the

character has been completely transmit To maintain synchronimtion DCE always

sampling the incoming data string at middle ofeach bit

272 Data bits

The data bits are the bits that contain character Nonnallyone character contains eight

bits Hence is the data bits showing character Amiddot 4tH

l start bit 41----shy Data bits j

shy

I t I Io 0 0 0 0 0

1 1deg1 1

Figure 2h The Data bits Format ( 7 ]

273 Parity bits

Four basic fonns ofparity bits are NONE EVEN ODD MARK and SPACE NONE use

for transmits a character without parity bit EVEN parity use to indicate by send logic 1

after a character if there is an odd number of logic 1 bit after a character data bit

Otherwise logic for EVEN parity goes to zero Odd parity will indicate by sending logic

1 after a data of a character bits if there is an even number of logic 1 after a characters

data bits Otherwise logic for ODD parity goes to zero Mark is logic 1 parity bit after a

data character and SPACE is logic zero after the data character

11

274 Stop bits

The stop bit indicated the end of a character The serial device was always send logic 1

for stop bit

28 Data Transmit and Receive Process

281 Transmit of a character

Several steps take before characters are transmitting from processor to modem

For an example communication between processor and 8251A USART

First the processor configures UART according to the communication protocol

Second an instruction was send to UART and set the flag TxEN Next The processor

was send the character to the data buffer ofUART Then this data buffer transfer the

character to transmit buffer for preparation for transmission Once data buffer was

complete transfer the character and ready to receive a new character the TXRDY flag

will set When processor automatically write in data buffer TXRDY flag automatically

reset

Next RTS (Ready to Send)pin output pin ofUART will alerted by modem that the bits

are about to transmit RTS pin for UART is tie together with modem RTS pin while the

modem realizes about to receive character from UART CTS pin will activated Then the

character was automatically transfer to modem The internal flag TxEMPTY will set

once the character was completely transmit from UART to modem

282 Receive of a character

The process of data receiving was also take several sequence First processor configures

UART according to standard protocol Then to receive a character the processor sends a

12

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf
Page 12: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

CHAPTERt

WIRELESS COMMUNICATION AN OVERVIEW

to An Introduction

A communication occurs when there was an infonnation flow The word

telecommunication is derive from the Greek tele far of and communicare to share

[1] The communication is the process of transferring interpreting and processing

infonnation (data) among the people machines and place This process implies that we

need a sender a medium and a receiver to perform infonnation flow Therefore the

telecommunication is the process of exchanging the data of information in any useable

fonn in any natural delivery among two or more user by using radio wire and light and

other mechanical means

1t Wireless Network

Consider a cellular telephone system that provided coverage in a geographical

area as figure ta shown

To provide wireless communication within a region a Radio Base Station (RBS) must be

set up The Radio Base Station will perfonn the function as access point to the mobile

user and a connection with Mobile Switching Center A mobile user connected to base

station through Common Air Interface which can also called Handshaking ProtocoL [2]

The Radio Base Station will connect to mobile Switching Center through landline The

mobile switching center will provide connectivity to Public Switch Telephone Network

The PSTN Switching Center will provide connectivity to global network

The basic concept of a wireless network was to establishing the mobile user to a base

station followed by connection with mobile switch center and from mobile center

connected to global network

1

Mobile SWltchlna Center(MSC) or

Mobile Telephone SWItohlna omce Voice and Data link

(Landline or ~microwave)

Q ~ ~P-

PSTN

regRadio Link air interface

Figure la The Block Diagram of a Typical Wireless Network [ 2 ]

PSTN network and mobile network will connect by either fix-line or radio wave For the

fixmiddotline It will be twisted copper cable coaxial cable fiber optics cable For the radio

wave it either use microwave and satellite link The characteristic of a PSTN network is

the user was fix at one location while the mobile network allowed the user to move

within the coverage area The process of moving within the coverage area called

Roaming

12 Fundamental of a Wireless Intemet System

To accessing the internet a cellular user need to use a PCMCIA card with the adapter to

connected to laptop in the area where PSTN line was not accessible For example the

product of Celcom Data2Go for wireless data communication can have the following

function shy

e Electronic mail system

e Sending and receiving fax

2

bull Accessing Company database

bull Submit customer order

bull On-line information service

bull accessing Internet-surfing into Netscape

bull terminal mode- billinwregistration

The network ofData2Go by Celcomtradeas shown shy

Figure Ib Celcomtrade Data2Go Network 14 I

Software uses for this type ofnetwork are

bull Delrina WinFaxPro

bull Microsoft Mail

bull Netscape

bull Lotus Notes

13 The purpose of this paper

The main purpose of this project is to develop a useable technique that suitable for

sending data wireless via RS232 communication port The system component will consist

of a desktop computer that act as input device a standard RS232 interface a transceiver

for transmit and receive signal and a modify laser poniter The suggested system will be

3

set and tested in a point-to-point configuration As the figure show below the network

diagram stated shy

J -~HJj----tcooo ~ IEco~codl---=RS=232=--_~ Personal computer Signal RS232 Laser Transceiver RS2321aser Transceiver Personal computer

Figure lc The Simples point to point data communication via RS131laser transceiver

4

Cbapter2

RS-232 INTERFACE AND SERIAL COMMUNICATION

20 Overview

RS 232 Interface in a simple universal well knows data interface RS means

Recommended Standard1 The female connector attaches to Data Communication

Equipment and male connector attaches to Data Terminal Equipment Mostly today PCs

are equipped with two RS232 ports via COMI or COM2 The additional COM port

COM3 and COM4 required additional card

RS-232 defines 25-pin communication line Every line has their own function to

accessing data The configurations ofevery pin layout are show in figure 2a

Normally The ground signal refers to pin 7 Two computers can communicate by using a

null modem A null modem is a special made direct cable and connector It is functioning

like a modem but has limited transmission range Figure 2b illustrated the common

method to wiring a null modem Pin2 and pin3 are wire together and all the cables are

connect in such a way a modem simulated between two computers

The electrical characteristic define by RS232 as

(a) Total capacitance not less than 2500 pF

(b) (b) A binary high logic output lines is + 5to + 15 volts input lines is from +3

to + 15 volts

(c) A binary low logic output lines is from -5 to -15 volts input lines is from -3

to -15 volts

(d) output lines voltages -5 and +5 -3 and +3 volts for input lines are undefined

5

Shelld~ Secondary

tntnsmltted data Transmlttins

Signal element timlne (DCEoTE)

Secondary

Relcetver received data

Signal tlmlne(DCEoTE) Looak

Loopok Secondary

Request To8end

DTERudy

Rem_ Loopb8ok amp Signal Qua

Decmlctor RinS indicator

l reg

Transmitted Data

Request to Send

DCEReady

Rivedline 818nal Detector

Reserved (Testing)

Secondary Received Lne Signel Detector

Recetve Data

reg

Crto8ent

Signal Ground Comman RetUrn

reg Rrved (Testing)

Datas18nal

I 10

rate ct UnusedTnulSmitter signal Signed

element -f

timing (DTE-DCE) bull Tnt Mode 8eooundary~ 13 c

To8ent~

Figure 2a The RS232 pin configuration [81

Pin Number Line Line Pin Number

2 m m 2

3 RD RD 3

4 RTS RTS 4

5 CTS CTS 5

6 DSR---- DSR 6

7 Common 7

8 DCD DCD 8

20 DTR DTR 20

22 R1 R1 22

Figure 2b A Null Modem Configuration [8]

6

21 The Explanation For RS1Jl Pin Abbreviation

Hence is the detail ofeach line in DB9 and DB25 function

Clear to Send (CTS)

Data Carrier Detect (OCR)

Data Set Ready (DSR)

Data Terminal Ready (DTR)

Receive Data (RO)

Ring Indicator (RI)

Requested to Send (RTS)

Transmit Data (TD)

asserted (logic state 1) by DCE it is ready to receive data

logic state 1 whenever there is data link in progress

logic state 1 when DCE is ready to communicated withDTE

logic state 1 when DTE is ready to communicated withDCE

use by DCE to send data to DTE

logic 1 by DCE when a ring is detect

logic state 1 by DTE when it want to transmit data toDCE

Use by DTE to send data to DCE

Figure lc The Detail Explanation of Abbreviation [ 8]

22 UART

UART Universal Asynchronous Receiver Transmitter is a special hardware in RS232

serial interface It sometime called as Asynchronous Communication Element

Most of the new personal computer today is equip with 16450 and 16550 UART The

function ofUART chip is to convert the parallel data to a serial data format that enable a

serial communication between two computers The UART chip also uses to convert back

7

the serial bits to parallel bits format The operation of UART mostly control by one or

more register The process of read writes data to register are through input and output

ports Figure ld showing the address of a UART for COMI and COM4

The UART have FIFO or First in First out buffer FIFO bring the meaning as the first

data to enter the buffer are first to leave The function of buffer is to hold data temporary

before it was feed to the transmission medium The modem 16550A UART have16 bytes

FIFO This means 16 bytes can be writes to UART before anything was overwrite The

16550 UART was necessary for a high-speed communication under windows or

application running under window environment

Serial port Base Register Port Address

COM 1 3F8H COM2 2F8H COM3 3E8H COM3 2E8H

Figure ld The Serial Port Base Register Port [7 ]

23 Serial Communication

Serial communication is transmission of data over a serial interface one data bit at a time

In other word data are transfer through and forth over a single wire Therefore serial

communication is more cost effective than parallel communication RS232 is an example

for serial communication interface

24 Parallel Interface

Parallel communication is a way to sending more than one data at a time (normally eight

data bits) over to a parallel device or a Com Port For an example a computer will send

eight data bits of information to a parallel printer A very simple diagram of parallel

communication was present as Figure 2e The parallel interfaces require separated wire

8

------_------------__shyp

for sending separated data and therefor allowed faster and efficient data transmission On

the other hand to setting up a parallel communication network will be more costly than

serial communication network

1 Printer Interface

1 3 4 5 6 7 8

1 Computer Interface

2 3 4 5 6 7 8

Figure 2e A parallel Printer to Computer Interface [7 ]

25 Asynchronous and synchronous data

For two devices to communicate a way of synchronizing data must be set There are two

way ofdata formatting by using either asynchronous or synchronous

The synchronous operation is such a way that for each line data transmit it has a

separated clock to synchronous that data on a time of period For example data are

transfer once in each direction to and from the computer The synchronous data format

was show in figure 2f

While the asynchronous data is such a way that data are synchronous without clock

Each time the data are transmitting the receiver need to figure out how fast the data is

running The frame of asynchronous data has start and stops bit In another world the

frame always added with additional start and stop bit The asynchronous data format was

show in figure 2g

9

01100011100 o 1 1 1 11 0 0 0 0 001 0110 1 1 0

Unique Code

Continuous Block

Direction offlow

Figure 2f Synchronous data format I 8 ]

Start Stop d7 d6 d5 d4 d3 d2 dl dO Start

1 0 1 0 1 1 0 0I 1 I IMSB LSB

Start bit Stop bit1 Data-bits 1 I

r space mark mark space mark space mark mark space space

Serial Communication

Figure 2g Asynchronous Data Format Adopted form [8]

26 The Start Parity and Stop bits

For two machines to communicate to each other first thing both machines must agree on

the rate of speed for data transfer Second thing is the data must fonnatted for

synchronous or asynchronous operation Therefor for asynchronous operation the data

fonnatted in such a way that contains start and stop bit

271 Start bit

10

The TD line at interface device (Pin3) will go high when no data been transmit To start

transmit a data Transmit serial device will set TD line to low by means ofa start bit The

synchronous operation of DCE is waiting the TD line sign change from high bit to low

bit than DCE pauses half of a bit time and start sampling the incoming data until all the

character has been completely transmit To maintain synchronimtion DCE always

sampling the incoming data string at middle ofeach bit

272 Data bits

The data bits are the bits that contain character Nonnallyone character contains eight

bits Hence is the data bits showing character Amiddot 4tH

l start bit 41----shy Data bits j

shy

I t I Io 0 0 0 0 0

1 1deg1 1

Figure 2h The Data bits Format ( 7 ]

273 Parity bits

Four basic fonns ofparity bits are NONE EVEN ODD MARK and SPACE NONE use

for transmits a character without parity bit EVEN parity use to indicate by send logic 1

after a character if there is an odd number of logic 1 bit after a character data bit

Otherwise logic for EVEN parity goes to zero Odd parity will indicate by sending logic

1 after a data of a character bits if there is an even number of logic 1 after a characters

data bits Otherwise logic for ODD parity goes to zero Mark is logic 1 parity bit after a

data character and SPACE is logic zero after the data character

11

274 Stop bits

The stop bit indicated the end of a character The serial device was always send logic 1

for stop bit

28 Data Transmit and Receive Process

281 Transmit of a character

Several steps take before characters are transmitting from processor to modem

For an example communication between processor and 8251A USART

First the processor configures UART according to the communication protocol

Second an instruction was send to UART and set the flag TxEN Next The processor

was send the character to the data buffer ofUART Then this data buffer transfer the

character to transmit buffer for preparation for transmission Once data buffer was

complete transfer the character and ready to receive a new character the TXRDY flag

will set When processor automatically write in data buffer TXRDY flag automatically

reset

Next RTS (Ready to Send)pin output pin ofUART will alerted by modem that the bits

are about to transmit RTS pin for UART is tie together with modem RTS pin while the

modem realizes about to receive character from UART CTS pin will activated Then the

character was automatically transfer to modem The internal flag TxEMPTY will set

once the character was completely transmit from UART to modem

282 Receive of a character

The process of data receiving was also take several sequence First processor configures

UART according to standard protocol Then to receive a character the processor sends a

12

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf
Page 13: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

Mobile SWltchlna Center(MSC) or

Mobile Telephone SWItohlna omce Voice and Data link

(Landline or ~microwave)

Q ~ ~P-

PSTN

regRadio Link air interface

Figure la The Block Diagram of a Typical Wireless Network [ 2 ]

PSTN network and mobile network will connect by either fix-line or radio wave For the

fixmiddotline It will be twisted copper cable coaxial cable fiber optics cable For the radio

wave it either use microwave and satellite link The characteristic of a PSTN network is

the user was fix at one location while the mobile network allowed the user to move

within the coverage area The process of moving within the coverage area called

Roaming

12 Fundamental of a Wireless Intemet System

To accessing the internet a cellular user need to use a PCMCIA card with the adapter to

connected to laptop in the area where PSTN line was not accessible For example the

product of Celcom Data2Go for wireless data communication can have the following

function shy

e Electronic mail system

e Sending and receiving fax

2

bull Accessing Company database

bull Submit customer order

bull On-line information service

bull accessing Internet-surfing into Netscape

bull terminal mode- billinwregistration

The network ofData2Go by Celcomtradeas shown shy

Figure Ib Celcomtrade Data2Go Network 14 I

Software uses for this type ofnetwork are

bull Delrina WinFaxPro

bull Microsoft Mail

bull Netscape

bull Lotus Notes

13 The purpose of this paper

The main purpose of this project is to develop a useable technique that suitable for

sending data wireless via RS232 communication port The system component will consist

of a desktop computer that act as input device a standard RS232 interface a transceiver

for transmit and receive signal and a modify laser poniter The suggested system will be

3

set and tested in a point-to-point configuration As the figure show below the network

diagram stated shy

J -~HJj----tcooo ~ IEco~codl---=RS=232=--_~ Personal computer Signal RS232 Laser Transceiver RS2321aser Transceiver Personal computer

Figure lc The Simples point to point data communication via RS131laser transceiver

4

Cbapter2

RS-232 INTERFACE AND SERIAL COMMUNICATION

20 Overview

RS 232 Interface in a simple universal well knows data interface RS means

Recommended Standard1 The female connector attaches to Data Communication

Equipment and male connector attaches to Data Terminal Equipment Mostly today PCs

are equipped with two RS232 ports via COMI or COM2 The additional COM port

COM3 and COM4 required additional card

RS-232 defines 25-pin communication line Every line has their own function to

accessing data The configurations ofevery pin layout are show in figure 2a

Normally The ground signal refers to pin 7 Two computers can communicate by using a

null modem A null modem is a special made direct cable and connector It is functioning

like a modem but has limited transmission range Figure 2b illustrated the common

method to wiring a null modem Pin2 and pin3 are wire together and all the cables are

connect in such a way a modem simulated between two computers

The electrical characteristic define by RS232 as

(a) Total capacitance not less than 2500 pF

(b) (b) A binary high logic output lines is + 5to + 15 volts input lines is from +3

to + 15 volts

(c) A binary low logic output lines is from -5 to -15 volts input lines is from -3

to -15 volts

(d) output lines voltages -5 and +5 -3 and +3 volts for input lines are undefined

5

Shelld~ Secondary

tntnsmltted data Transmlttins

Signal element timlne (DCEoTE)

Secondary

Relcetver received data

Signal tlmlne(DCEoTE) Looak

Loopok Secondary

Request To8end

DTERudy

Rem_ Loopb8ok amp Signal Qua

Decmlctor RinS indicator

l reg

Transmitted Data

Request to Send

DCEReady

Rivedline 818nal Detector

Reserved (Testing)

Secondary Received Lne Signel Detector

Recetve Data

reg

Crto8ent

Signal Ground Comman RetUrn

reg Rrved (Testing)

Datas18nal

I 10

rate ct UnusedTnulSmitter signal Signed

element -f

timing (DTE-DCE) bull Tnt Mode 8eooundary~ 13 c

To8ent~

Figure 2a The RS232 pin configuration [81

Pin Number Line Line Pin Number

2 m m 2

3 RD RD 3

4 RTS RTS 4

5 CTS CTS 5

6 DSR---- DSR 6

7 Common 7

8 DCD DCD 8

20 DTR DTR 20

22 R1 R1 22

Figure 2b A Null Modem Configuration [8]

6

21 The Explanation For RS1Jl Pin Abbreviation

Hence is the detail ofeach line in DB9 and DB25 function

Clear to Send (CTS)

Data Carrier Detect (OCR)

Data Set Ready (DSR)

Data Terminal Ready (DTR)

Receive Data (RO)

Ring Indicator (RI)

Requested to Send (RTS)

Transmit Data (TD)

asserted (logic state 1) by DCE it is ready to receive data

logic state 1 whenever there is data link in progress

logic state 1 when DCE is ready to communicated withDTE

logic state 1 when DTE is ready to communicated withDCE

use by DCE to send data to DTE

logic 1 by DCE when a ring is detect

logic state 1 by DTE when it want to transmit data toDCE

Use by DTE to send data to DCE

Figure lc The Detail Explanation of Abbreviation [ 8]

22 UART

UART Universal Asynchronous Receiver Transmitter is a special hardware in RS232

serial interface It sometime called as Asynchronous Communication Element

Most of the new personal computer today is equip with 16450 and 16550 UART The

function ofUART chip is to convert the parallel data to a serial data format that enable a

serial communication between two computers The UART chip also uses to convert back

7

the serial bits to parallel bits format The operation of UART mostly control by one or

more register The process of read writes data to register are through input and output

ports Figure ld showing the address of a UART for COMI and COM4

The UART have FIFO or First in First out buffer FIFO bring the meaning as the first

data to enter the buffer are first to leave The function of buffer is to hold data temporary

before it was feed to the transmission medium The modem 16550A UART have16 bytes

FIFO This means 16 bytes can be writes to UART before anything was overwrite The

16550 UART was necessary for a high-speed communication under windows or

application running under window environment

Serial port Base Register Port Address

COM 1 3F8H COM2 2F8H COM3 3E8H COM3 2E8H

Figure ld The Serial Port Base Register Port [7 ]

23 Serial Communication

Serial communication is transmission of data over a serial interface one data bit at a time

In other word data are transfer through and forth over a single wire Therefore serial

communication is more cost effective than parallel communication RS232 is an example

for serial communication interface

24 Parallel Interface

Parallel communication is a way to sending more than one data at a time (normally eight

data bits) over to a parallel device or a Com Port For an example a computer will send

eight data bits of information to a parallel printer A very simple diagram of parallel

communication was present as Figure 2e The parallel interfaces require separated wire

8

------_------------__shyp

for sending separated data and therefor allowed faster and efficient data transmission On

the other hand to setting up a parallel communication network will be more costly than

serial communication network

1 Printer Interface

1 3 4 5 6 7 8

1 Computer Interface

2 3 4 5 6 7 8

Figure 2e A parallel Printer to Computer Interface [7 ]

25 Asynchronous and synchronous data

For two devices to communicate a way of synchronizing data must be set There are two

way ofdata formatting by using either asynchronous or synchronous

The synchronous operation is such a way that for each line data transmit it has a

separated clock to synchronous that data on a time of period For example data are

transfer once in each direction to and from the computer The synchronous data format

was show in figure 2f

While the asynchronous data is such a way that data are synchronous without clock

Each time the data are transmitting the receiver need to figure out how fast the data is

running The frame of asynchronous data has start and stops bit In another world the

frame always added with additional start and stop bit The asynchronous data format was

show in figure 2g

9

01100011100 o 1 1 1 11 0 0 0 0 001 0110 1 1 0

Unique Code

Continuous Block

Direction offlow

Figure 2f Synchronous data format I 8 ]

Start Stop d7 d6 d5 d4 d3 d2 dl dO Start

1 0 1 0 1 1 0 0I 1 I IMSB LSB

Start bit Stop bit1 Data-bits 1 I

r space mark mark space mark space mark mark space space

Serial Communication

Figure 2g Asynchronous Data Format Adopted form [8]

26 The Start Parity and Stop bits

For two machines to communicate to each other first thing both machines must agree on

the rate of speed for data transfer Second thing is the data must fonnatted for

synchronous or asynchronous operation Therefor for asynchronous operation the data

fonnatted in such a way that contains start and stop bit

271 Start bit

10

The TD line at interface device (Pin3) will go high when no data been transmit To start

transmit a data Transmit serial device will set TD line to low by means ofa start bit The

synchronous operation of DCE is waiting the TD line sign change from high bit to low

bit than DCE pauses half of a bit time and start sampling the incoming data until all the

character has been completely transmit To maintain synchronimtion DCE always

sampling the incoming data string at middle ofeach bit

272 Data bits

The data bits are the bits that contain character Nonnallyone character contains eight

bits Hence is the data bits showing character Amiddot 4tH

l start bit 41----shy Data bits j

shy

I t I Io 0 0 0 0 0

1 1deg1 1

Figure 2h The Data bits Format ( 7 ]

273 Parity bits

Four basic fonns ofparity bits are NONE EVEN ODD MARK and SPACE NONE use

for transmits a character without parity bit EVEN parity use to indicate by send logic 1

after a character if there is an odd number of logic 1 bit after a character data bit

Otherwise logic for EVEN parity goes to zero Odd parity will indicate by sending logic

1 after a data of a character bits if there is an even number of logic 1 after a characters

data bits Otherwise logic for ODD parity goes to zero Mark is logic 1 parity bit after a

data character and SPACE is logic zero after the data character

11

274 Stop bits

The stop bit indicated the end of a character The serial device was always send logic 1

for stop bit

28 Data Transmit and Receive Process

281 Transmit of a character

Several steps take before characters are transmitting from processor to modem

For an example communication between processor and 8251A USART

First the processor configures UART according to the communication protocol

Second an instruction was send to UART and set the flag TxEN Next The processor

was send the character to the data buffer ofUART Then this data buffer transfer the

character to transmit buffer for preparation for transmission Once data buffer was

complete transfer the character and ready to receive a new character the TXRDY flag

will set When processor automatically write in data buffer TXRDY flag automatically

reset

Next RTS (Ready to Send)pin output pin ofUART will alerted by modem that the bits

are about to transmit RTS pin for UART is tie together with modem RTS pin while the

modem realizes about to receive character from UART CTS pin will activated Then the

character was automatically transfer to modem The internal flag TxEMPTY will set

once the character was completely transmit from UART to modem

282 Receive of a character

The process of data receiving was also take several sequence First processor configures

UART according to standard protocol Then to receive a character the processor sends a

12

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf
Page 14: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

bull Accessing Company database

bull Submit customer order

bull On-line information service

bull accessing Internet-surfing into Netscape

bull terminal mode- billinwregistration

The network ofData2Go by Celcomtradeas shown shy

Figure Ib Celcomtrade Data2Go Network 14 I

Software uses for this type ofnetwork are

bull Delrina WinFaxPro

bull Microsoft Mail

bull Netscape

bull Lotus Notes

13 The purpose of this paper

The main purpose of this project is to develop a useable technique that suitable for

sending data wireless via RS232 communication port The system component will consist

of a desktop computer that act as input device a standard RS232 interface a transceiver

for transmit and receive signal and a modify laser poniter The suggested system will be

3

set and tested in a point-to-point configuration As the figure show below the network

diagram stated shy

J -~HJj----tcooo ~ IEco~codl---=RS=232=--_~ Personal computer Signal RS232 Laser Transceiver RS2321aser Transceiver Personal computer

Figure lc The Simples point to point data communication via RS131laser transceiver

4

Cbapter2

RS-232 INTERFACE AND SERIAL COMMUNICATION

20 Overview

RS 232 Interface in a simple universal well knows data interface RS means

Recommended Standard1 The female connector attaches to Data Communication

Equipment and male connector attaches to Data Terminal Equipment Mostly today PCs

are equipped with two RS232 ports via COMI or COM2 The additional COM port

COM3 and COM4 required additional card

RS-232 defines 25-pin communication line Every line has their own function to

accessing data The configurations ofevery pin layout are show in figure 2a

Normally The ground signal refers to pin 7 Two computers can communicate by using a

null modem A null modem is a special made direct cable and connector It is functioning

like a modem but has limited transmission range Figure 2b illustrated the common

method to wiring a null modem Pin2 and pin3 are wire together and all the cables are

connect in such a way a modem simulated between two computers

The electrical characteristic define by RS232 as

(a) Total capacitance not less than 2500 pF

(b) (b) A binary high logic output lines is + 5to + 15 volts input lines is from +3

to + 15 volts

(c) A binary low logic output lines is from -5 to -15 volts input lines is from -3

to -15 volts

(d) output lines voltages -5 and +5 -3 and +3 volts for input lines are undefined

5

Shelld~ Secondary

tntnsmltted data Transmlttins

Signal element timlne (DCEoTE)

Secondary

Relcetver received data

Signal tlmlne(DCEoTE) Looak

Loopok Secondary

Request To8end

DTERudy

Rem_ Loopb8ok amp Signal Qua

Decmlctor RinS indicator

l reg

Transmitted Data

Request to Send

DCEReady

Rivedline 818nal Detector

Reserved (Testing)

Secondary Received Lne Signel Detector

Recetve Data

reg

Crto8ent

Signal Ground Comman RetUrn

reg Rrved (Testing)

Datas18nal

I 10

rate ct UnusedTnulSmitter signal Signed

element -f

timing (DTE-DCE) bull Tnt Mode 8eooundary~ 13 c

To8ent~

Figure 2a The RS232 pin configuration [81

Pin Number Line Line Pin Number

2 m m 2

3 RD RD 3

4 RTS RTS 4

5 CTS CTS 5

6 DSR---- DSR 6

7 Common 7

8 DCD DCD 8

20 DTR DTR 20

22 R1 R1 22

Figure 2b A Null Modem Configuration [8]

6

21 The Explanation For RS1Jl Pin Abbreviation

Hence is the detail ofeach line in DB9 and DB25 function

Clear to Send (CTS)

Data Carrier Detect (OCR)

Data Set Ready (DSR)

Data Terminal Ready (DTR)

Receive Data (RO)

Ring Indicator (RI)

Requested to Send (RTS)

Transmit Data (TD)

asserted (logic state 1) by DCE it is ready to receive data

logic state 1 whenever there is data link in progress

logic state 1 when DCE is ready to communicated withDTE

logic state 1 when DTE is ready to communicated withDCE

use by DCE to send data to DTE

logic 1 by DCE when a ring is detect

logic state 1 by DTE when it want to transmit data toDCE

Use by DTE to send data to DCE

Figure lc The Detail Explanation of Abbreviation [ 8]

22 UART

UART Universal Asynchronous Receiver Transmitter is a special hardware in RS232

serial interface It sometime called as Asynchronous Communication Element

Most of the new personal computer today is equip with 16450 and 16550 UART The

function ofUART chip is to convert the parallel data to a serial data format that enable a

serial communication between two computers The UART chip also uses to convert back

7

the serial bits to parallel bits format The operation of UART mostly control by one or

more register The process of read writes data to register are through input and output

ports Figure ld showing the address of a UART for COMI and COM4

The UART have FIFO or First in First out buffer FIFO bring the meaning as the first

data to enter the buffer are first to leave The function of buffer is to hold data temporary

before it was feed to the transmission medium The modem 16550A UART have16 bytes

FIFO This means 16 bytes can be writes to UART before anything was overwrite The

16550 UART was necessary for a high-speed communication under windows or

application running under window environment

Serial port Base Register Port Address

COM 1 3F8H COM2 2F8H COM3 3E8H COM3 2E8H

Figure ld The Serial Port Base Register Port [7 ]

23 Serial Communication

Serial communication is transmission of data over a serial interface one data bit at a time

In other word data are transfer through and forth over a single wire Therefore serial

communication is more cost effective than parallel communication RS232 is an example

for serial communication interface

24 Parallel Interface

Parallel communication is a way to sending more than one data at a time (normally eight

data bits) over to a parallel device or a Com Port For an example a computer will send

eight data bits of information to a parallel printer A very simple diagram of parallel

communication was present as Figure 2e The parallel interfaces require separated wire

8

------_------------__shyp

for sending separated data and therefor allowed faster and efficient data transmission On

the other hand to setting up a parallel communication network will be more costly than

serial communication network

1 Printer Interface

1 3 4 5 6 7 8

1 Computer Interface

2 3 4 5 6 7 8

Figure 2e A parallel Printer to Computer Interface [7 ]

25 Asynchronous and synchronous data

For two devices to communicate a way of synchronizing data must be set There are two

way ofdata formatting by using either asynchronous or synchronous

The synchronous operation is such a way that for each line data transmit it has a

separated clock to synchronous that data on a time of period For example data are

transfer once in each direction to and from the computer The synchronous data format

was show in figure 2f

While the asynchronous data is such a way that data are synchronous without clock

Each time the data are transmitting the receiver need to figure out how fast the data is

running The frame of asynchronous data has start and stops bit In another world the

frame always added with additional start and stop bit The asynchronous data format was

show in figure 2g

9

01100011100 o 1 1 1 11 0 0 0 0 001 0110 1 1 0

Unique Code

Continuous Block

Direction offlow

Figure 2f Synchronous data format I 8 ]

Start Stop d7 d6 d5 d4 d3 d2 dl dO Start

1 0 1 0 1 1 0 0I 1 I IMSB LSB

Start bit Stop bit1 Data-bits 1 I

r space mark mark space mark space mark mark space space

Serial Communication

Figure 2g Asynchronous Data Format Adopted form [8]

26 The Start Parity and Stop bits

For two machines to communicate to each other first thing both machines must agree on

the rate of speed for data transfer Second thing is the data must fonnatted for

synchronous or asynchronous operation Therefor for asynchronous operation the data

fonnatted in such a way that contains start and stop bit

271 Start bit

10

The TD line at interface device (Pin3) will go high when no data been transmit To start

transmit a data Transmit serial device will set TD line to low by means ofa start bit The

synchronous operation of DCE is waiting the TD line sign change from high bit to low

bit than DCE pauses half of a bit time and start sampling the incoming data until all the

character has been completely transmit To maintain synchronimtion DCE always

sampling the incoming data string at middle ofeach bit

272 Data bits

The data bits are the bits that contain character Nonnallyone character contains eight

bits Hence is the data bits showing character Amiddot 4tH

l start bit 41----shy Data bits j

shy

I t I Io 0 0 0 0 0

1 1deg1 1

Figure 2h The Data bits Format ( 7 ]

273 Parity bits

Four basic fonns ofparity bits are NONE EVEN ODD MARK and SPACE NONE use

for transmits a character without parity bit EVEN parity use to indicate by send logic 1

after a character if there is an odd number of logic 1 bit after a character data bit

Otherwise logic for EVEN parity goes to zero Odd parity will indicate by sending logic

1 after a data of a character bits if there is an even number of logic 1 after a characters

data bits Otherwise logic for ODD parity goes to zero Mark is logic 1 parity bit after a

data character and SPACE is logic zero after the data character

11

274 Stop bits

The stop bit indicated the end of a character The serial device was always send logic 1

for stop bit

28 Data Transmit and Receive Process

281 Transmit of a character

Several steps take before characters are transmitting from processor to modem

For an example communication between processor and 8251A USART

First the processor configures UART according to the communication protocol

Second an instruction was send to UART and set the flag TxEN Next The processor

was send the character to the data buffer ofUART Then this data buffer transfer the

character to transmit buffer for preparation for transmission Once data buffer was

complete transfer the character and ready to receive a new character the TXRDY flag

will set When processor automatically write in data buffer TXRDY flag automatically

reset

Next RTS (Ready to Send)pin output pin ofUART will alerted by modem that the bits

are about to transmit RTS pin for UART is tie together with modem RTS pin while the

modem realizes about to receive character from UART CTS pin will activated Then the

character was automatically transfer to modem The internal flag TxEMPTY will set

once the character was completely transmit from UART to modem

282 Receive of a character

The process of data receiving was also take several sequence First processor configures

UART according to standard protocol Then to receive a character the processor sends a

12

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf
Page 15: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

set and tested in a point-to-point configuration As the figure show below the network

diagram stated shy

J -~HJj----tcooo ~ IEco~codl---=RS=232=--_~ Personal computer Signal RS232 Laser Transceiver RS2321aser Transceiver Personal computer

Figure lc The Simples point to point data communication via RS131laser transceiver

4

Cbapter2

RS-232 INTERFACE AND SERIAL COMMUNICATION

20 Overview

RS 232 Interface in a simple universal well knows data interface RS means

Recommended Standard1 The female connector attaches to Data Communication

Equipment and male connector attaches to Data Terminal Equipment Mostly today PCs

are equipped with two RS232 ports via COMI or COM2 The additional COM port

COM3 and COM4 required additional card

RS-232 defines 25-pin communication line Every line has their own function to

accessing data The configurations ofevery pin layout are show in figure 2a

Normally The ground signal refers to pin 7 Two computers can communicate by using a

null modem A null modem is a special made direct cable and connector It is functioning

like a modem but has limited transmission range Figure 2b illustrated the common

method to wiring a null modem Pin2 and pin3 are wire together and all the cables are

connect in such a way a modem simulated between two computers

The electrical characteristic define by RS232 as

(a) Total capacitance not less than 2500 pF

(b) (b) A binary high logic output lines is + 5to + 15 volts input lines is from +3

to + 15 volts

(c) A binary low logic output lines is from -5 to -15 volts input lines is from -3

to -15 volts

(d) output lines voltages -5 and +5 -3 and +3 volts for input lines are undefined

5

Shelld~ Secondary

tntnsmltted data Transmlttins

Signal element timlne (DCEoTE)

Secondary

Relcetver received data

Signal tlmlne(DCEoTE) Looak

Loopok Secondary

Request To8end

DTERudy

Rem_ Loopb8ok amp Signal Qua

Decmlctor RinS indicator

l reg

Transmitted Data

Request to Send

DCEReady

Rivedline 818nal Detector

Reserved (Testing)

Secondary Received Lne Signel Detector

Recetve Data

reg

Crto8ent

Signal Ground Comman RetUrn

reg Rrved (Testing)

Datas18nal

I 10

rate ct UnusedTnulSmitter signal Signed

element -f

timing (DTE-DCE) bull Tnt Mode 8eooundary~ 13 c

To8ent~

Figure 2a The RS232 pin configuration [81

Pin Number Line Line Pin Number

2 m m 2

3 RD RD 3

4 RTS RTS 4

5 CTS CTS 5

6 DSR---- DSR 6

7 Common 7

8 DCD DCD 8

20 DTR DTR 20

22 R1 R1 22

Figure 2b A Null Modem Configuration [8]

6

21 The Explanation For RS1Jl Pin Abbreviation

Hence is the detail ofeach line in DB9 and DB25 function

Clear to Send (CTS)

Data Carrier Detect (OCR)

Data Set Ready (DSR)

Data Terminal Ready (DTR)

Receive Data (RO)

Ring Indicator (RI)

Requested to Send (RTS)

Transmit Data (TD)

asserted (logic state 1) by DCE it is ready to receive data

logic state 1 whenever there is data link in progress

logic state 1 when DCE is ready to communicated withDTE

logic state 1 when DTE is ready to communicated withDCE

use by DCE to send data to DTE

logic 1 by DCE when a ring is detect

logic state 1 by DTE when it want to transmit data toDCE

Use by DTE to send data to DCE

Figure lc The Detail Explanation of Abbreviation [ 8]

22 UART

UART Universal Asynchronous Receiver Transmitter is a special hardware in RS232

serial interface It sometime called as Asynchronous Communication Element

Most of the new personal computer today is equip with 16450 and 16550 UART The

function ofUART chip is to convert the parallel data to a serial data format that enable a

serial communication between two computers The UART chip also uses to convert back

7

the serial bits to parallel bits format The operation of UART mostly control by one or

more register The process of read writes data to register are through input and output

ports Figure ld showing the address of a UART for COMI and COM4

The UART have FIFO or First in First out buffer FIFO bring the meaning as the first

data to enter the buffer are first to leave The function of buffer is to hold data temporary

before it was feed to the transmission medium The modem 16550A UART have16 bytes

FIFO This means 16 bytes can be writes to UART before anything was overwrite The

16550 UART was necessary for a high-speed communication under windows or

application running under window environment

Serial port Base Register Port Address

COM 1 3F8H COM2 2F8H COM3 3E8H COM3 2E8H

Figure ld The Serial Port Base Register Port [7 ]

23 Serial Communication

Serial communication is transmission of data over a serial interface one data bit at a time

In other word data are transfer through and forth over a single wire Therefore serial

communication is more cost effective than parallel communication RS232 is an example

for serial communication interface

24 Parallel Interface

Parallel communication is a way to sending more than one data at a time (normally eight

data bits) over to a parallel device or a Com Port For an example a computer will send

eight data bits of information to a parallel printer A very simple diagram of parallel

communication was present as Figure 2e The parallel interfaces require separated wire

8

------_------------__shyp

for sending separated data and therefor allowed faster and efficient data transmission On

the other hand to setting up a parallel communication network will be more costly than

serial communication network

1 Printer Interface

1 3 4 5 6 7 8

1 Computer Interface

2 3 4 5 6 7 8

Figure 2e A parallel Printer to Computer Interface [7 ]

25 Asynchronous and synchronous data

For two devices to communicate a way of synchronizing data must be set There are two

way ofdata formatting by using either asynchronous or synchronous

The synchronous operation is such a way that for each line data transmit it has a

separated clock to synchronous that data on a time of period For example data are

transfer once in each direction to and from the computer The synchronous data format

was show in figure 2f

While the asynchronous data is such a way that data are synchronous without clock

Each time the data are transmitting the receiver need to figure out how fast the data is

running The frame of asynchronous data has start and stops bit In another world the

frame always added with additional start and stop bit The asynchronous data format was

show in figure 2g

9

01100011100 o 1 1 1 11 0 0 0 0 001 0110 1 1 0

Unique Code

Continuous Block

Direction offlow

Figure 2f Synchronous data format I 8 ]

Start Stop d7 d6 d5 d4 d3 d2 dl dO Start

1 0 1 0 1 1 0 0I 1 I IMSB LSB

Start bit Stop bit1 Data-bits 1 I

r space mark mark space mark space mark mark space space

Serial Communication

Figure 2g Asynchronous Data Format Adopted form [8]

26 The Start Parity and Stop bits

For two machines to communicate to each other first thing both machines must agree on

the rate of speed for data transfer Second thing is the data must fonnatted for

synchronous or asynchronous operation Therefor for asynchronous operation the data

fonnatted in such a way that contains start and stop bit

271 Start bit

10

The TD line at interface device (Pin3) will go high when no data been transmit To start

transmit a data Transmit serial device will set TD line to low by means ofa start bit The

synchronous operation of DCE is waiting the TD line sign change from high bit to low

bit than DCE pauses half of a bit time and start sampling the incoming data until all the

character has been completely transmit To maintain synchronimtion DCE always

sampling the incoming data string at middle ofeach bit

272 Data bits

The data bits are the bits that contain character Nonnallyone character contains eight

bits Hence is the data bits showing character Amiddot 4tH

l start bit 41----shy Data bits j

shy

I t I Io 0 0 0 0 0

1 1deg1 1

Figure 2h The Data bits Format ( 7 ]

273 Parity bits

Four basic fonns ofparity bits are NONE EVEN ODD MARK and SPACE NONE use

for transmits a character without parity bit EVEN parity use to indicate by send logic 1

after a character if there is an odd number of logic 1 bit after a character data bit

Otherwise logic for EVEN parity goes to zero Odd parity will indicate by sending logic

1 after a data of a character bits if there is an even number of logic 1 after a characters

data bits Otherwise logic for ODD parity goes to zero Mark is logic 1 parity bit after a

data character and SPACE is logic zero after the data character

11

274 Stop bits

The stop bit indicated the end of a character The serial device was always send logic 1

for stop bit

28 Data Transmit and Receive Process

281 Transmit of a character

Several steps take before characters are transmitting from processor to modem

For an example communication between processor and 8251A USART

First the processor configures UART according to the communication protocol

Second an instruction was send to UART and set the flag TxEN Next The processor

was send the character to the data buffer ofUART Then this data buffer transfer the

character to transmit buffer for preparation for transmission Once data buffer was

complete transfer the character and ready to receive a new character the TXRDY flag

will set When processor automatically write in data buffer TXRDY flag automatically

reset

Next RTS (Ready to Send)pin output pin ofUART will alerted by modem that the bits

are about to transmit RTS pin for UART is tie together with modem RTS pin while the

modem realizes about to receive character from UART CTS pin will activated Then the

character was automatically transfer to modem The internal flag TxEMPTY will set

once the character was completely transmit from UART to modem

282 Receive of a character

The process of data receiving was also take several sequence First processor configures

UART according to standard protocol Then to receive a character the processor sends a

12

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf
Page 16: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

Cbapter2

RS-232 INTERFACE AND SERIAL COMMUNICATION

20 Overview

RS 232 Interface in a simple universal well knows data interface RS means

Recommended Standard1 The female connector attaches to Data Communication

Equipment and male connector attaches to Data Terminal Equipment Mostly today PCs

are equipped with two RS232 ports via COMI or COM2 The additional COM port

COM3 and COM4 required additional card

RS-232 defines 25-pin communication line Every line has their own function to

accessing data The configurations ofevery pin layout are show in figure 2a

Normally The ground signal refers to pin 7 Two computers can communicate by using a

null modem A null modem is a special made direct cable and connector It is functioning

like a modem but has limited transmission range Figure 2b illustrated the common

method to wiring a null modem Pin2 and pin3 are wire together and all the cables are

connect in such a way a modem simulated between two computers

The electrical characteristic define by RS232 as

(a) Total capacitance not less than 2500 pF

(b) (b) A binary high logic output lines is + 5to + 15 volts input lines is from +3

to + 15 volts

(c) A binary low logic output lines is from -5 to -15 volts input lines is from -3

to -15 volts

(d) output lines voltages -5 and +5 -3 and +3 volts for input lines are undefined

5

Shelld~ Secondary

tntnsmltted data Transmlttins

Signal element timlne (DCEoTE)

Secondary

Relcetver received data

Signal tlmlne(DCEoTE) Looak

Loopok Secondary

Request To8end

DTERudy

Rem_ Loopb8ok amp Signal Qua

Decmlctor RinS indicator

l reg

Transmitted Data

Request to Send

DCEReady

Rivedline 818nal Detector

Reserved (Testing)

Secondary Received Lne Signel Detector

Recetve Data

reg

Crto8ent

Signal Ground Comman RetUrn

reg Rrved (Testing)

Datas18nal

I 10

rate ct UnusedTnulSmitter signal Signed

element -f

timing (DTE-DCE) bull Tnt Mode 8eooundary~ 13 c

To8ent~

Figure 2a The RS232 pin configuration [81

Pin Number Line Line Pin Number

2 m m 2

3 RD RD 3

4 RTS RTS 4

5 CTS CTS 5

6 DSR---- DSR 6

7 Common 7

8 DCD DCD 8

20 DTR DTR 20

22 R1 R1 22

Figure 2b A Null Modem Configuration [8]

6

21 The Explanation For RS1Jl Pin Abbreviation

Hence is the detail ofeach line in DB9 and DB25 function

Clear to Send (CTS)

Data Carrier Detect (OCR)

Data Set Ready (DSR)

Data Terminal Ready (DTR)

Receive Data (RO)

Ring Indicator (RI)

Requested to Send (RTS)

Transmit Data (TD)

asserted (logic state 1) by DCE it is ready to receive data

logic state 1 whenever there is data link in progress

logic state 1 when DCE is ready to communicated withDTE

logic state 1 when DTE is ready to communicated withDCE

use by DCE to send data to DTE

logic 1 by DCE when a ring is detect

logic state 1 by DTE when it want to transmit data toDCE

Use by DTE to send data to DCE

Figure lc The Detail Explanation of Abbreviation [ 8]

22 UART

UART Universal Asynchronous Receiver Transmitter is a special hardware in RS232

serial interface It sometime called as Asynchronous Communication Element

Most of the new personal computer today is equip with 16450 and 16550 UART The

function ofUART chip is to convert the parallel data to a serial data format that enable a

serial communication between two computers The UART chip also uses to convert back

7

the serial bits to parallel bits format The operation of UART mostly control by one or

more register The process of read writes data to register are through input and output

ports Figure ld showing the address of a UART for COMI and COM4

The UART have FIFO or First in First out buffer FIFO bring the meaning as the first

data to enter the buffer are first to leave The function of buffer is to hold data temporary

before it was feed to the transmission medium The modem 16550A UART have16 bytes

FIFO This means 16 bytes can be writes to UART before anything was overwrite The

16550 UART was necessary for a high-speed communication under windows or

application running under window environment

Serial port Base Register Port Address

COM 1 3F8H COM2 2F8H COM3 3E8H COM3 2E8H

Figure ld The Serial Port Base Register Port [7 ]

23 Serial Communication

Serial communication is transmission of data over a serial interface one data bit at a time

In other word data are transfer through and forth over a single wire Therefore serial

communication is more cost effective than parallel communication RS232 is an example

for serial communication interface

24 Parallel Interface

Parallel communication is a way to sending more than one data at a time (normally eight

data bits) over to a parallel device or a Com Port For an example a computer will send

eight data bits of information to a parallel printer A very simple diagram of parallel

communication was present as Figure 2e The parallel interfaces require separated wire

8

------_------------__shyp

for sending separated data and therefor allowed faster and efficient data transmission On

the other hand to setting up a parallel communication network will be more costly than

serial communication network

1 Printer Interface

1 3 4 5 6 7 8

1 Computer Interface

2 3 4 5 6 7 8

Figure 2e A parallel Printer to Computer Interface [7 ]

25 Asynchronous and synchronous data

For two devices to communicate a way of synchronizing data must be set There are two

way ofdata formatting by using either asynchronous or synchronous

The synchronous operation is such a way that for each line data transmit it has a

separated clock to synchronous that data on a time of period For example data are

transfer once in each direction to and from the computer The synchronous data format

was show in figure 2f

While the asynchronous data is such a way that data are synchronous without clock

Each time the data are transmitting the receiver need to figure out how fast the data is

running The frame of asynchronous data has start and stops bit In another world the

frame always added with additional start and stop bit The asynchronous data format was

show in figure 2g

9

01100011100 o 1 1 1 11 0 0 0 0 001 0110 1 1 0

Unique Code

Continuous Block

Direction offlow

Figure 2f Synchronous data format I 8 ]

Start Stop d7 d6 d5 d4 d3 d2 dl dO Start

1 0 1 0 1 1 0 0I 1 I IMSB LSB

Start bit Stop bit1 Data-bits 1 I

r space mark mark space mark space mark mark space space

Serial Communication

Figure 2g Asynchronous Data Format Adopted form [8]

26 The Start Parity and Stop bits

For two machines to communicate to each other first thing both machines must agree on

the rate of speed for data transfer Second thing is the data must fonnatted for

synchronous or asynchronous operation Therefor for asynchronous operation the data

fonnatted in such a way that contains start and stop bit

271 Start bit

10

The TD line at interface device (Pin3) will go high when no data been transmit To start

transmit a data Transmit serial device will set TD line to low by means ofa start bit The

synchronous operation of DCE is waiting the TD line sign change from high bit to low

bit than DCE pauses half of a bit time and start sampling the incoming data until all the

character has been completely transmit To maintain synchronimtion DCE always

sampling the incoming data string at middle ofeach bit

272 Data bits

The data bits are the bits that contain character Nonnallyone character contains eight

bits Hence is the data bits showing character Amiddot 4tH

l start bit 41----shy Data bits j

shy

I t I Io 0 0 0 0 0

1 1deg1 1

Figure 2h The Data bits Format ( 7 ]

273 Parity bits

Four basic fonns ofparity bits are NONE EVEN ODD MARK and SPACE NONE use

for transmits a character without parity bit EVEN parity use to indicate by send logic 1

after a character if there is an odd number of logic 1 bit after a character data bit

Otherwise logic for EVEN parity goes to zero Odd parity will indicate by sending logic

1 after a data of a character bits if there is an even number of logic 1 after a characters

data bits Otherwise logic for ODD parity goes to zero Mark is logic 1 parity bit after a

data character and SPACE is logic zero after the data character

11

274 Stop bits

The stop bit indicated the end of a character The serial device was always send logic 1

for stop bit

28 Data Transmit and Receive Process

281 Transmit of a character

Several steps take before characters are transmitting from processor to modem

For an example communication between processor and 8251A USART

First the processor configures UART according to the communication protocol

Second an instruction was send to UART and set the flag TxEN Next The processor

was send the character to the data buffer ofUART Then this data buffer transfer the

character to transmit buffer for preparation for transmission Once data buffer was

complete transfer the character and ready to receive a new character the TXRDY flag

will set When processor automatically write in data buffer TXRDY flag automatically

reset

Next RTS (Ready to Send)pin output pin ofUART will alerted by modem that the bits

are about to transmit RTS pin for UART is tie together with modem RTS pin while the

modem realizes about to receive character from UART CTS pin will activated Then the

character was automatically transfer to modem The internal flag TxEMPTY will set

once the character was completely transmit from UART to modem

282 Receive of a character

The process of data receiving was also take several sequence First processor configures

UART according to standard protocol Then to receive a character the processor sends a

12

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf
Page 17: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

Shelld~ Secondary

tntnsmltted data Transmlttins

Signal element timlne (DCEoTE)

Secondary

Relcetver received data

Signal tlmlne(DCEoTE) Looak

Loopok Secondary

Request To8end

DTERudy

Rem_ Loopb8ok amp Signal Qua

Decmlctor RinS indicator

l reg

Transmitted Data

Request to Send

DCEReady

Rivedline 818nal Detector

Reserved (Testing)

Secondary Received Lne Signel Detector

Recetve Data

reg

Crto8ent

Signal Ground Comman RetUrn

reg Rrved (Testing)

Datas18nal

I 10

rate ct UnusedTnulSmitter signal Signed

element -f

timing (DTE-DCE) bull Tnt Mode 8eooundary~ 13 c

To8ent~

Figure 2a The RS232 pin configuration [81

Pin Number Line Line Pin Number

2 m m 2

3 RD RD 3

4 RTS RTS 4

5 CTS CTS 5

6 DSR---- DSR 6

7 Common 7

8 DCD DCD 8

20 DTR DTR 20

22 R1 R1 22

Figure 2b A Null Modem Configuration [8]

6

21 The Explanation For RS1Jl Pin Abbreviation

Hence is the detail ofeach line in DB9 and DB25 function

Clear to Send (CTS)

Data Carrier Detect (OCR)

Data Set Ready (DSR)

Data Terminal Ready (DTR)

Receive Data (RO)

Ring Indicator (RI)

Requested to Send (RTS)

Transmit Data (TD)

asserted (logic state 1) by DCE it is ready to receive data

logic state 1 whenever there is data link in progress

logic state 1 when DCE is ready to communicated withDTE

logic state 1 when DTE is ready to communicated withDCE

use by DCE to send data to DTE

logic 1 by DCE when a ring is detect

logic state 1 by DTE when it want to transmit data toDCE

Use by DTE to send data to DCE

Figure lc The Detail Explanation of Abbreviation [ 8]

22 UART

UART Universal Asynchronous Receiver Transmitter is a special hardware in RS232

serial interface It sometime called as Asynchronous Communication Element

Most of the new personal computer today is equip with 16450 and 16550 UART The

function ofUART chip is to convert the parallel data to a serial data format that enable a

serial communication between two computers The UART chip also uses to convert back

7

the serial bits to parallel bits format The operation of UART mostly control by one or

more register The process of read writes data to register are through input and output

ports Figure ld showing the address of a UART for COMI and COM4

The UART have FIFO or First in First out buffer FIFO bring the meaning as the first

data to enter the buffer are first to leave The function of buffer is to hold data temporary

before it was feed to the transmission medium The modem 16550A UART have16 bytes

FIFO This means 16 bytes can be writes to UART before anything was overwrite The

16550 UART was necessary for a high-speed communication under windows or

application running under window environment

Serial port Base Register Port Address

COM 1 3F8H COM2 2F8H COM3 3E8H COM3 2E8H

Figure ld The Serial Port Base Register Port [7 ]

23 Serial Communication

Serial communication is transmission of data over a serial interface one data bit at a time

In other word data are transfer through and forth over a single wire Therefore serial

communication is more cost effective than parallel communication RS232 is an example

for serial communication interface

24 Parallel Interface

Parallel communication is a way to sending more than one data at a time (normally eight

data bits) over to a parallel device or a Com Port For an example a computer will send

eight data bits of information to a parallel printer A very simple diagram of parallel

communication was present as Figure 2e The parallel interfaces require separated wire

8

------_------------__shyp

for sending separated data and therefor allowed faster and efficient data transmission On

the other hand to setting up a parallel communication network will be more costly than

serial communication network

1 Printer Interface

1 3 4 5 6 7 8

1 Computer Interface

2 3 4 5 6 7 8

Figure 2e A parallel Printer to Computer Interface [7 ]

25 Asynchronous and synchronous data

For two devices to communicate a way of synchronizing data must be set There are two

way ofdata formatting by using either asynchronous or synchronous

The synchronous operation is such a way that for each line data transmit it has a

separated clock to synchronous that data on a time of period For example data are

transfer once in each direction to and from the computer The synchronous data format

was show in figure 2f

While the asynchronous data is such a way that data are synchronous without clock

Each time the data are transmitting the receiver need to figure out how fast the data is

running The frame of asynchronous data has start and stops bit In another world the

frame always added with additional start and stop bit The asynchronous data format was

show in figure 2g

9

01100011100 o 1 1 1 11 0 0 0 0 001 0110 1 1 0

Unique Code

Continuous Block

Direction offlow

Figure 2f Synchronous data format I 8 ]

Start Stop d7 d6 d5 d4 d3 d2 dl dO Start

1 0 1 0 1 1 0 0I 1 I IMSB LSB

Start bit Stop bit1 Data-bits 1 I

r space mark mark space mark space mark mark space space

Serial Communication

Figure 2g Asynchronous Data Format Adopted form [8]

26 The Start Parity and Stop bits

For two machines to communicate to each other first thing both machines must agree on

the rate of speed for data transfer Second thing is the data must fonnatted for

synchronous or asynchronous operation Therefor for asynchronous operation the data

fonnatted in such a way that contains start and stop bit

271 Start bit

10

The TD line at interface device (Pin3) will go high when no data been transmit To start

transmit a data Transmit serial device will set TD line to low by means ofa start bit The

synchronous operation of DCE is waiting the TD line sign change from high bit to low

bit than DCE pauses half of a bit time and start sampling the incoming data until all the

character has been completely transmit To maintain synchronimtion DCE always

sampling the incoming data string at middle ofeach bit

272 Data bits

The data bits are the bits that contain character Nonnallyone character contains eight

bits Hence is the data bits showing character Amiddot 4tH

l start bit 41----shy Data bits j

shy

I t I Io 0 0 0 0 0

1 1deg1 1

Figure 2h The Data bits Format ( 7 ]

273 Parity bits

Four basic fonns ofparity bits are NONE EVEN ODD MARK and SPACE NONE use

for transmits a character without parity bit EVEN parity use to indicate by send logic 1

after a character if there is an odd number of logic 1 bit after a character data bit

Otherwise logic for EVEN parity goes to zero Odd parity will indicate by sending logic

1 after a data of a character bits if there is an even number of logic 1 after a characters

data bits Otherwise logic for ODD parity goes to zero Mark is logic 1 parity bit after a

data character and SPACE is logic zero after the data character

11

274 Stop bits

The stop bit indicated the end of a character The serial device was always send logic 1

for stop bit

28 Data Transmit and Receive Process

281 Transmit of a character

Several steps take before characters are transmitting from processor to modem

For an example communication between processor and 8251A USART

First the processor configures UART according to the communication protocol

Second an instruction was send to UART and set the flag TxEN Next The processor

was send the character to the data buffer ofUART Then this data buffer transfer the

character to transmit buffer for preparation for transmission Once data buffer was

complete transfer the character and ready to receive a new character the TXRDY flag

will set When processor automatically write in data buffer TXRDY flag automatically

reset

Next RTS (Ready to Send)pin output pin ofUART will alerted by modem that the bits

are about to transmit RTS pin for UART is tie together with modem RTS pin while the

modem realizes about to receive character from UART CTS pin will activated Then the

character was automatically transfer to modem The internal flag TxEMPTY will set

once the character was completely transmit from UART to modem

282 Receive of a character

The process of data receiving was also take several sequence First processor configures

UART according to standard protocol Then to receive a character the processor sends a

12

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf
Page 18: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

21 The Explanation For RS1Jl Pin Abbreviation

Hence is the detail ofeach line in DB9 and DB25 function

Clear to Send (CTS)

Data Carrier Detect (OCR)

Data Set Ready (DSR)

Data Terminal Ready (DTR)

Receive Data (RO)

Ring Indicator (RI)

Requested to Send (RTS)

Transmit Data (TD)

asserted (logic state 1) by DCE it is ready to receive data

logic state 1 whenever there is data link in progress

logic state 1 when DCE is ready to communicated withDTE

logic state 1 when DTE is ready to communicated withDCE

use by DCE to send data to DTE

logic 1 by DCE when a ring is detect

logic state 1 by DTE when it want to transmit data toDCE

Use by DTE to send data to DCE

Figure lc The Detail Explanation of Abbreviation [ 8]

22 UART

UART Universal Asynchronous Receiver Transmitter is a special hardware in RS232

serial interface It sometime called as Asynchronous Communication Element

Most of the new personal computer today is equip with 16450 and 16550 UART The

function ofUART chip is to convert the parallel data to a serial data format that enable a

serial communication between two computers The UART chip also uses to convert back

7

the serial bits to parallel bits format The operation of UART mostly control by one or

more register The process of read writes data to register are through input and output

ports Figure ld showing the address of a UART for COMI and COM4

The UART have FIFO or First in First out buffer FIFO bring the meaning as the first

data to enter the buffer are first to leave The function of buffer is to hold data temporary

before it was feed to the transmission medium The modem 16550A UART have16 bytes

FIFO This means 16 bytes can be writes to UART before anything was overwrite The

16550 UART was necessary for a high-speed communication under windows or

application running under window environment

Serial port Base Register Port Address

COM 1 3F8H COM2 2F8H COM3 3E8H COM3 2E8H

Figure ld The Serial Port Base Register Port [7 ]

23 Serial Communication

Serial communication is transmission of data over a serial interface one data bit at a time

In other word data are transfer through and forth over a single wire Therefore serial

communication is more cost effective than parallel communication RS232 is an example

for serial communication interface

24 Parallel Interface

Parallel communication is a way to sending more than one data at a time (normally eight

data bits) over to a parallel device or a Com Port For an example a computer will send

eight data bits of information to a parallel printer A very simple diagram of parallel

communication was present as Figure 2e The parallel interfaces require separated wire

8

------_------------__shyp

for sending separated data and therefor allowed faster and efficient data transmission On

the other hand to setting up a parallel communication network will be more costly than

serial communication network

1 Printer Interface

1 3 4 5 6 7 8

1 Computer Interface

2 3 4 5 6 7 8

Figure 2e A parallel Printer to Computer Interface [7 ]

25 Asynchronous and synchronous data

For two devices to communicate a way of synchronizing data must be set There are two

way ofdata formatting by using either asynchronous or synchronous

The synchronous operation is such a way that for each line data transmit it has a

separated clock to synchronous that data on a time of period For example data are

transfer once in each direction to and from the computer The synchronous data format

was show in figure 2f

While the asynchronous data is such a way that data are synchronous without clock

Each time the data are transmitting the receiver need to figure out how fast the data is

running The frame of asynchronous data has start and stops bit In another world the

frame always added with additional start and stop bit The asynchronous data format was

show in figure 2g

9

01100011100 o 1 1 1 11 0 0 0 0 001 0110 1 1 0

Unique Code

Continuous Block

Direction offlow

Figure 2f Synchronous data format I 8 ]

Start Stop d7 d6 d5 d4 d3 d2 dl dO Start

1 0 1 0 1 1 0 0I 1 I IMSB LSB

Start bit Stop bit1 Data-bits 1 I

r space mark mark space mark space mark mark space space

Serial Communication

Figure 2g Asynchronous Data Format Adopted form [8]

26 The Start Parity and Stop bits

For two machines to communicate to each other first thing both machines must agree on

the rate of speed for data transfer Second thing is the data must fonnatted for

synchronous or asynchronous operation Therefor for asynchronous operation the data

fonnatted in such a way that contains start and stop bit

271 Start bit

10

The TD line at interface device (Pin3) will go high when no data been transmit To start

transmit a data Transmit serial device will set TD line to low by means ofa start bit The

synchronous operation of DCE is waiting the TD line sign change from high bit to low

bit than DCE pauses half of a bit time and start sampling the incoming data until all the

character has been completely transmit To maintain synchronimtion DCE always

sampling the incoming data string at middle ofeach bit

272 Data bits

The data bits are the bits that contain character Nonnallyone character contains eight

bits Hence is the data bits showing character Amiddot 4tH

l start bit 41----shy Data bits j

shy

I t I Io 0 0 0 0 0

1 1deg1 1

Figure 2h The Data bits Format ( 7 ]

273 Parity bits

Four basic fonns ofparity bits are NONE EVEN ODD MARK and SPACE NONE use

for transmits a character without parity bit EVEN parity use to indicate by send logic 1

after a character if there is an odd number of logic 1 bit after a character data bit

Otherwise logic for EVEN parity goes to zero Odd parity will indicate by sending logic

1 after a data of a character bits if there is an even number of logic 1 after a characters

data bits Otherwise logic for ODD parity goes to zero Mark is logic 1 parity bit after a

data character and SPACE is logic zero after the data character

11

274 Stop bits

The stop bit indicated the end of a character The serial device was always send logic 1

for stop bit

28 Data Transmit and Receive Process

281 Transmit of a character

Several steps take before characters are transmitting from processor to modem

For an example communication between processor and 8251A USART

First the processor configures UART according to the communication protocol

Second an instruction was send to UART and set the flag TxEN Next The processor

was send the character to the data buffer ofUART Then this data buffer transfer the

character to transmit buffer for preparation for transmission Once data buffer was

complete transfer the character and ready to receive a new character the TXRDY flag

will set When processor automatically write in data buffer TXRDY flag automatically

reset

Next RTS (Ready to Send)pin output pin ofUART will alerted by modem that the bits

are about to transmit RTS pin for UART is tie together with modem RTS pin while the

modem realizes about to receive character from UART CTS pin will activated Then the

character was automatically transfer to modem The internal flag TxEMPTY will set

once the character was completely transmit from UART to modem

282 Receive of a character

The process of data receiving was also take several sequence First processor configures

UART according to standard protocol Then to receive a character the processor sends a

12

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf
Page 19: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

the serial bits to parallel bits format The operation of UART mostly control by one or

more register The process of read writes data to register are through input and output

ports Figure ld showing the address of a UART for COMI and COM4

The UART have FIFO or First in First out buffer FIFO bring the meaning as the first

data to enter the buffer are first to leave The function of buffer is to hold data temporary

before it was feed to the transmission medium The modem 16550A UART have16 bytes

FIFO This means 16 bytes can be writes to UART before anything was overwrite The

16550 UART was necessary for a high-speed communication under windows or

application running under window environment

Serial port Base Register Port Address

COM 1 3F8H COM2 2F8H COM3 3E8H COM3 2E8H

Figure ld The Serial Port Base Register Port [7 ]

23 Serial Communication

Serial communication is transmission of data over a serial interface one data bit at a time

In other word data are transfer through and forth over a single wire Therefore serial

communication is more cost effective than parallel communication RS232 is an example

for serial communication interface

24 Parallel Interface

Parallel communication is a way to sending more than one data at a time (normally eight

data bits) over to a parallel device or a Com Port For an example a computer will send

eight data bits of information to a parallel printer A very simple diagram of parallel

communication was present as Figure 2e The parallel interfaces require separated wire

8

------_------------__shyp

for sending separated data and therefor allowed faster and efficient data transmission On

the other hand to setting up a parallel communication network will be more costly than

serial communication network

1 Printer Interface

1 3 4 5 6 7 8

1 Computer Interface

2 3 4 5 6 7 8

Figure 2e A parallel Printer to Computer Interface [7 ]

25 Asynchronous and synchronous data

For two devices to communicate a way of synchronizing data must be set There are two

way ofdata formatting by using either asynchronous or synchronous

The synchronous operation is such a way that for each line data transmit it has a

separated clock to synchronous that data on a time of period For example data are

transfer once in each direction to and from the computer The synchronous data format

was show in figure 2f

While the asynchronous data is such a way that data are synchronous without clock

Each time the data are transmitting the receiver need to figure out how fast the data is

running The frame of asynchronous data has start and stops bit In another world the

frame always added with additional start and stop bit The asynchronous data format was

show in figure 2g

9

01100011100 o 1 1 1 11 0 0 0 0 001 0110 1 1 0

Unique Code

Continuous Block

Direction offlow

Figure 2f Synchronous data format I 8 ]

Start Stop d7 d6 d5 d4 d3 d2 dl dO Start

1 0 1 0 1 1 0 0I 1 I IMSB LSB

Start bit Stop bit1 Data-bits 1 I

r space mark mark space mark space mark mark space space

Serial Communication

Figure 2g Asynchronous Data Format Adopted form [8]

26 The Start Parity and Stop bits

For two machines to communicate to each other first thing both machines must agree on

the rate of speed for data transfer Second thing is the data must fonnatted for

synchronous or asynchronous operation Therefor for asynchronous operation the data

fonnatted in such a way that contains start and stop bit

271 Start bit

10

The TD line at interface device (Pin3) will go high when no data been transmit To start

transmit a data Transmit serial device will set TD line to low by means ofa start bit The

synchronous operation of DCE is waiting the TD line sign change from high bit to low

bit than DCE pauses half of a bit time and start sampling the incoming data until all the

character has been completely transmit To maintain synchronimtion DCE always

sampling the incoming data string at middle ofeach bit

272 Data bits

The data bits are the bits that contain character Nonnallyone character contains eight

bits Hence is the data bits showing character Amiddot 4tH

l start bit 41----shy Data bits j

shy

I t I Io 0 0 0 0 0

1 1deg1 1

Figure 2h The Data bits Format ( 7 ]

273 Parity bits

Four basic fonns ofparity bits are NONE EVEN ODD MARK and SPACE NONE use

for transmits a character without parity bit EVEN parity use to indicate by send logic 1

after a character if there is an odd number of logic 1 bit after a character data bit

Otherwise logic for EVEN parity goes to zero Odd parity will indicate by sending logic

1 after a data of a character bits if there is an even number of logic 1 after a characters

data bits Otherwise logic for ODD parity goes to zero Mark is logic 1 parity bit after a

data character and SPACE is logic zero after the data character

11

274 Stop bits

The stop bit indicated the end of a character The serial device was always send logic 1

for stop bit

28 Data Transmit and Receive Process

281 Transmit of a character

Several steps take before characters are transmitting from processor to modem

For an example communication between processor and 8251A USART

First the processor configures UART according to the communication protocol

Second an instruction was send to UART and set the flag TxEN Next The processor

was send the character to the data buffer ofUART Then this data buffer transfer the

character to transmit buffer for preparation for transmission Once data buffer was

complete transfer the character and ready to receive a new character the TXRDY flag

will set When processor automatically write in data buffer TXRDY flag automatically

reset

Next RTS (Ready to Send)pin output pin ofUART will alerted by modem that the bits

are about to transmit RTS pin for UART is tie together with modem RTS pin while the

modem realizes about to receive character from UART CTS pin will activated Then the

character was automatically transfer to modem The internal flag TxEMPTY will set

once the character was completely transmit from UART to modem

282 Receive of a character

The process of data receiving was also take several sequence First processor configures

UART according to standard protocol Then to receive a character the processor sends a

12

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf
Page 20: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

------_------------__shyp

for sending separated data and therefor allowed faster and efficient data transmission On

the other hand to setting up a parallel communication network will be more costly than

serial communication network

1 Printer Interface

1 3 4 5 6 7 8

1 Computer Interface

2 3 4 5 6 7 8

Figure 2e A parallel Printer to Computer Interface [7 ]

25 Asynchronous and synchronous data

For two devices to communicate a way of synchronizing data must be set There are two

way ofdata formatting by using either asynchronous or synchronous

The synchronous operation is such a way that for each line data transmit it has a

separated clock to synchronous that data on a time of period For example data are

transfer once in each direction to and from the computer The synchronous data format

was show in figure 2f

While the asynchronous data is such a way that data are synchronous without clock

Each time the data are transmitting the receiver need to figure out how fast the data is

running The frame of asynchronous data has start and stops bit In another world the

frame always added with additional start and stop bit The asynchronous data format was

show in figure 2g

9

01100011100 o 1 1 1 11 0 0 0 0 001 0110 1 1 0

Unique Code

Continuous Block

Direction offlow

Figure 2f Synchronous data format I 8 ]

Start Stop d7 d6 d5 d4 d3 d2 dl dO Start

1 0 1 0 1 1 0 0I 1 I IMSB LSB

Start bit Stop bit1 Data-bits 1 I

r space mark mark space mark space mark mark space space

Serial Communication

Figure 2g Asynchronous Data Format Adopted form [8]

26 The Start Parity and Stop bits

For two machines to communicate to each other first thing both machines must agree on

the rate of speed for data transfer Second thing is the data must fonnatted for

synchronous or asynchronous operation Therefor for asynchronous operation the data

fonnatted in such a way that contains start and stop bit

271 Start bit

10

The TD line at interface device (Pin3) will go high when no data been transmit To start

transmit a data Transmit serial device will set TD line to low by means ofa start bit The

synchronous operation of DCE is waiting the TD line sign change from high bit to low

bit than DCE pauses half of a bit time and start sampling the incoming data until all the

character has been completely transmit To maintain synchronimtion DCE always

sampling the incoming data string at middle ofeach bit

272 Data bits

The data bits are the bits that contain character Nonnallyone character contains eight

bits Hence is the data bits showing character Amiddot 4tH

l start bit 41----shy Data bits j

shy

I t I Io 0 0 0 0 0

1 1deg1 1

Figure 2h The Data bits Format ( 7 ]

273 Parity bits

Four basic fonns ofparity bits are NONE EVEN ODD MARK and SPACE NONE use

for transmits a character without parity bit EVEN parity use to indicate by send logic 1

after a character if there is an odd number of logic 1 bit after a character data bit

Otherwise logic for EVEN parity goes to zero Odd parity will indicate by sending logic

1 after a data of a character bits if there is an even number of logic 1 after a characters

data bits Otherwise logic for ODD parity goes to zero Mark is logic 1 parity bit after a

data character and SPACE is logic zero after the data character

11

274 Stop bits

The stop bit indicated the end of a character The serial device was always send logic 1

for stop bit

28 Data Transmit and Receive Process

281 Transmit of a character

Several steps take before characters are transmitting from processor to modem

For an example communication between processor and 8251A USART

First the processor configures UART according to the communication protocol

Second an instruction was send to UART and set the flag TxEN Next The processor

was send the character to the data buffer ofUART Then this data buffer transfer the

character to transmit buffer for preparation for transmission Once data buffer was

complete transfer the character and ready to receive a new character the TXRDY flag

will set When processor automatically write in data buffer TXRDY flag automatically

reset

Next RTS (Ready to Send)pin output pin ofUART will alerted by modem that the bits

are about to transmit RTS pin for UART is tie together with modem RTS pin while the

modem realizes about to receive character from UART CTS pin will activated Then the

character was automatically transfer to modem The internal flag TxEMPTY will set

once the character was completely transmit from UART to modem

282 Receive of a character

The process of data receiving was also take several sequence First processor configures

UART according to standard protocol Then to receive a character the processor sends a

12

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf
Page 21: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

01100011100 o 1 1 1 11 0 0 0 0 001 0110 1 1 0

Unique Code

Continuous Block

Direction offlow

Figure 2f Synchronous data format I 8 ]

Start Stop d7 d6 d5 d4 d3 d2 dl dO Start

1 0 1 0 1 1 0 0I 1 I IMSB LSB

Start bit Stop bit1 Data-bits 1 I

r space mark mark space mark space mark mark space space

Serial Communication

Figure 2g Asynchronous Data Format Adopted form [8]

26 The Start Parity and Stop bits

For two machines to communicate to each other first thing both machines must agree on

the rate of speed for data transfer Second thing is the data must fonnatted for

synchronous or asynchronous operation Therefor for asynchronous operation the data

fonnatted in such a way that contains start and stop bit

271 Start bit

10

The TD line at interface device (Pin3) will go high when no data been transmit To start

transmit a data Transmit serial device will set TD line to low by means ofa start bit The

synchronous operation of DCE is waiting the TD line sign change from high bit to low

bit than DCE pauses half of a bit time and start sampling the incoming data until all the

character has been completely transmit To maintain synchronimtion DCE always

sampling the incoming data string at middle ofeach bit

272 Data bits

The data bits are the bits that contain character Nonnallyone character contains eight

bits Hence is the data bits showing character Amiddot 4tH

l start bit 41----shy Data bits j

shy

I t I Io 0 0 0 0 0

1 1deg1 1

Figure 2h The Data bits Format ( 7 ]

273 Parity bits

Four basic fonns ofparity bits are NONE EVEN ODD MARK and SPACE NONE use

for transmits a character without parity bit EVEN parity use to indicate by send logic 1

after a character if there is an odd number of logic 1 bit after a character data bit

Otherwise logic for EVEN parity goes to zero Odd parity will indicate by sending logic

1 after a data of a character bits if there is an even number of logic 1 after a characters

data bits Otherwise logic for ODD parity goes to zero Mark is logic 1 parity bit after a

data character and SPACE is logic zero after the data character

11

274 Stop bits

The stop bit indicated the end of a character The serial device was always send logic 1

for stop bit

28 Data Transmit and Receive Process

281 Transmit of a character

Several steps take before characters are transmitting from processor to modem

For an example communication between processor and 8251A USART

First the processor configures UART according to the communication protocol

Second an instruction was send to UART and set the flag TxEN Next The processor

was send the character to the data buffer ofUART Then this data buffer transfer the

character to transmit buffer for preparation for transmission Once data buffer was

complete transfer the character and ready to receive a new character the TXRDY flag

will set When processor automatically write in data buffer TXRDY flag automatically

reset

Next RTS (Ready to Send)pin output pin ofUART will alerted by modem that the bits

are about to transmit RTS pin for UART is tie together with modem RTS pin while the

modem realizes about to receive character from UART CTS pin will activated Then the

character was automatically transfer to modem The internal flag TxEMPTY will set

once the character was completely transmit from UART to modem

282 Receive of a character

The process of data receiving was also take several sequence First processor configures

UART according to standard protocol Then to receive a character the processor sends a

12

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf
Page 22: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

The TD line at interface device (Pin3) will go high when no data been transmit To start

transmit a data Transmit serial device will set TD line to low by means ofa start bit The

synchronous operation of DCE is waiting the TD line sign change from high bit to low

bit than DCE pauses half of a bit time and start sampling the incoming data until all the

character has been completely transmit To maintain synchronimtion DCE always

sampling the incoming data string at middle ofeach bit

272 Data bits

The data bits are the bits that contain character Nonnallyone character contains eight

bits Hence is the data bits showing character Amiddot 4tH

l start bit 41----shy Data bits j

shy

I t I Io 0 0 0 0 0

1 1deg1 1

Figure 2h The Data bits Format ( 7 ]

273 Parity bits

Four basic fonns ofparity bits are NONE EVEN ODD MARK and SPACE NONE use

for transmits a character without parity bit EVEN parity use to indicate by send logic 1

after a character if there is an odd number of logic 1 bit after a character data bit

Otherwise logic for EVEN parity goes to zero Odd parity will indicate by sending logic

1 after a data of a character bits if there is an even number of logic 1 after a characters

data bits Otherwise logic for ODD parity goes to zero Mark is logic 1 parity bit after a

data character and SPACE is logic zero after the data character

11

274 Stop bits

The stop bit indicated the end of a character The serial device was always send logic 1

for stop bit

28 Data Transmit and Receive Process

281 Transmit of a character

Several steps take before characters are transmitting from processor to modem

For an example communication between processor and 8251A USART

First the processor configures UART according to the communication protocol

Second an instruction was send to UART and set the flag TxEN Next The processor

was send the character to the data buffer ofUART Then this data buffer transfer the

character to transmit buffer for preparation for transmission Once data buffer was

complete transfer the character and ready to receive a new character the TXRDY flag

will set When processor automatically write in data buffer TXRDY flag automatically

reset

Next RTS (Ready to Send)pin output pin ofUART will alerted by modem that the bits

are about to transmit RTS pin for UART is tie together with modem RTS pin while the

modem realizes about to receive character from UART CTS pin will activated Then the

character was automatically transfer to modem The internal flag TxEMPTY will set

once the character was completely transmit from UART to modem

282 Receive of a character

The process of data receiving was also take several sequence First processor configures

UART according to standard protocol Then to receive a character the processor sends a

12

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf
Page 23: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

274 Stop bits

The stop bit indicated the end of a character The serial device was always send logic 1

for stop bit

28 Data Transmit and Receive Process

281 Transmit of a character

Several steps take before characters are transmitting from processor to modem

For an example communication between processor and 8251A USART

First the processor configures UART according to the communication protocol

Second an instruction was send to UART and set the flag TxEN Next The processor

was send the character to the data buffer ofUART Then this data buffer transfer the

character to transmit buffer for preparation for transmission Once data buffer was

complete transfer the character and ready to receive a new character the TXRDY flag

will set When processor automatically write in data buffer TXRDY flag automatically

reset

Next RTS (Ready to Send)pin output pin ofUART will alerted by modem that the bits

are about to transmit RTS pin for UART is tie together with modem RTS pin while the

modem realizes about to receive character from UART CTS pin will activated Then the

character was automatically transfer to modem The internal flag TxEMPTY will set

once the character was completely transmit from UART to modem

282 Receive of a character

The process of data receiving was also take several sequence First processor configures

UART according to standard protocol Then to receive a character the processor sends a

12

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf
Page 24: POINT TO POINT WIRELESS INFRARED LIGHT … to point wireless infrared light...Perbincangan kertas ini merangkumi asas-asas rangkaian telekommunikasi, piawaian RS232, kaedah pemodulatan

p

instruction to activated the RxE flag Next DART need to be alerted about the data going

to be transmitted DSR (Data Set Ready) will activated DSR pin of DART and modem

are tied together therefore when processor read this flags and realizes that the modem

has characters to be transmitted to DART Once DSR signal been set processor set DTR

(data terminal ready) to high And once DTR pin is asserted characters was

automatically transfer out from modem Once the characters is receive by DART it

formatted the data according to their start stop parity bits The RxRDY activated when a

character was completely receive

The bock diagram ofDART was show in ftgUre 2i

transmittedT~_B_r ~Mode Register

Transmit Register-~ I I data

I [_~~~J lt-~--r I

Receiver Register L~~~l-~~mmg =71 -_Rece~~I_v-e_r-B_-un_e=r=_-_ ~_romL--_

Devices and bullControl LogiC

l Internal Transmitter I Bus c-- ~ Clocking

--_______________rece_i_ve_r__lt=__-T Circuitary

Figure 2i USART Bloek Diagram [8 ]

28 COM Port setting

COM Port is the port that allowed computer to communicated with other device

such as modem or printer The standard personal computer normally has four

communications port COM 1 and COM 2 are assign for external port All the

13

  • goh yiaw boongpdf