One of the really neat things about DOS Quick Basic for real
time programing is it has hardware interrupt capabilities.
In other words regardless of what the program is doing
it can be interrupted by an external electrical signal and forced
to run a sub program to deal with it. For example we could
interrupt the QB program every time the rotary hit TDC on
rotor one. At 7500 RPM this happens only 125 times a second.
A piece of cake for a PC processor that is 25 times as fast as
your average CPU found in a typical EFI system.
One trick is to use a USB to RS232 adapter and use the Clear
To Send signal as an input to QB from the crank angle sensor.
The QB command is: ON COM(1) GOSUB ServiceTDC
--------------------------------------------------------
I ran into a snag using ON COM.
The ON COM handler doesn't really tell you a lot about what
caused you to get there, just that a COM port event happened.
The best you can do is see what the last position written in
the buffer is using LOC , and try to pull that many characters
off using INPUT$.
The ON COM response appears pretty slow, as some times 3
characters can build up at 9600 baud before it responds.
It can take anywhere from .3 seconds to .1 seconds for ON COM to
work. That is 100 to 300 ms while the engine rotates once in
7 ms at 7500 RPM. Totally unworkable.
So I switched to Power Basic for DOS which is more or less
a clone of QB. Not quite as good a user interface IMHO but
not bad either and it is still being maintained.
Enhanced communications support. Support for COM1 through COM4 at up
to 115200 bps. Even support for non-standard addresses and IRQs as
well as 16550 FIFO support. This is 12 times faster or 8 ms. It is
likely PB can do hardware interrupts in some other way that is more
direct and that take full advantage of the speed of the processor.
We shall see.
Paul Lamar
--
The Rotary Engine NewsLetter. Powered by Linux.
ACRE NL web site.
http://www.rotaryeng.net
Youtube key word UTUBPLEASE
Copyright 1998-2009 All world wide rights reserved.