Return-Path: Received: from [24.25.9.100] (HELO ms-smtp-01-eri0.southeast.rr.com) by logan.com (CommuniGate Pro SMTP 4.3c3) with ESMTP id 820087 for flyrotary@lancaironline.net; Fri, 25 Mar 2005 10:07:11 -0500 Received-SPF: pass receiver=logan.com; client-ip=24.25.9.100; envelope-from=eanderson@carolina.rr.com Received: from edward2 (cpe-024-074-185-127.carolina.rr.com [24.74.185.127]) by ms-smtp-01-eri0.southeast.rr.com (8.12.10/8.12.7) with SMTP id j2PF6MLw008849 for ; Fri, 25 Mar 2005 10:06:24 -0500 (EST) Message-ID: <000a01c5314c$3ae55230$2402a8c0@edward2> From: "Ed Anderson" To: "Rotary motors in aircraft" References: Subject: One line of code Gotcha was [FlyRotary] Re: Bad Day Good Day Non-Rotary Date: Fri, 25 Mar 2005 10:06:32 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0007_01C53122.51CEE5D0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: Symantec AntiVirus Scan Engine This is a multi-part message in MIME format. ------=_NextPart_000_0007_01C53122.51CEE5D0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Ken, Jim.Ernest, Kevin, and others, Thanks to all you professional = programmers for your comments about my one line of code. I guess if the = professionals have also found that "one more line of code" gotcha, I = don't feel as "unprofessional". I can understand why if you did it for a living, it might lose its = charm factor. But, being an amateur - its a fascinating field that = enables you to design and make all sorts of fascinating devices - fairly = cheaply - compared to trying to do the same with an Analog design = approach.=20 My old analog EFI Fuel monitor I designed and built several years ago = worked just fine, but it could only provide fuel flow and fuel total. = Furthermore it had over 7 major chips (counters, gates, inverters) not = to mention the resistors and capacitors. It had a larger foot print = appro 3 x 6" and the components total cost was much more than a = microchip and its relative few supporting components. I tried 3 = different redesigns to give it more capability and finally decided it = was just too limiting for the amount of effort - so decided to jump into = the digital world. But, I will admit at times wrestling with the code, I was not certain I = had made the right choice to go digital. Fortunately after slowly = getting started with the assembly language coding, I found a Pascal = Compiler designed for the Microchip PIC chips - Heaven sent - I could = code in English (more or less), plus it a library of many of the basic = I/O functions I needed. However, it did not have floating point nor = even integer math operations larger than a word (2 byte) size. I was = dealing with numbers as large as 60,000,000 (clock counts). So I had = to write most of the math routines I needed in assembly including such = basic things as putting a decimal in a number at the right location. But, it was truly education (and I must admit very fun and satisfying = when it finally worked like I had designed it t). Going out this = morning with that offending line of code removed and the two modules I = have built test and retest. The only difference in the two modules is one has an LM9040 Lambda (O2) = amplifier and the other one just reads the voltage from the 02 sensor = directly - wanted to see if the LM9040 did anything for the Air Fuel = Indication - basically all it does is expand (amplify) the 0 -1volt O2 = sensor output to 0 -5 volts for the CMOS chip. I thought that might = provide more "sensitivity" through the chips A/D circuit - but as Tracy = commented why worry about sensitivity when we are just using it for a = "relative indication:. Actually, I have coded a screen that shows the O2 sensor output in volts = (millivolts), but decided that a visual indication of lean rich didn't = require any mental manipulation of the voltage to A/F, so went with a = visual indication on the LCD display. Onward! Ed Ed Anderson Rv-6A N494BW Rotary Powered Matthews, NC eanderson@carolina.rr.com =20 Ed ------=_NextPart_000_0007_01C53122.51CEE5D0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
 
Ken, Jim.Ernest, Kevin, and others, = Thanks to all=20 you professional programmers for your comments about my one line of = code. =20 I guess if the professionals have also found that "one more line of = code"=20 gotcha, I don't feel as "unprofessional".
 
 I can understand why if you did it for a living, it might = lose its=20 charm factor.  But, being an amateur - its a fascinating field = that=20 enables you to design and make all sorts of fascinating devices - fairly = cheaply=20 - compared to trying to do the same with an Analog design = approach. 
 
My old analog EFI Fuel monitor I designed and built several years = ago=20 worked just fine, but it could only provide fuel flow and fuel = total. =20 Furthermore it had over 7 major chips (counters, gates, inverters) = not to=20 mention the resistors and capacitors.  It had a larger foot print = appro 3 x=20 6" and the components total cost was much more than a microchip and its = relative=20 few supporting components. I tried 3 different redesigns to give it = more=20 capability and finally decided it was just too limiting for the amount = of effort=20 - so decided to jump into the digital world.
 
 But, I will admit at times wrestling with the code, I was not = certain=20 I had made the right choice to go digital.  Fortunately after = slowly=20 getting started with the assembly language coding, I found a Pascal = Compiler=20 designed for the Microchip PIC chips - Heaven sent - I could code in = English=20 (more or less), plus it a library of many of the basic=20 I/O functions I needed.  However, it did not have = floating point=20 nor even integer math operations larger than a word (2 byte) = size. I was=20 dealing with numbers as large as 60,000,000 (clock counts).  =  So=20 I had to write most of the math routines I needed in assembly including = such=20 basic things as putting a decimal in a number at the right = location.
 
But, it was truly education (and I must admit very fun and = satisfying when=20 it finally worked like I had designed it t).  Going out this = morning with=20 that offending line of code removed and the two modules I have built = test and=20 retest.
 
The only difference in the two modules  is one has an = LM9040=20 Lambda (O2) amplifier and the other one just reads the voltage from the = 02=20 sensor directly - wanted to see if the LM9040 did anything for the Air = Fuel=20 Indication - basically all it does is expand (amplify) the 0 -1volt O2 = sensor=20 output to 0 -5 volts for the CMOS chip. I thought that might provide = more=20 "sensitivity" through the chips A/D circuit - but as = Tracy commented why=20 worry about sensitivity when we are just using it for a "relative=20 indication:.
 
Actually, I have coded a screen that shows the O2 sensor = output in=20 volts (millivolts), but decided that a visual indication of lean rich = didn't=20 require any mental manipulation of the voltage to A/F, so went with a = visual=20 indication on the LCD display.
 
Onward!
 
Ed
 
 
 
 
Ed Anderson
Rv-6A N494BW Rotary=20 Powered
Matthews, NC
eanderson@carolina.rr.com
 
Ed
 
------=_NextPart_000_0007_01C53122.51CEE5D0--