| ??? 12/02/02 10:06 Read: times |
#33546 - RE: Simple 8052 O/S |
Thanks for the comments. I appreciate getting other ideas on this.
Right now I have 3 tasks - a serial in, a serial out and a task that handles user IO. But buffers between ISR's and the serial I/O tasks are only one byte, not enough as you say. The problem is really memory - if I move to 8052 I will then have plenty of memory to make some ring buffers and everything should be fine. I'm thinking about putting the serial out task (which is highest priority) in the ISR. This would get me down to 2 tasks. But then I need to make a way for a 'message out' to be initiated. At the moment, other tasks can just stick some bytes in the buffer and set a bit to trigger the sending task. Another thing that makes buffering necessary is that the serial in task has to get a complete message (3 bytes) before it can decide whether that byte should be echoed out or not. So some latency is inevitable. But it sounds like extra memory, ring buffers, and maybe an increase in clock speed (there is no reason not to) should fix things. |



