| ??? 02/07/04 22:04 Read: times |
#64204 - RE: Circular buffers Responding to: ???'s previous message |
there a lot of devices which use some sort of technique that I'm looking for
such as some of mine To make this work "flawless" is relatively simple if you follow a few rules: 1) it must be full duplex such as RS232. 2) the offsets in the buffers must be type char, pointers is a no-no. 3) NOTHING besides storing/fetching chars to/from the respective buffers can take place in the ISR. 4) the RI ISR must have a priority high enough to be able to fetch chars well within a character time (1/(baud*10) 5) no transfer from receive to transmit can take place in an ISR 6) the TI section of the serial ISR process transmit with no concern for receive and vice versa. Some of the above rules can be broken, but breaking them will add complexity. If you need to, state which and why. If all the above rules are followed, it should work. If not, apply the rules and if iit still does not post the code and the glitch will be found. Erik |



