DIY-WB reading via unused input
Andrew Wakeling
zakariski at optushome.com.au
Sun Aug 26 14:26:47 GMT 2001
Hey y'all,
Quick query...
Yep, looks good.. except... shouldn't u be returning from ur additional piece of
code with a RTS (hex 39) return from Subroutine? instead of (JMP $D4CB ; JMP
back to where we cut into the code)
hmm... I remember something about when u make a jsr command, that the previous
address is push on to the stack to remember where u jumped off from...
I dunno, but this piece of code might be reseting the stack pointer every so
often....
Also, I'm not sure about this case, but be careful when using other variable
spaces for storing and transmitting voltages etc.. for instance, there might be
code which checks for fuel pump voltages etc... even if its not used in this
case...
Cheers,
Andrew
PS. Just my 2 cents.
Dig wrote:
> --- GMECM Digest <gmecm-digest-owner at diy-efi.org> >
> > > Here's an Idea!! hook it up to an extra PCM
> > input, and have the pcm
> > > table lookup the AFR(like it does volts to
> > whatever for MAP, temps, etc),
> > > put it in the aldl datastream and have your palm
> > > pilot display it for ya.
>
> Since everybody seems quite interested in this,
> figured
> I'd pass along a code patch that does the very thing.
> Box is a '749, code is the $58 BBZB SyTy.
>
> Basically, I used the fuel pump A/D that others have
> mentioned, filter it, and spit it out in the
> "Commanded
> AFR" field in the ALDL data. This gives you a scale of
> A/D counts from 0-255 / 10. I do the math manually
> from there... next phase will be to set up a LUT to
> take A/D counts and re-map them to "real" AFR. This
> will allow a human-readable reading on *any* scan
> tool.
>
> Usual disclaimers about blowing up you motor apply.
> I actually made the mistake of outputting AFR in the
> spark advance variable, could have been ugly.
>
> In the DIY-WB tradition, this code is not to be used
> for commercial purposes. I reserve the right to beat
> anyone using it as such with a piece of 3/4" heater
> hose that I have in my garage.
>
> -------------Begin Poorly commented code patch-----
> Tap in to the TPS A/D read, jump to 5v A/D read
> routine
>
> Add this line:
>
> 014c0 ac bd f5 b5 97 73 86 50 7e fd 00 97 52 96 46 13
>
> Was:
> d4c6 8650 LDAA #$50
> d4c8 bdf4b3 JSR GET_AD_VALUE
> d4cb 9752 STAA AD_THROT
>
> Becomes:
>
> d4c6 8650 LDAA #$50
> d4c8 bdfd00 JSR Additional_AD
>
> Change AFR desired addresses in data stream:
> Data displayed will be raw hex / 10.
>
> 7C0 = 01 a0
> 7DC = 01 a0
>
> 07c0 00 F5 00 a3 00 a5 00 a7 00 bc 00 bd 00 56 30 6c
>
> 07d0 00 6d 00 a4 00 b0 01 7e 00 a6 00 73 00 F5 00 af
>
>
> Add filter coef $C152 = $20.
>
> New code with filter:
> FD00:
>
> JSR $F4B3 ; jump to A/D routine, finish the TPS read
> PSH A ; we used to hook this code in.
> PSH B ; save it on the stack
> LDAA #$00 ;load A/D channel
> JSR $F4B3 ;call A/D routine
> STAA $01a0 ;store in unused RAM
> LDX $01a0 ;load unfiltered value
> LDAB $C152 ;load the filter coef.... I use $20
> JSR $F599 ;call the filter routine
> STD $01a0 ;store filtered value
> PUL A ; always PUL what thou hast PSHd, lest
> PUL B ; thy stack runneth over
> JMP $D4CB ; JMP back to where we cut into the code
>
> FD00:
> BD F4 B3 36 37 86 00 BD F4 B3 B7 01 a0 FE 01 a0 F6 C1
> 52 BD F5 99 FD 01 a0 32 33 7E D4 CB
>
> ----------------End poorly commented code patch-------
>
> There is at *least* 3 more unused A/D channels, that
> I can see. I've tried at least one other channel,
> and it works too.
>
> I've looked at ANHT, and it'll work for that too. The
> A/D read routines are in different places, as is the
> filter. You'll also have to find a different place
> for the code.
>
> I'm guessing pretty much and '730/'749 based code will
> be able to make a variation of this work. Don't even
> ask me about C3 boxes... they might have something,
> but I dunno where.
>
> Notes on useability.... it's fantastic. Having real
> AFR
> in time with RPM and MAP makes tuning kind of a no-
> brainer.
>
> Later,
>
> Dig
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
> ----------------------------------------------------------------------------
> To unsubscribe from gmecm, send "unsubscribe gmecm" (without the quotes)
> in the body of a message (not the subject) to majordomo at lists.diy-efi.org
----------------------------------------------------------------------------
To unsubscribe from gmecm, send "unsubscribe gmecm" (without the quotes)
in the body of a message (not the subject) to majordomo at lists.diy-efi.org
More information about the Gmecm
mailing list