serial communication problem
excuse me, i am not very familiar with the concept of active x.
if by using vb6, i want to send command to my microprocessor,
let say if i press command button 1, this command will be sent to com port 2. and my microprocessor takes command from serial port to activate my output.
is there anything wrong with my source code??
Private Sun Form_Load()
With MSComm1
.CommPort=2
.Settings="9600,N,8,1"
.PortOpen=True]
End With
End Sub
Private Sub btnSend1_Click()
MSComm1.Output=txtSend.Text
End Sub
Private Sub btnSend2_Click()
MSComm1.Output=txtSend.Text
End Sub
Private Sub btnSend3_Click()
MSComm1.Output=txtSend.Text
End Sub
Private Sub btnSend4_Click()
MSComm1.Output=txtSend.Text
End Sub
Thanks.
Re: serial communication problem
.PortOpen=True] without a "]".
In principle the code is OK. Take a look at the handshaking of your comm-port. For testing connect CTS-RTS together and DTR-DSR-DCD together.
Set: “MSComm1.Handshaking=comNone”
After these tests enable the handshaking with your microprocessor.