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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/22/05 14:50
Read: times


 
#88155 - More on VB setup
Responding to: ???'s previous message
I assume that you have put a breakpoint on the
MSComm.Output = "A" + CHR$(13)
statement and that you do get to it.

I also assume that you have put a scope on the signal line and seen no signal. (just ensuring that the problem is within the PC and not because the receiver is not enabled on the 8051)

If this is the case, I think you should investigate the OnComm event which determines when the serial buffer is considered full and starts transmitting. I think the MSComm property you should be looking at is SThreshold.

Another property is the Handshaking property which determines whether you use the CTS/RTS signals (set to comNone for no handshaking).

Perhaps you could try sending data without receiving anything just to get the port to operate. I have taken this extract from my book so it should work- try it (obviously you will need to modify the UserForm object to your setup)

Sub Initiate()
Dim TransmitBuffer As String
With UserForm1.MSComm1
.CommPort = 1
.Handshaking = comNone
'no handshaking required
.Settings = "9600,N,8,2"
'set for 9600 baud, no parity, 8 bits, 2 stop bit
.DTREnable = True
.RTSEnable = True
End With
UserForm1.MSComm1.PortOpen = True
UserForm1.MSComm1.InputMode = comInputModeText
'text data
TransmitBuffer = "A" + Chr(13)
UserForm1.MSComm1.Output = TransmitBuffer
End Sub

Good Luck!
Aubrey

List of 24 messages in thread
TopicAuthorDate
8051 <-> RS232 comunication            01/01/70 00:00      
   VB to Microcontroller            01/01/70 00:00      
      Very Informative!            01/01/70 00:00      
         Language(s)?            01/01/70 00:00      
            Languages            01/01/70 00:00      
   Line buffering?            01/01/70 00:00      
      furthermore Russell Bull            01/01/70 00:00      
      Line buffering            01/01/70 00:00      
         buffer            01/01/70 00:00      
            Serial Comms and Visual Basic            01/01/70 00:00      
               Another URL            01/01/70 00:00      
                  MSComm config            01/01/70 00:00      
                     More on VB setup            01/01/70 00:00      
                        VB Setup            01/01/70 00:00      
                           Code for 8051/VB            01/01/70 00:00      
                              Thank you            01/01/70 00:00      
   MSDN            01/01/70 00:00      
   Flush your buffers            01/01/70 00:00      
   Stu            01/01/70 00:00      
      REN ???            01/01/70 00:00      
         REN !!            01/01/70 00:00      
   Hardware/software            01/01/70 00:00      
      Got a MAX232 or 1488/9 chip?            01/01/70 00:00      
         MAX232 and oscilloscope            01/01/70 00:00      

Back to Subject List