Subject: DOS quick basic fuel injection software
From: Rotary Engine
Date: 12/21/2009, 3:25 PM
To: AAA Put this in the To box



 Don't laugh. Dos
  has some real time advantages. XP will go into DOS mode. If it
  goes into DOS mode  it may be possible to do all sorts of real
  time  hardware stuff like fuel injection systems. Windows and
  Linux are multitasking which make them near useless for real time
  hardware stuff. Too much back ground house keeping going on.

  If it will run DOS it will probably run Quick Basic Compiler that
  can  access the USB ports directly as serial ports in real time. I
  run QB in XP all  the time.  Quick Basic has real time commands
  for directly controlling hard  ware including serial ports. It is
  small enough that I can email it to you. It  is very easy to
  learn. Many of us older computer users already know how to program
  in QB. I have tons of source code including a moving map program
  that takes in data from a GPS. UPS GPS receivers are available.One
  can buy a USB to parallel adapter kit that will out put 8 bits at
  a time with hand shaking. Each bit could control an injector. The
  key is what is  available USB as most note books or net books no
  longer have parallel printer ports.

  The other possibility is boot up DOS directly from a 3.5 inch
  floppy disk.

  I have a VIA EPIA PC mother board at the hanger that cost less
  than $90  with the processor on board with floppy connector. It
  has a PCI connector so a  4parallel port card can be bought at
  low cost and plugged in. The  combinations way more powerful
  than you need but the price is far far cheaper than some embedded
  systems that are designed for hard ware control. A fuel injection
  program can be written in minutes. The only thing missing is an  A
  to D.Of course any old mother board will work too.


http://www.via.com.tw/en/initiatives/empowered/pc3500_mainboard/index.jsp

  I'll get it up and running tomorrow with DOS and QB.

  Paul Lamar

 Make a folder  under 7 called QB1. Save this zip file to that folder.
 unzip it and delete the .zip file. Call up the command line. "cd"
  to the  qb1  folder with a successions of "cd". When you get there
  type qb on the commad  line and the qb program integrated
  development system will run. You will  come  up in the editor and
  you can run the the program directly from the editor  or  compile it
  from the editor. The help is self contained. The editor is smart
and will automatically correct a lot of your syntax errors. It is
  the  easiest  programming language ever written.

 type in this program:

 for x = 1 to 10
 print "craig"
 next
 exit

 A high speed data acq system is trivial to write.
 We are talking 1000's, of samples per second here.

 It could be as simple as this

 Start:
 data1= peek (xxxxx) 'where xxxxx is the address of the A to D
  hooked to  ' the parallel port.  print data1  goto start

 http://www.petesqbsite.com/sections/tutorials/zines/qboa/4-beginner.txt

 Paul Lamar

 Yes, package received. Thanks a bunch. This should be quite educational.
 When you talk about the bounces, there is an automatic security
  block on  Ford corporate servers that trashes all messages with .zip
  files  Probably something similar happened with your post to other
  members. This  address is  my personal box, so it comes right through.
 C. Smith

 -------------------------------------------------------------------

 Here it is my DOS QB EFI source code. Took me less time than I thought.

 For illustration purposes I limited the A to D to 2 bits or four
 possibilities. Same for the RPM so this is a crude system.
 I simulated reading the A to D by a keyboard entry of an integer number
 between 1 and 16.

 4 MAP readings  times 4 RPM readings is 16 so all we have is 16 different
 pulse widths. Consider the integer PW number of 60 as 6.0 ms.

 This of course could be expanded to a 8 bit A TO D in that case
  there would  be 8 x 8 or 64 pulse width numbers. That should be
  sufficient to get the  engine in the mixture ball park.

 The trade off here is a couple of hundred dollars worth of stock
  PC parts  compared to say something like a Megasquirt for easier
  programming. All  sort  of other things can be done with the full
  screen of course in terms of  displaying all sorts of other data.
  For example the screen could read out  the  real time value of the
  pulse width being used and the RPM. It could also  total the pulse
  widths and read out the GPH. It could also run my DOS-QB  based
  moving map software as I only need that data out of the GPS once per
second.

 A program to access the USB port from DOS would be a big plus.

 --------------------------------------------------

 I improved the program somewhat by separating the RPM and the MAF
  inputs to  make it a bit more realistic.

 I also added a pulse width generators as mPC hard ware does not
  come with  one.

 CLS
  INPUT "Input RPM "; RPM
 INPUT "Input MAP"; MAP
 position = RPM * MAP '"address" in the mixture table
  TYPE PWlist
 PW AS INTEGER
 END TYPE
  DATA ,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,
  FOR x = 0 TO position
 READ PW
  NEXT
 PRINT
  'pulse width generator
 PRINT "00000000";
  FOR y = 1 TO PW'delay up for  injector trigger.
 PRINT "1";
 NEXT y
  PRINT "00000000"  'take the pulse back down

 To change the mixture one modifies the numbers in the DATA line.
 This version is still 2 bits to keep it simple.
 3 bits would give us 7 combination each for RPM and MAF so the resolution
 would increase to 49 pulse widths.


 ----------------------------------------------------
 This makes the DOS-QB-EFI look much better.

  http://www.bootdisk.com/usb.htm

 All sorts of possibilities are opended up.
 Booting DOS from a USB stick would be ideal,
 No need for a fragile hard drive.
 Booting DOS from a small net book from a USB 3.5 floopy drive.
 USB to par. printer port for injector triggers.
 USB to RS232.

 ---------------------------------

 I wrote a short program to see how fast QB was in terms of instructions
 per second. This was QB running under Windows XP in a command window.
 This was my old HP notebook computer so I don't know how fast the
 processor is. My guess is 500 Mhz

 Here is the program
 CLS'clear screen
 PRINT TIME$'print the current time to the nearest second.
 FOR x = 1 to  9000000  'count up to nine million
 NEXT
 PRINT x
 PRINT TIME$

 The program completed in 3 second or 3 million QB instructions
 per second in interpreter mode. Plenty fast enough.

 With out compiling this program and disassembling the compiled
  code I don't  know how many machine level instructions were needed
  for each QB  instruction.  The compiled code size was 26K bytes. The
  compiled code took 8 seconds to  complete so something is strange.
  Compiled should be faster. I'll run the  same test on the stand
  alone DOS computer and report back.

 Paul Lamar

  http://www.cpuid.com/cpuz.php

  <http://www.cpuid.com/cpuz.phpThis will give you all the processor info.


As far as QB, I had
a course on it in the ninties when I was getting my BS.  We need to find an
inexpensive small computer that takes DOS. An outline of what hardware is
needed.  There seems to be QB sites on the web also.  I have a Timex around
here somewhere.

Joe Berki
Limo EZ

----------------------------------------------------------------

PC mother boards are getting smaller and cheaper real fast.
Here is a 6.5" by 6.5" Asus AT3N 74-5 I saw in Fry's today.
It will run DOS probably so it can be used in real time.
It is at least 25 times faster than the average run of
the mill single chip computer found in most EFI systems.
Cost was $160 with the processor.

Intel Atom Intel Atom
Clock rate 1.6 GHz
Data Bus Speed     533 MHz
RAM Installed (Max) 0 MB / 4 GB (max)
VGA
Ethernet
8  Hi-Speed USB


It is low technical risk as it is very simple and quick to program or change the program.

Paul Lamar

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