DIY-WB reading via unused input

Scot Sealander Sealand at clarityconnect.com
Sun Aug 26 15:25:41 GMT 2001


Dig wrote:
 
> 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.

Your code patch will not work as you have written it here.  I would
guess that you have working code, but you must have written this after
the fact, just for the list.  I am not tearing it apart, just looking at
what you have written.


> 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.

Need help?

 
> -------------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

Right here you JSR to the routine "Additional_AD".  The end of that
routine has a JMP back into the code.  Needs an RTS at the end.

 
> Change AFR desired addresses in data stream:
> Data displayed will be raw hex / 10.
> 
> 7C0 = 01 a0

This line is not needed for most folks, see below.  It is not displayed
on DIACOM, but is usefull for other data loggers.  This 


> 7DC = 01 a0

Puts new filtered value in ALDL.


 
> 07c0  00 F5 00 a3 00 a5 00 a7 00 bc 00 bd 00 56 30 6c

This does not agree with the above line of putting '01A0' in 7C0.  It
has 00F5, which is not a stock value either.

 
> 07d0  00 6d 00 a4 00 b0 01 7e 00 a6 00 73 00 F5 00 af


This line also does not agree with the above 7DC = 01A0.
 
 
> 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

This STAA defeats the filter.  The filtered loc loaded next is $01A0,
and it is already loaded with the new raw value, as you just stored it! 
I assume you mean $00F5 for this line?


> 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

This last line has to be an RTS, not a JMP.  Or don't JSR to this
routine.

 
> 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


Scot Sealander
----------------------------------------------------------------------------
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