Subject: Something I just learned about real time and BASIC .
From: Rotary Engine
Date: 6/3/2010, 1:11 PM
To: AAA Put this in the To box

There is real time and then there is REAL TIME.
Controlling the fuel injection and the ignition
timing on a multi rotor or  multi cylinder engine requires
absolute control down to the nearest micro second.
One millionth of a second. You must know exactly
how long it takes to complete any instruction.

One of the strengths of ZBASIC and other BASICs is; it can
deal simply with floating point numbers (and other types
of numbers) in the range  of +/- 2 million.

Unfortunately an 8 bit computer needs four or more
memory locations to store numbers that large. Maybe
more. The computer must read those memory locations
one by one in the proper sequence.

If the computer receives a hardware interrupt
and is forced to go out and immediately do something else
while it is the process of reading the memory locations the
number could be garbled.

Now this could be just ZBasic. It could be a function
of the compiler. I am not sure but BASIC's running on
powerful computers with over 80 I/O pins are few and far
between so I am sticking with the Atmel and ZBasic.

So I decided to do the time critical stuff in hardware
such as trigger the ignition and determine the RPM  and
not worry about it.

Paul Lamar


-- 
The Rotary Engine NewsLetter. Powered by Linux.
ACRE NL web site. http://www.rotaryeng.net
Youtube key word PaulLamar2
Copyright 1998-2010 All world wide rights reserved.