Yes, Paul, using logic chips you can certainly do a lot without resorting
to
programming. On the right was my first "Analog" EFISM with which I flew
with for years using the same Seg 7 display you mentioned using. The
"Analog" EFISM provided Air/Fuel Ratio, Fuel Flow and Total Fuel used.
On the left side of MVC-012F was my first primitive "Digital" EFISM (much
improved board design since then -see EIC_EFISM II Front ...), I went to
digital because the analog board just did not have the flexibility for all
the functions I wanted to add. So the transition to the "Dark -Digital"
side using the Microchip PIC series that you had recommended.
Ed
Edward L. Anderson
Anderson Electronic Enterprises LLC
305 Reefton Road
Weddington, NC 28104
http://www.andersonee.com
http://www.eicommander.com
I did not really like PIC assembly language.
I prefer chips like the 6502 and 68K.
Unfortunately they are almost gone but Megasquirt still uses them.
A good high level language makes that a moot point.
Something some one can actually read like BASIC.... unlike C
now used by Megasquirt :)
I am fond of ZBasic and Atmel chips now due to their very fast
compiled Basic. Makes programming ten or 20 times faster than
assembly and you can teach your kindergarten great grand child
how to program. :)
http://www.zbasic.net/
They still have a bit of problem with hardware interrupts.
I started using latched hardware interrupts in the early 1970's with
the 6502 Superkim board I designed and manufactured.
The computer chip world still has not implemented latched
hardware interrupts. It will probably happen after I die :)
Here is a rudimentary EFI timed injection system written in ZBasic.
Sub Main()
Call PutPin(12, zxOutputLow) ' pin 12 CAS 1 will be at logic zero
Call PutPin(13, zxOutputLow) ' pin 13 CAS 2 will be at logic zero
dim x as long
'check and wait for CAS. Polling. Not necessary with hardware int.
'do
for x = 0 to 3000000 'develop only
If (GetPin(12)=1) then
Call rotor1
end if
if (GetPin(13) = 1) then
Call rotor2
end if
'loop
next x 'develop only
end sub 'main
sub rotor1() 'it is 22 degrees BTDC
Call PutPin(14, zxOutputHigh) ' trigger ign rotor1
dim add1 as integer
dim add2 as single
dim add3 as single
add1 = GetADC(82) 'MAP sensor val must be an integer
add2 = CSng(add1)
add3 = add2/10.23
' prepare for 100Hz Fast PWM using channel 2
Call OpenPWM(3, 250.0, zxFastPWM) ' set the pulse width.
Call PWM(3, add3) ' generate PWM with the add3 value.
Debug.Print " = " & CStr(add3); 'send it out the USB port to the PC.
Call PutPin(14, zxOutputLow) ' turn off ign trigger
end sub 'rotor1
sub rotor2() 'it is 158 degrees ATDC stub.
'Debug.Print "rotor 2"
End Sub 'rotor2
Paul Lamar
I agree, tried assembly - but, it just took me too long to work out the
code for anything fairly complex - so I found a PIC Pascal Compiler that
does a nice job and has a nice IDE. Been using it ever since the company
put out its first alpha code on it - and get all upgrades free. It appears
my unorthodox programming method catches bugs that their testers miss and
apparently they figure its worth the price of the compiler upgrades. They
now have one for the 32 bit microchip series - but, just no justification
for me to switch from their 8 bit to the 32 bit to do what I need to have
done.
The company now also have C and Basic compilers - but, no reason for me to
switch at this stage. Tried C three times and just never found it lovable.
The PIC is a real bit-banger of a chip and if you get a single bit
incorrect, the entire program may not work, but a lot of capability in my
opinion.
Ed
Ed, when using those multiplexed 4 digit LED's did you notice a drop off
in brightness? Here is a counter kit that uses an Atmel processor to
multiplex the display and act as a counter.
Unfortunately it is limited to 100 counts per second I think.
at 8000 RPM we have
a count rate of 133.333 counts per second one pulse
per rev.
If we look at the 100 teeth on the flywheel the CPS rate
goes up to 13,333 at 8000 RPM.
On your
http://www.andersonee.com/ EFISM what is the update rate
when displaying the RPM? I assume you measure the elapsed time between
ignition events and divide that into a constant.
Example:
2000 RPM is 33.333 CPS or one rev in .03 second.
The computer can measure the time it takes to make
one RPM in seconds.
So to get RPM we need to reverse this process.
1/.03 = 33.333
33.333 X 60 = 2000 RPM.
At 8000 RPM it is 133.3333 CPS (Hertz) or one rev in
.0075 second.
1/.0075 = 133.3333
133.333 times 60 = 8000 RPM.
Is this correct? How many microseconds does it take the PIC to
divide the ignition period into 150?
BTW I have one of your EFISM but I would like a tach that was on view
all the time and not time shared with other parameters.
Paul Lamar
--
The Rotary Engine NewsLetter. Powered by Linux.
ACRE NL web site.
http://www.rotaryeng.net
Youtube key word PaulLamar2
Copyright 1998-2011 All world wide rights reserved.