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
Paul,
This is what a floating point processor / coprocessor does
for you; makes 'float' operations atomic. What you're seeing
is the compiler simulating floating point ops using integer
registers. You should try to stick with 'int' as much as possible.
I've been working on hanging the rad, oil cooler, relocated
oil filter, etc. Also been working on the exhaust manifold.
I purchased the RX8 exhaust flange from Mazdatrix, and was
disappointed to discover machining was required to correct
the alignment with the exhaust ports. I purchased some 321
0.060 stainless elbows and am experimenting with routing
configurations.
--Kenny A.
The Atmel does not have a math co processor.
The term "atomic" is interesting. It confuses the
heck out of me :)
"In ancient philosophy, an atom was the ultimate unit
of matter on which more complex views of material reality
were based. In computer programming, atomic describes a
unitary action or object that is essentially indivisible,
unchangeable, whole, and irreducible."
What does it mean in Dick and Jane language? :)
Me too on that RX8 exhaust flange. Lots of die grinding
required.
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.