CLS
DIM PulWidth(255)
OPEN "maptab.csv" FOR INPUT AS #1
FOR ManAP = 1 TO 255
INPUT #1, pw
PulWidth(x) = pw
'PRINT PulWidth(x) 'debug purposes only
NEXT ManAP
This it. Most EFI systems use something like this.
It is called the look up table method.
I have generated a pulse width table in a spread sheet and stored it on
the HD.
The numbers are random right at the moment but later on they would be
adjusted
for the real world values.
The left column is the manifold press or mass air flow sensor value.
It is a number from 0 to 255. 255 being sea level air press or about 15 psi.
30 inches of Hg. That gives a resolution of .059 psi. There are 255
pulse width
to work with. They represent manifold pressures .059 psi apart. They are
in column 2.
It was Henry's idea to have the pulse width table in spread sheet form.
Everyone with
a spread sheet program can edit it.
The first thing the program does is read the spread sheet file off the
hard disk or USB stick
and load it into an array and then store it in random access memory.
Much quicker for the program to take in the manifold pressure and look up
the correct pulse width for the injectors when the data is in RAM.
The program reads the MAP sensor finds the correct pulse width and sends
that to the hardware PWM generator.
pulse width = PulWidth (manifold air pressure)
"PulWidth" is the name of the array.
Super simple.
Paul Lamar

