Serial Port Input & Output Board

1. Trial Objectives 
1. To recognize the Serial Port Module 
2. Learning the configuration of input and output serial port with time control. 
3. Learn DCD, DSR and CTS. 
  
2. Basic Theory 
Serial Experiments In this, we will open the way mempeiajari with the timer port from a PC to serial device modules and vice versa. module can only open the serial port and enter the data, after the data is complete then the port will be sent directly, closed. With the timer adamaka we can determine akan Since we can send data from PC to Device. 
Delivery of data in this series we use the command below: 
DCD (Data Carier Detect) pengguaannya vary, but the DTE does not often used for the reception of data. 
DSR (DataSend Ready) is a general - purpose input, to tell the DTE that the DCE has been switched on and ready to work. 
CTS (Clear To Send) is a general - purpose input, hardware protocol that preceded delivery of the DTE to DCE 
DTR (Data Terminal Ready) as a useful indicator to show when the modem will be used and DSR modem set up to identify that the modem is ready and the connection is connected. 

  

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 

a) At the time set in the same ditimernya, the DTR will turn to red for a few seconds. At the time the lights turn on the EX-01 also changed in the D0, D1, D2 be up also. In the case at the ready Led Display on D1 & D2 
                   

5. Analysis and discussion 

Enter the following command on the Visual Basic

Private Sub Form_Load () 
If Not Then MSComm1.PortOpen 
MSComm1.PortOpen = True 
Else 
MsgBox ( "Port Is Use By Another Program") 
End If 
End Sub 
  
Private Sub Text1_KeyDown (Index As Integer, KeyCode As Integer, Shift As Integer) 
If KeyCode = 13 Then 
Text1 (Index). Text = Format (Text1 (Index). Text. "Hh: mm: ss") 
End If 
End Sub 
  
Private Sub Timer1_Timer () 
DIMM I As Integer 
Label1.Caption = Format (Time, "HH: Mm: Ss") 
For I = 0 To 4 
Check if (i). And Value (Label1.Caption Text = (i). Text) Then 
MSComm1.DTREnable = False 
Timer2.Enable = True 
End If 
Next i 
Then if MSComm1.DTREnable 
Shape1.BackColor = & H80 
Else 
Shape1.BackColor = & HFF 
End If 
End Sub 
  
Private Sub Timer2_Timer () 
MSComm1.DTREnable = True 
If MSComm1.DTREnableThen 
Shape1.BackColor = & H80 
Else 
Shape1.BackColor = & HFF 
End If 
Timer2.Enable = False 
End Sub 
In writing the command must be careful, because a little mistake at the time of entering the program can lead to menyalaPada when DTR is not ready then on Led Display D1 & D2 akan light (green). If at the time specified on the DTR and the data will be ready. When the timer set time D1, D2 & D0 akan up. Display form: 
  

  

  

6. Conclusion 

1. A little mistake at the time of entering the program can lead to DTR does not work. 

2. The module can only open the serial port and enter the data, after the data is complete then the port will be sent directly closed. 

3. Benefits compared to use of the serial port parallel port: 
1. In the communication with the cable length, the cable loss will not be a major problem of using parallel cable. Serial port transmit "1" on the voltage level -3 volt to -25 volt, whereas the parallel port transmit "0" at 0 volt voltage level and "1" on the 5 volt voltage level. 
2. The number of cables needed fewer, can only use 3 cable, which transmits the data channel, data channel and receive channel ground.