Serial Interface Experiment

1. Purpose 
To recognize the module and learn the serial port input and output configuration of the serial port. 
 
2. Basic Theory 
In the series we will learn how to open a port from PC to Device, serial module, and vice versa. In the series, we only have one chance to open the port in time. The module can only be membka serial port and enter the data, after the data is complete then the port will be sent directly closed. 
In this experiment, we will introduce a way to port membuaka / And also know how to work from the module through the device input and output board and the device's software using visual basic.

Serial PinOut pada konektor DB-25 & DB-9

D-Type-25 Pin No.

D-Type-9 Pin No.

Abbreviation

Full Name

Pin 2

Pin 3

TD

Transmit Data

Pin 3

Pin 2

RD

Receive Data

Pin 4

Pin 7

RTS

Request To Send

Pin 5

Pin 8

CTS

Clear To Send

Pin 6

Pin 6

DSR

Data Set Ready

Pin 7

Pin 5

SG

Signal Ground

Pin 8

Pin 1

CD

Carrier Detect

Pin 20

Pin 4

DTR

Data Transmit Ready

Pin 22

Pin 9

RI

Ring Indikator

 Port Address dan IRQ pada Serial

Name

Address

IRQ

COM 1

3F8

4

COM 2

2F8

3

COM 3

3F8

4

COM 4

2F8

3

 Command - command serial interface and functions: 

1. DTR (Data Terminal Ready) 
Serves to indicate when a modem will be used and DSR modem set up to identify that the modem is ready and already tersmbung connection. 
2. RTS (Request to Send) 
Work to set up so that the computer can send a request for approval. 
3. TxD (transmits data) 
Function to process data transmission. 
4. CTS (Clear To Send) 
Work unuk inform that the computer modem is ready to receive and send via the phone cable. 
5. DSR (Data Set Ready) 
To identify the DTR. When DTR drop oileh made the computer will cause the modem to be most lost. Once the modem is lost akan that DSR Low.
6. DCD (Data Carier Detect) 
7. RI (Ring Indicator) 
  
3. Equipment List 
1. Serial Port Module 
2. 16 - Channel Input Board 
3. 16 - Channel Output Board 
4. 1 unit computer program and Visual Basic 
  
  
  
4. Experiment Results 
In the Form in visual basic when clicked will change color going on bunderan of the first black to be merah.Apabila DTR and RTS and TxD black also black as well. 

5. Analysis and discussion 
After creating the form in the appropriate module ago Enter the following command in visual basic form: 
Private Sub Command1_Click () 
MSComm1.DTREnable = Not MSComm1.RTSEnable 
Check_Status 
End Sub 
  
Private Sub Command2_Click () 
MSComm1.RTSEnable = Not MSComm1.RTSEnable 
Check_Status 
End Sub 
Private Sub Command3_Click () 
MSComm1.Break = Not MSComm1.Break 
Check_Status 
End Sub 
  
Private Sub Check_Status () 
Then if MSComm1.Break 
Shape3.BackColor = & H80 
Else 
Shape3.BackColor = & HFF 
End If 
Then if MSComm1.RTSEnable 
Shape2.BackColor = & H80 
Else 
Shape2.BackColor = & HFF 
End If 
Then if MSComm1.DTREnable 
Shape1.BackColor = H80 & 
Else 
Shape1.BackColor = & HFF 
End If 
End Sub 

6. Conclusion 
1st On the serial data communication, data that is sent is longer. 
2. Serial port is usually used as tools for mengkoneksikan mouse, modem. 
3. serial communication can be used for a short distance away. For example using a cable modem with the phone. An important part of communication is a DB 9 serial and RS 232. DB 9 connector that is use to connect to the computer hardware. RS 232 is a purpose as a driver, which will convert the voltage from the hardware to comply with the voltage on the computer so that data can be legible.