Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/08/04 15:04
Read: times


 
#68193 - 8051 -> mscomm1.input
Hi~
I'm trying to send data between PC and 51 using COM port (RS232).

The 8051 side has no problem because I've tested it with another 8051 (as receiver).

Private Sub Form_Load()
MSComm1.CommPort = 1
MSComm1.Settings = "1200,n,8,1"
MSComm1.RThreshold = 1
MSComm1.InputMode = comInputModeBinary
MSComm1.PortOpen = True
End Sub

Private Sub MSComm1_OnComm()
Dim sData As String
If MSComm1.CommEvent = comEvReceive Then
Cls
sData = MSComm1.Input
Print sData
End If
End Sub


After running the program above, VB print "????" or sometime "??" when the 8051 sends a number.

Can anyone point out what's wrong with my VB program? I've tried to find information about that on the web but it seems no one gets problem like this.

Stanley



List of 24 messages in thread
TopicAuthorDate
8051 -> mscomm1.input            01/01/70 00:00      
   RE: 8051 -> mscomm1.input            01/01/70 00:00      
   RE: 8051 -> mscomm1.input            01/01/70 00:00      
   RE: 8051 -> mscomm1.input            01/01/70 00:00      
      RE: 8051 -> mscomm1.input            01/01/70 00:00      
   RE: 8051 -> mscomm1.input            01/01/70 00:00      
   display wrong number            01/01/70 00:00      
      RE: display wrong number            01/01/70 00:00      
         RE: display wrong number            01/01/70 00:00      
            RE: display wrong number            01/01/70 00:00      
               so note for your vb            01/01/70 00:00      
               Still not working~..........            01/01/70 00:00      
                  RE: Still not working~..........            01/01/70 00:00      
                     This line:            01/01/70 00:00      
                     RE: Still not working~..........            01/01/70 00:00      
                        Okay~! but you email address is...?            01/01/70 00:00      
                           my email            01/01/70 00:00      
      RE: display wrong number            01/01/70 00:00      
         RE: display wrong number            01/01/70 00:00      
      RE: display wrong number            01/01/70 00:00      
   RE: 8051 -> mscomm1.input            01/01/70 00:00      
      RE: 8051 -> mscomm1.input            01/01/70 00:00      
   Whole new one            01/01/70 00:00      
   Cannot use on_comm            01/01/70 00:00      

Back to Subject List