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

Back to Subject List

Thread Closed: Issue successfully resolved

???
02/24/05 13:46
Read: times


 
#88326 - Polling
Responding to: ???'s previous message
Prashanta Man Shrestha said:
I stored a constant data like "TEST" in one of the 8951, which sends this data continously through its Tx pin.
Then I programmed the other 8951 to receive (polling) any kind of data on its Rx pin and then send the same received data throught its Tx pin (just like ping).

Most likely, the polling is your problem.

Think about it: it will take the receiving 8951 the same time to receive a character as the transmitting 8951 takes to send it.
The transmitting 8951 starts transmitting the next character immediately it has sent the previous one - but the receiving 8951 is not ready yet, because it still has to think about sending the character on to the PC!

Several options:
1. Put a delay between each transmitted character. The delay needs to be long enough to be absolutely 101% certain that the receiving 8951 will be ready - since you have no other way to determine this.

2. Invent some sort of protocol so that the receiving 8951 can confirm that it's received a character and is ready for the next.

3. Use interrupt-driven serial comms (do a search for "interrupt-driven")




List of 13 messages in thread
TopicAuthorDate
Multi 8951 Communication            01/01/70 00:00      
   Few questions            01/01/70 00:00      
      Really            01/01/70 00:00      
   Re:Few questions            01/01/70 00:00      
      Re-Few questions            01/01/70 00:00      
      T$%T?            01/01/70 00:00      
      Polling            01/01/70 00:00      
         yes, but...            01/01/70 00:00      
            maybe            01/01/70 00:00      
      finally it works            01/01/70 00:00      
         Any body can Help me            01/01/70 00:00      
            Nobody can help you!            01/01/70 00:00      
               Do a model            01/01/70 00:00      

Back to Subject List