Subject: DOS quick basic fuel injection software
From: Rotary Engine
Date: 12/25/2009, 1:07 PM
To: AAA Put this in the To box

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.

------------------------------------------------------------
I just had the bright idea for implementing 31 high speed
external hard ware interrupts for our DOS-BASIC EFI system.
No more ON COM(x).

Both QB and PB have an ON KEY(xx) hardware interrupt.
Some of the key board keys implemented are F1, F11 and F12.
Key F11 could be rotor 1 TDC and F12 rotor 2 TDC.

Key boards are super cheap and they all have a single chip
computer inside that can detect a key switch closure and convert it to
a code and send that code to the mother board. We will build a
device that goes between the key board output connector and the
keyboard input connector on the mother board that sends out
the code. This will have 31 input lines and solid state switches
that in effect will close the 31 key switches.

The ON XXXXXX function in QB and PB check for this code automatically
between each normal instruction so it is super fast.

This is a major step forward for the use of DOS BASIC's for real time
hardware control. This is another idea from the old SuperKIM days
back in 1975 but I only had 8 hardware interrupts in those days.

Patent applied for.


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.