Subject: Code Warrior
From: Rotary Engine
Date: 7/13/2006, 6:20 PM
To: AAme

I got the 68HC908AB32 assembler/IDE up and running.
It is part of an (IDE) Integrated Development Environment
from FreeScale. An IDE is a fancy way of saying an editor is
included so you can click on "assemble" once you have written
or edited your code. Speeds things up from the old way
of using a separate editor. Its free.

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=CWX-HXX-SE&parentCode=68HC908GP32


It comes with a C and C++ compiler
but you don't have to use them if you don't want to.
There is an assembler in there as well.

I recommend the assembler as this (chart below) is all the
time you have to write code when you are doing a fuel injection
or ignition system.  You need to know exactly how long it is
going to take each instruction to  execute. With a C
compiler you are never really sure.

With the 8 MHz 68HC908AB32 it executes about four instruction
every micro second (One millionths of a second.)

Here is the chart of the time available to do things.
...........................................U-Seconds
RPM    RPS           Time    U-Seconds    Every 10 deg.
4000...66.666667...0.015000...15000.0.....416.7
4500...75.000000...0.013333...13333.3.....370.4
5000...83.333333...0.012000...12000.0.....333.3
5500...91.666667...0.010909...10909.1.....303.0
6000..100.000000...0.010000...10000.0.....277.8
6500..108.333333...0.009231....9230.8.....256.4
7000..116.666667...0.008571....8571.4.....238.1
7500..125.000000...0.008000....8000.0.....222.2
8000..133.333333...0.007500....7500.0.....208.3
8500..141.666667...0.007059....7058.8.....196.1
9000..150.000000...0.006667....6666.7.....185.2


It sometimes takes a hundred instructions to do something
useful so time is of the essence.

The MegaSquirt code was designed for piston engines so
there is some stuff in there that can be stripped out.
Smaller code is easier to understand and debug.

http://www.megasquirt.info/

Also there is a trade off with hardware. Hardware can
replace code. For example if you have one computer doing
the fuel injection and another doing the ignition
it is easier to write the code for two computers
rather than trying to do it all with one.

At 30 bucks for a complete computer this becomes very viable.
http://www.njqrp.org/digitalhomebrewing/index.html


Paul Lamar ...No rotor no motor.

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