Subject: Got my $30 fuel injection computer.
From: Rotary Engine
Date: 3/1/2007, 3:45 PM
To: AARotary Engine


Hi Doc,
Just got my $30 fuel injection computer from Peter Anderson.
Do you have a pdf file that gives a complete description
of the PICAXE BASIC programming language? In other words
the programming manual. I can't seem to find it on their
web site. I have a bunch of field-effect transistors to act
as fuel pump switches if you need one. As I recall they switch
30 amps at a couple of hundred volts. Will grab some
in the hanger today. I might have some Free Scale pressure
sensors as well. There is enough prototype area on this board
to hold the FET's and several pressure sensors.
-- 
Paul Lamar ...No rotor no motor.

I got mine late last week. I ordered two. They are both different than
yours. Will send pix later.

Try http://www.rev-ed.co.uk/picaxe.
It is under datasheets. They changed the web site yesterday.

I think you want picaxe_manual2.pdf. I am attaching that one. There are two
others, plus a lot of examples and tutorials.

The things I don't like about picaxe is that they require Windoze and BASIC.
I am considering the bare PIC; their software runs under Linux. They have
both BASIC and Gnu C.

I am going to try the picaxe and see if I can tolerate their version of
BASIC. Then I will have to decide if I am willing to load Windoze on my
laptop. I really don't want to have to continue to use Windoze! :)

Doc Custer
Retired Software Engineer and sometime Audiologist

Thanks Doc. I just got down loaded it last night on the suggestion
of Joe Berki.

That PICAXE BASIC compiler IMHO is wonderful for controller use.
Is the PIC BASIC compiler the same or as good or  are you going to
do it in ASM or C? I like ASM for real time as you have precise
control over the number of cycles any instruction takes to execute.
This stuff is pretty simple so ASM is not all that bad. I never
really bought in to C. The PICAXE boot loader is nice. I am not
sure PIC offers the same thing. Also some of the PICAXE BASIC
compiler code routines ar embedded along with the boot loader
code. The downloded code merely calls some of these routines.

I have resigned myself to the fact you can't always get
what your want so I keep an old Windoze computer around
and I have wheels on my office chair :) I also use a USB 4 gig
flash memory device for transferring files. Works like a charm
from Windoze to Linux but not so great in reverse.

Paul Lamar ...No rotor no motor.


ASM is fun, but not very productive.

As for C, I looked at the output of  the Gnu CC optimizing compiler. A
really, really, really good ASM programmer, given enough time, can do a
little better, but not much. For all practical purposes Gnu CC is as good as
it gets. At Bell Labs we used C to write time critical device drivers with!
C allows you to drop into ASM code in line. The device driver code typically
had a few lines of ASM at the beginning to set up the registers, etc. From
then on, it was all C.

My primary problem with BASIC is that it has no way to pass arguments to
subroutines (there are others). You have to use global variables. This makes
it hard to write reusable code. The Computer Science jargon is that BASIC
subroutines are tightly bound to the main program. If you can pass arguments
to subroutines, the subroutine is independent of the main program code and
variables so you can copy a subroutine with no changes from one program to
another. True, you can do the same in BASIC, but there are constraints on
variable names.

Boy, I sure do go on, don't I? :) Sorry about that. I will try to restrain
myself in the future.

Doc Custer
Retired Software Engineer and sometime Audiologist

I am no computer scientist by any stretch of the definition
but IMHO that leads to bloated code :) I forgot what they
called it... perhaps object oriented code or modular or some such.
Right after that was hyped 20 or so years ago I noticed program
exe files started getting larger and larger :) I don't think one
needs to worry about passing parameters for this small stuff. This
is like writing code on the back of an envelope :) After all how
many subroutines does one need for this simple stuff? Calling
subroutines also takes extra time while memory is cheap now a days.
One's biggest problem when writing this kind of real time stuff is
minimizing execution time. When I do it I just cut and paste
the routines when I need them.

Back in 1989-1991 I wrote a real time GPS driven moving map program
in Quick  Basic that ran fine on a DOS 386 with 64K of memory.
If you have an old DOS computer lying around I will send you
the source code and the FAA air port data base.
Windoze busted it because they did not allow direct access to
to the serial ports.

Paul Lamar ...No rotor no motor.

I think you are correct that for our situation: SMALL IS BEAUTIFUL. I
suspect multiple uCs, each doing their own small but essential job is the
way to go.

I think most of the bloat came from GUI requirements, not necessarily
Microsoft. The X window system also generates huge amounts of code.

The availability of cheap RAM and disk also contributed. Those developments
removed the requirement on software engineers (architects, designers &
programmers) to generate small systems. The result was predictable.

It is also true that object oriented code can lead to very large object
files, especially if written in C++, at least as of 1999. Back then just
getting correct code out of a C++ compiler was all that was being asked.

Object oriented code is useful in very large systems where even genius types
can be overwhelmed by the complexity.

Doc Custer
Retired Software Engineer and sometime Audiologist


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