| ??? 12/13/02 07:34 Read: times |
#34360 - RI stops operating after time |
Hi all
I have an application that is basically dumb IO that's sits there on a RS485 bus and listens for a message that is addressed to it and then performs the command that is embedded in the message. Basically in the main() function I call a get frame function which in turn calls a get byte function (shown below) If a byte comes in the port then it is detected when RI becomes active, if it is in the middle of a meesage then it must occur within a certain time period to allow for intercharacter timeouts, (the length of the frame is embedded in the message) This all works well for a period of time and then I stop getting the RI becoming active when the byte comes in. I am not using the serial interrupts it is all polling driven. has anyone seen this before? any tips? any help is appreciated. Regards Marshall Brown The Receiving Function: byte GetByte(void) { byte c; word counter; Error = FALSE;//Clear Error Flag counter = 0; //Clear TimeOut counter while (!RI) { if(FrameStatus == STARTED)counter++; if(counter > 1000){Error = TRUE;return(0);} //Time for receiving 1 byte + 20% } c = SBUF; RI = 0; return(c); } |
| Topic | Author | Date |
| RI stops operating after time | 01/01/70 00:00 | |
| RE: RI stops operating after time | 01/01/70 00:00 | |
| RE: RI stops operating after time | 01/01/70 00:00 | |
| RE: RI stops operating after time | 01/01/70 00:00 | |
| RE: RI stops operating after time | 01/01/70 00:00 | |
| RE: RI stops operating after time | 01/01/70 00:00 | |
| RE: RI stops operating after time | 01/01/70 00:00 | |
| RE: RI stops operating after time | 01/01/70 00:00 | |
| RE: RI stops operating after time | 01/01/70 00:00 | |
RE: RI stops operating after time | 01/01/70 00:00 |



