??? 07/09/10 14:53 Read: times |
#177194 - re - real time system Responding to: ???'s previous message |
Michael Karas said: Both interrupts and timer dispatched state machines are used.
There really is no need for these pre-canned scheduler packages in most 8051 embedded systems.
What I do is design all my critical I/O to take place in either short interrupt service routines or timer dispatched state machines. I then use the mainline program to operate the connectivity algorithms that tie the I/Os together and make the embedded gadget "do its job". This mainline program is free to run any slow I/O as needed. I have built many a device in this manner even with mainline firmware running graphics LCDs and I2C peripherals and had no problems with performance. The mainline code is able to utilize ALL of the CPU band width that is not consumed by the various timer dispatched state machines and other interrupt routines. It is rare that I've had implementations where the mainline code has had less than 80-85 percent of the processor bandwidth even under the worst case conditions. And if the budget gets too close then just select an MCU with a higher clock frequency!! Michael Karas Difference is in mine the state machine is the mainline. What I am suggesting has the same effect, except that it is the background routine. Sorry, faster processor is out, the board is existing. I am interested in your code. Have you published it anywhere? Thanks Regards Johan Smit |