Third Generation F-Body Message Boards

Third Generation F-Body Message Boards (https://www.thirdgen.org/forums/)
-   DIY PROM (https://www.thirdgen.org/forums/diy-prom/)
-   -   CCR and LDAx (https://www.thirdgen.org/forums/diy-prom/337518-ccr-ldax.html)

Z69 12-24-2005 05:38 PM

CCR & the IAC
 
Code:

;///////////////////////////////////////////////////////////////////
AXCN IAC stuff
AXCN addresses before ;
LE72E:        ldab        L0111      ; REQUESTED IAC MOTOR STEPS
        lslb                  ; mult x 2 to set z & c flag
        beq        LE781              ; br to ck b3 IAC MW L00FD, START UP DELAY DONE- if req'd IAC is zero or >=128
                              ; else                  ^(br LE769: in AUJP)^
        dec        L0111              ; REQUESTED IAC MOTOR STEPS (-1)
        ******** Diff from here down in AUJP- code added from axcn******************
        ldab        *L002B        ; CURRENT IAC POSITION (carry flag unchanged)
        bcc        LE753              ; br if carry flag clear from lslb (true if accb was 1 to 127)
                              ; else
        brclr        *L003A,#0x10,LE748 - bit 4 IAC pos has changed bit
        brset        *L003A,#0x20,LE748 - bit 5 IAC pos is decreasing???
        inc        L0111              ; REQUESTED IAC MOTOR STEPS +1
        bra        LE7A8              ; go do base bias calc (br LE790: in AUJP)
LE748:        beq        LE74B          ; br if CURRENT IAC POSITION =z??  (br LE746: in AUJP)
                          ; else
        decb                  ; dec L002B Curr IAC pos
LE74B:        dec        L011A          ; IAC RUNNING COUNTER (-1)
        bset        *L003A,#0x20  ; set b5 IAC pos is decreasing
        bra        LE76C              ; go store curr iac pos
LE753:        brclr        *L003A,#0x10,LE760 ; br if not b4 IAC pos has changed bit
        brclr        *L003A,#0x20,LE760    ; br if not b5 IAC pos is decreasing???
                              ; else
        inc        L0111              ; REQUESTED IAC MOTOR STEPS +1
        bra        LE7A8              ; go back & calc IAC adj value (br LE790 in AUJP)
LE760:        cmpb        0x42,x    ; L866A: 0xA0 ;=160, MAX STEP MOTOR POSIT POSSIBLE (x=8628)
        bcc        LE781              ; br if CURRENT IAC POSITION >= L866A to check b3 of (PID),(IAC),(A/C) MODE WORD 1
                              ; (br LE769: in AUJP)
                              ; else
        incb                  ; L002B curr IAC pos +1
        inc        L011A              ; IAC RUNNING COUNTER +1
        bclr        *L003A,#0x20  ; clear b5 IAC pos is decreasing???
                  **  Same as AUJP here on until.. ************
        clc                    ; clear carry flag
LE76C:        stab        *L002B    ; CURRENT IAC POSITION

;///////////////////////////////////////////////////////////////////

LE7D8:        tba
LE7D9:        staa        L0120        ; IAC ADJUSTMENT VALUE ????  (This is LE7C1: in AUJP)
        ******** Diff from here down in AUJP- code added ******************
LE7DC:        bclr        *L003A,#0x10  ; clear b4  IAC pos has changed bit, br to here if no move??
        ldab        *L002B            ; CURRENT IAC POSITION
        cmpb        L01C2            ; old IAC position from this calc?
        beq        LE7E9                ; br if no change in curr IAC pos
                                                          ; else
        bset        *L003A,#0x10      ; set b4 IAC pos has changed bit
LE7E9:        stab        L01C2        ; store curr IAC as old iac position
                  **  Same as AUJP here on until till end ************
        brclr        *L00C0,#0x40,LE813
        brset        *L0048,#0x02,LE800

;///////////////////////////////////////////////////////////////////

AXYC code diff with AXCN
AXYC has the following added
;-------------------------
;Initialize Vss
;-------------------------
      ldaa    #0x27                    ; VAL = 39, MAX FOR NO RD SPD Ctr
      staa    *L0084                  ; ROAD SPEED NO PULSE COUNTER
;-------------------------
;Initialize IAC posit
;-------------------------
        *************** from here down in AUJP- code added from axyc ******************
        ldaa        *L002D                      ; KEEP ALIVE MIN MOTOR STEPS
        cmpa        L869D                      ; .byte  0x46  ;= 70, MAX KEEP ALIVE MOTOR STEPS
        bhi        LB1E2                          ; br if KA > max & set ram fail bit
        cmpa        L869C                      ; 0x0A  ;= 10, MIN KEEP ALIVE MOTOR STEPS 20d in AXYC
        bcc        LB1EA                          ; br if KA >= min
                                            ; else set ram fail bit and use default KA steps
LB1E2:        bset        *L003E,#0x40            ; Air MW b6, 1= RAM FAIL
        ldaa        L8699                      ; 0x28  ;= 40, DEFAULT KEEP ALIVE MOTOR STEPS
        staa        *L002D                      ; KEEP ALIVE MIN MOTOR STEPS
      ********* Same as AUJP here on until end when including AXCN diffs ************
LB1EA:        ldaa        L8629                  ; COLD IAC PARK POSIT
        adda        *L002D                      ; KEEP ALIVE MIN MOTOR STEPS

Is the LSLB not needed above. Best I can tell the LDAB will set the Z flag.

Or is it for the BCC at the end? -See bold-

dimented24x7 12-24-2005 08:37 PM

You are correct in that the BEQ will occur if the requested IAC steps are equal to zero. This is set during the Logical Shift Left operation if the requested steps are equal to zero.

Edit: Oops. Got that all wrong the first time!

dimented24x7 12-24-2005 08:45 PM

From whats shown, basically it looks like a really round-about way of checking if the IAC steps have been decayed out. Threw me off the first time because its sort of a strange way of doing it. Although the contents of B are probably used further down, so it probably makes more sense as a whole.

dimented24x7 12-24-2005 08:49 PM

Oh, the bra if carry clear will happen if the IAC steps in L0111 are less than 128. In this case its proabably used to check for and handle an overflow further down or something. This is set when the LSL occurs.

RBob 12-24-2005 09:28 PM

The value in L0111 is a request to move the IAC n steps. Bit 7 of L0111 defines the direction to move the IAC: retract or extend.

The LSLB is to move b7 out and set/clear the Z flag based on the remaining bits. The BEQ then being ' no IAC movement requested.'

RBob.

dimented24x7 12-24-2005 09:54 PM

Ah, makes more sense now. So the term in L0111 is signed then.

RBob 12-25-2005 07:56 AM


Originally posted by dimented24x7
Ah, makes more sense now. So the term in L0111 is signed then.
No, not signed. It is the actual number of steps to move, and flagged as to direction. Recall that negative numbers are in 2's complement. Which the value in L0111 is not. There are times where a NEGx is being done on the value before being stored in L0111, that is to un-complement the value.

RBob.

Z69 12-25-2005 12:07 PM

-edit code above-

I can see why the AXYC code snip is added. AXCN & AUJP don't have it. Looks like a fix for some reported problem to GM.

But I can't tell what added benefit the AXCN code listed has for an MT.
AXYC(305 MT) has the same code snip too.

dimented24x7 12-25-2005 12:35 PM

Ok, I took a closer look at it...

First time Ive ever looked at the 8D before and I got the wrong impression. My mistake.

Thats sort of a wacky way to do it. From what Ive seen so far, in the later PCMs the entire routine is based on airflow to make the proportional, integral, and derivative terms' action linear and at the end a lookup is done to translate the airflow into IAC steps, which are just plain desired and actual steps. The entire algorithm is driven by the RPM error term generated from the current and desired RPM. The desired RPMs are what the computer uses to alter the idle. I was under the impression the whole time that the above was pretty much lifted from the 8D and similar ecms and plunked in the TBI pcms. Evidently from the looks of it this is not the case, and I was making some ASSumptions instead.

Since I know nadda about how the 8D stuff works, is it possible to get a description of the idle routine in a nutshell, RBob? Seems like it would probably help Z69's understanding as well, and Im just sort of curious.

Z69 12-25-2005 01:12 PM

This is from the aujp code hac from the same section as listed in axcn above from LE72E: to LE76C: may need to line them up side by side to see what's going on or not going on....
I still need to update the comments once I'm sure what's going on- In this one of several pages of IAC code. IAC txt file

Added for clarity
Code:

LE6B9:        ldaa    L0111                    ; REQUESTED IAC MOTOR STEPS    ; CRef: 0xE6AF
              bpl    LE6CA                    ; BR IF STEPS ARE REQUESTED (Goes to LE6C2 IN ANHT)
                                                ; (TRAJECTORY DECAY)
                                                ; ... else
;
; TRAJECTORY DELAY
;
              bitb    #0x20                    ; B5,PID CMD STEP ACTIVE
                                                ; (A/C STEPS BEING REMOVED ?)
              bne    LE6CA                    ; BR IF B5, IF SO, BYPASS DECAY  (Goes to LE6C2 IN ANHT)
                                                ; ... else
              dec    L0114                    ; DECREMENT IAC DECAY COUNTER VALUE
              beq    LE6CA                    ; IF DECAY DONE, STEP MOTOR (Goes to LE6C2 IN ANHT)
                                                ; ... else
              jmp    LE7C4                    ; ELSE RETURN WITH NO STEP

The jmp to LE7C4 is a jmp to LE7DC in AXCN.
LE7C4 in aujp is part of the inject.src and skips all the listed IAC code.

Code:

LE736:        ldab    L0111                      ; GET REQUESTED IAC MOTOR STEPS      ; CRef: 0xE711,0xE71A,0xE71E
              lslb                              ; DIV B by 2
              beq    LE769                      ; BR IF EQUAL (Goes to LE761 IN ANHT)
                                                ; ... else
              dec    L0111                      ; REQUESTED IAC MOTOR STEPS
              ldab    *L002B                    ; CURRENT IAC POSITION
              bcc    LE74B                      ; BR IF Carry Clear, NO OVERFLOW (Goes to LE743 IN ANHT)
                                                ; ... else
;---------------------
; EXTEND IAC PINTLE
; less air to engine
;---------------------
              beq    LE746                      ; IF Z, SAVE CURRENT STATE (Goes to LE73E IN ANHT)
                                                ; ... else
              decb                              ; ADJUST CURRENT POSITION DOWN
LE746:        dec    L011A                      ; DECREMENT IAC RUNNING COUNTER            ; CRef: 0xE743
              bra    LE754                      ; Branch to UP DATE A/C LEARN & THROTTLE FOLLOWER FLAGs
                                                ; (Is LE74C in ANHT)
                                                ;---------------------------------------------------------
;---------------------
; RETRACT IAC PINTLE
; more air to engine
;---------------------
LE74B:        cmpb    0x42,x                    ; LIMIT POSIT TO MAX                  ; CRef: 0xE741
              bcc    LE769                      ; BR IF LESS THAN MAXIMUM (Goes to LE761 IN ANHT)
                                                ; ... else
              incb                              ; UP DATE IAC POSITION
              inc    L011A                      ; INCREMENT IAC RUNNING COUNTER
              clc                                ; CLEAR THE "C" Carry Bit
;----------------------------------------------------------------------
; UP DATE A/C LEARN & THROTTLE FOLLOWER FLAGs (Is LE74C in ANHT)
;----------------------------------------------------------------------
LE754:        stab    *L002B                    ; CURRENT IAC POSITION



All times are GMT -5. The time now is 05:25 AM.


© 2024 MH Sub I, LLC dba Internet Brands