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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/21/04 07:35
Read: times


 
#81604 - Delays
Responding to: ???'s previous message

If adding delays 'solves' the problem - that suggests that the Windows side is not processing the data fast enough - when you read from the serial buffer, you need to read as much as you can get then have you VB code pull it apart. Assuming 9600 baud, that's about 1char per 1mS - thus your message is 4mS long. If you grab the 4 characters,decode then update a graph or write to a file, then 4mS doesn't go too far! Try moving some windows and notice how the problem gets worse! Add network traffic,different speed machines etc and you get a very unreliable system. To prove that the data is backlogged, run the system for a few minutes to allow the backlog to happen, then stop the 8051 from sending - measure how long the Windows code still thinks there's data coming in - if it stops immediately - then there's no backlog.

A simple solution is to have the VB side send a character to tell the 8051 to send it's data back - a polled system. doing this, I would expect the reliability would be a lot better and much less system dependant. Add some data packetising method and the system will be significantly more robust. Welcome to the world of communications!

List of 23 messages in thread
TopicAuthorDate
Need help... MCU and PC communication            01/01/70 00:00      
   MCU & PC communication            01/01/70 00:00      
   I have the same problem            01/01/70 00:00      
   Need more help from this            01/01/70 00:00      
      I use ascii            01/01/70 00:00      
         Reply to Jose'            01/01/70 00:00      
   Fix the problem            01/01/70 00:00      
      To my helpers            01/01/70 00:00      
         Handshaking...            01/01/70 00:00      
         RETI            01/01/70 00:00      
   ascii ?            01/01/70 00:00      
   Handshaking and More !!            01/01/70 00:00      
      Delays            01/01/70 00:00      
         Thanks to all my helpers, problem solved            01/01/70 00:00      
         Delays            01/01/70 00:00      
            Delays            01/01/70 00:00      
               UART, mode 3            01/01/70 00:00      
                  The 9th bit is the parity for VB            01/01/70 00:00      
                     send data from mcu to pc            01/01/70 00:00      
                        Yes, but the 9th bit is the parity in VB            01/01/70 00:00      
                           9th bit lost by Windoze?            01/01/70 00:00      
                              9th bit is supported            01/01/70 00:00      
                                 32-bit MS Windows            01/01/70 00:00      

Back to Subject List