I just had another idea. They just keep coming :)
ZBasic has a structure called a "queue".
Look up queue on page 15 of ZBasic Language Reference Manual
and page 256 and 231 of ZBasic System Library
Reference Manual.
That is a storage area in RAM that temporarily
stores data. It is like a long warehouse with two doors.
One on each end. One guy with a fork lift stores
pallets into the back door. The floor has rollers and
the pallets roll toward the front door. Another guy
with a fork lift takes the pallets out of the front door.
If the back door guy is a faster worker than
the front door guy pallets will stack up in
the warehouse until the front door guy can
catch up. You only run the engine at 7500 RPM
for a few minutes.
Right now I am converting data to a string and
sending out half a dozen characters every
4 ms. What I need to do is store the data in
the queue and send out only one character every time
I get a trigger. That can be done much faster
needless to say.
An even better way is to key the number of characters
sent out to the RPM. High RPM fewer characters. Low RPM
more characters.
The eye can only detect so many character changes per
second anyway.
BTW Help wanted. You C programmer types could help.
Working together we can learn faster. What I need to
learn is the ZBasic hardware interrupt structure. You
could read it and paraphrase the info into Dick and Jane
language like I did with the queue. Page 116 of the
ZBasic Language Reference Manual.
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.