Re-scaling MAT counts table $8D SAUJP

American Delco GM ECUs and PCMs, ALDL, OBD 1.5.
34blazer
Posts: 107
Joined: Mon Dec 31, 2012 4:54 am
cars: '85 S10 Blazer-GT3582R;7730 swap *in progress*
'86 Fiero SE-7730/S_AUJPV4
'87 Mustang GT-7703?S_AUJPV4
'97 Ram SS/T
Location: LasVegastan

Re-scaling MAT counts table $8D SAUJP

Post by 34blazer »

I wanted to be able to use more of the MAT counts table for better resolution, considering my max IAT temps maybe get to 140*F or 60*C on a hot vegas day. so i was just looking at the $8D hac and at L87FD i can see all the bytes.

-------------------------------------------------------------
; MAT COMP Vs MAT
; TABLE is MAT COMP COUNTS
;-------------------------------------------------------------
; VAL BIN MAT Deg c
;----------------------------------
L87FD: .byte 0x00 ;= 0, 0 -40
.byte 0x0C ;= 12, 12 -28
.byte 0x18 ;= 24, 24 -16
.byte 0x24 ;= 36, 36 - 4
.byte 0x30 ;= 48, 48 8
.byte 0x3C ;= 60, 60 20
.byte 0x48 ;= 72, 72 32
.byte 0x54 ;= 84, 84 44
.byte 0x60 ;= 96, 96 56
.byte 0x6C ;=108, 108 68
.byte 0x78 ;=120, 120 80
.byte 0x80 ;=128, 128 92
.byte 0x80 ;=128, 128 104
.byte 0x80 ;=128, 128 116
.byte 0x80 ;=128, 128 128
.byte 0x80 ;=128, 128 140
.byte 0x80 ;=128, 128 152
;

Now could i just open up hex editor and change each byte starting at, say, -12 or 0x0c and end at 72 or 0x48? Or would that mess up the checksum? i would change the XDF and ADX to match as well.

TIA! :punk:
Image


Image
User avatar
The1
Posts: 4694
Joined: Mon Jan 04, 2010 10:23 am

Re: Re-scaling MAT counts table $8D SAUJP

Post by The1 »

do you have a bin to look at, what is the 3 bytes before the table start?
34blazer
Posts: 107
Joined: Mon Dec 31, 2012 4:54 am
cars: '85 S10 Blazer-GT3582R;7730 swap *in progress*
'86 Fiero SE-7730/S_AUJPV4
'87 Mustang GT-7703?S_AUJPV4
'97 Ram SS/T
Location: LasVegastan

Re: Re-scaling MAT counts table $8D SAUJP

Post by 34blazer »

I think I understand. using the hex editor im looking at line 000007F0 the three values before 7FD are; BF, C1, C2
Attachments
Mat Loc.png
Mat Loc.png (270.67 KiB) Viewed 8278 times
Image


Image
User avatar
The1
Posts: 4694
Joined: Mon Jan 04, 2010 10:23 am

Re: Re-scaling MAT counts table $8D SAUJP

Post by The1 »

arh for 2D table the lookup routine will usually start with 0 and max of 255 or 0-5volt input, hence why 2D tables cover the whole scope of the MAT sensor. So unless you know how your 2D lookup routine works then it can't be done.

The 3 bytes before the start of the table depending on the lookup routine can be what sets the table spacing or starter offset. In your case since the table is starting from 0 reading of your sensor -40 and there is no 00 hex your 2D lookup routine does not support this.

Do you have any 2D tables that do not cover the whole scope?
34blazer
Posts: 107
Joined: Mon Dec 31, 2012 4:54 am
cars: '85 S10 Blazer-GT3582R;7730 swap *in progress*
'86 Fiero SE-7730/S_AUJPV4
'87 Mustang GT-7703?S_AUJPV4
'97 Ram SS/T
Location: LasVegastan

Re: Re-scaling MAT counts table $8D SAUJP

Post by 34blazer »

The1 wrote:arh for 2D table the lookup routine will usually start with 0 and max of 255 or 0-5volt input, hence why 2D tables cover the whole scope of the MAT sensor. So unless you know how your 2D lookup routine works then it can't be done.

The 3 bytes before the start of the table depending on the lookup routine can be what sets the table spacing or starter offset. In your case since the table is starting from 0 reading of your sensor -40 and there is no 00 hex your 2D lookup routine does not support this.

Do you have any 2D tables that do not cover the whole scope?

bear with me im just beginning to understand how this works, and thank you for your help! heres the 2D table showing MAT counts and the inverse lookup table, 7FD-81E. do I need to be looking at the disassembled hac or the hex editor to identify the 3 bytes?
Attachments
2D MAT.png
2D MAT.png (272.66 KiB) Viewed 8271 times
Image


Image
User avatar
The1
Posts: 4694
Joined: Mon Jan 04, 2010 10:23 am

Re: Re-scaling MAT counts table $8D SAUJP

Post by The1 »

the 3 bytes before the table will most likely be the end of the last table or are scalars.

you will need to find your 2d lookup routine in a disassembled code, perhaps like holden there are multiple types of 2d lookup routines, you will then have to find the code that looks up the MAT table and change it to another lookup routine that does support spacing or offset.
34blazer
Posts: 107
Joined: Mon Dec 31, 2012 4:54 am
cars: '85 S10 Blazer-GT3582R;7730 swap *in progress*
'86 Fiero SE-7730/S_AUJPV4
'87 Mustang GT-7703?S_AUJPV4
'97 Ram SS/T
Location: LasVegastan

Re: Re-scaling MAT counts table $8D SAUJP

Post by 34blazer »

The1 wrote:the 3 bytes before the table will most likely be the end of the last table or are scalars.

you will need to find your 2d lookup routine in a disassembled code, perhaps like holden there are multiple types of 2d lookup routines, you will then have to find the code that looks up the MAT table and change it to another lookup routine that does support spacing or offset.
the last 3 bytes are the end of the extended VE table.

is this what you are talking about?
; **************************************************
; * MAT TABLE FOR 1K PU
; * 17 LINE TABLE
; * (ORG 0xF12B IN ANHT)
; **************************************************
; - VAL TEMP DEG C A/D (INV) NOT DONE YET
; -----------------------------
LF133: .byte 0x00 ; = ??? 143 0 (151 DEG = 1)
.byte 0x2A ; = 215 121 6
.byte 0x3D ; = 155 76 22
.byte 0x4B ; = 132 59 38
.byte 0x55 ; = 117 48 54
.byte 0x5F ; = 106 39 70
.byte 0x67 ; = 97 32 86
.byte 0x6F ; = 88 26 102
.byte 0x78 ; = 81 21 118
.byte 0x80 ; = 74 15 134
.byte 0x89 ; = 67 10 150
.byte 0x94 ; = 60 5 166
.byte 0xA1 ; = 52 - 1 182
.byte 0xB0 ; = 44 - 7 198
.byte 0xC7 ; = 34 -14 214
.byte 0xE3 ; = 22 -24 230
.byte 0xFF ; = 00 -40 246
;---------------------------------------------------------------
Image


Image
User avatar
The1
Posts: 4694
Joined: Mon Jan 04, 2010 10:23 am

Re: Re-scaling MAT counts table $8D SAUJP

Post by The1 »

that's a reference table for the sensor so that you get the correct output X Counts = X Degrees

So you would need to change the counts instead of going 0-255 you may want 60-132 then you'l need to calculate what temperature it would be at each step and respread the steps out evenly. Obviously you would need to change all tables to the same that use MAT

I notice it says 1K So there maybe other tables for reference as well.
34blazer
Posts: 107
Joined: Mon Dec 31, 2012 4:54 am
cars: '85 S10 Blazer-GT3582R;7730 swap *in progress*
'86 Fiero SE-7730/S_AUJPV4
'87 Mustang GT-7703?S_AUJPV4
'97 Ram SS/T
Location: LasVegastan

Re: Re-scaling MAT counts table $8D SAUJP

Post by 34blazer »

i figured all other tables that use MAT would need to be rescaled as well. i dont know what 1K pullup is but there is a bit to select the inverse lookup table (for external IAT/MAT) or else use the MAT counts table by itself(for manifold mounted MAT). im using an open element IAT in the intake tube prior to the TB. do you know what this could mean?(see below)


*also, i have this writeup from another member that explains the logic. i can kinda understand it but not that well yet, still a beginner. attached...
;------------------------------------------------
; LINIEARIZE A/D MAT, MAT TABLE FOR 1K PU
; 17 LINE TBL
;------------------------------------------------
LD7C3: ldaa *L0061 ; MAT A/D VAL (INVERTED) ; CRef: 0xD764,0xD7B2
ldx #LF133 ; INDEX MAT LINEARITY TABLE (Is #0xLF12B in ANHT)
jsr LE3D8 ; 2D LOOK UP, NO OFF SET (Is LE3D0 in ANHT)
staa *L0063 ; INV A/D MAT
brset *L00FE,#0x08,LD7E2 ; BR IF b3, START UP DELAY OVER (Goes to LD7DA in ANHT)
; (PID) IAC MODE WORD #2
; ... else
;
; CK AFR OPT WD 3, 0101 0010
; b0, 1 = COOL FOR IDLE SPD TIME OUT
;
ldaa L8018 ; AFR OPT WORD 3
rora ;
bcs LD7E2 ; BR IF (Goes to LD7DA in ANHT)
; .... else
;--------------------------------------------------
Attachments
Compute Scaled MAT L00D6.doc
(559.5 KiB) Downloaded 374 times
Image


Image
User avatar
The1
Posts: 4694
Joined: Mon Jan 04, 2010 10:23 am

Re: Re-scaling MAT counts table $8D SAUJP

Post by The1 »

some sensors switch resistors to gain scale, so if it's using the 1k line then it will reference that table.
Post Reply