??? 09/19/06 14:47 Read: times |
#124566 - Hmm Responding to: ???'s previous message |
Russ wrote:
"1. If your program is hanging up on the "while (!RI)" line, it seems very likely that you're simply not getting all the input data that you exepct. I'm not sure that converting to an interrupt driven system is going to fix the immediate problem. Also, if your program doesn't have anything else to do while it's waiting for input, and if you can always depend on that interrupt arriving, there's nothing at all wrong with polling for each character as you're doing currently." Russ, that is basically what's happening. My hope with the interrupt routine was that I could get the characters one at a time , be able to check certain values in the buffer I place them in, validate the string using the incoming checksum, and a few other things. But this way if I suddenly didn't get another byte when I'm wanting one, I could send a NAK to the other device and try the whole thing again. This would (hopefully) keep me from just getting stuck in a loop waiting for a byte that's never going to come. Does seem seem like the way to go? |