Ttelmah Guest
|
|
Posted: Thu May 26, 2005 8:50 am |
|
|
Send data, no problem, just use putc, and printf.
For receive, provided you can poll kbhit at a short enough interval, again no problem.
If you want to _receive_ RS232, and use the RS232 interrupts, the 'answer' will depend on the speed of your chip, and it's abilities. With a 18 family chip at 40MHz, you can use an interrupt at 50uSec, on the 'fast' interrupt, and if you keep the handler simple, and save as few registers as possible, the total time needed for this handler can be as low as 1-2uSec. As such, the normal interrupts, will hardly be affected at all. If you put the 50uSec event on the normal interrupts instead, the overhead will shoot up to perhaps 10uSec. Still possible, but remember that now there will also be this much 'jitter' in when the 50uSec interrupt will be handled.
If instead you want to do this on a 16 family at perhaps 20MHz, this starts to become hard, with it still being 'possible', but perhaps requiring your own int_global handler, which checks for the 50uSec event, after only saving the minimum registers, and then branches to a special handler, before handling the other events.
Best Wishes |
|