??? 02/25/05 03:04 Read: times |
#88415 - finally it works Responding to: ???'s previous message |
Ok finally I got the whole system WORKING. This is what I did:
1. Recalculated the Timer Reload Value for 600bps (coz speed of TXission was not my concern) 2. Then I modified the programs in both the 8951s before it was: 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). Now I connect the Tx pin of the second 8951 to MAX232 and receive it on the PC using a terminal program. Changed it to: the first 51 (polls)waits for data from PC and once it receives the data it sends it to the second 51 which again sends it back to the PC through MAX232 3. Used telephone wires instead of normal breadboard wires The result of these two changes: I received the data that I send to the first 51 back from second 51 (I am using Terminal program by Br@y) Again one problem: I receive back the same data as long as I send a single ASCII value at a time. But if multiple ASCII values are sent at once, I receive back first few ASCIIs correctly while the later ones get jumbled up (I think SBUF gets overflowed here). Solution: 4. Used interrupt driven serial rx in the first 51 and store the received values from PC in a stack. Once the Rx interrupt is not triggered for about one second(i.e., when all the multiple ASCII are finished receiving) it sends them to the second 51. I also inserted a delay between the sends (from first 51 to second 51). The result of this change: Now multiple ASCII values can be circulated around the system. But the one second wait needs to be recalculated for the actual application or write somekind of comm. protocol. Conclusion: - calculate the timer reload value PROPERLY - compromise on speed of Txission for better communication - try to use interrupt driven serial comm - use a good serial comm program on PC like Terminal by Br@y Thanx for your suggestions |
Topic | Author | Date |
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 |