Announcement

Collapse
No announcement yet.

3B High speed data logging help

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 3B High speed data logging help

    Ive been working on porting the high speed logging protocol from PRJ's files to the 3B ECU. there is just enough code space on both motor and boost chips to house the added code. to catch anyone up who's interested in this up on what i know about how the protocol works is as follows. the protocol in PRJ's runs at 187500 baud. the process starts on the boost chip side of the ECU where it transmits its RAM data first followed by 0xAA and 0xBB. the purpose of 0xAA and 0xBB is to let the motor chip side of the ECU transmit its RAM data next. pretty smart!

    Now i have a 3B boost chip modified to start but im not getting the right data from it. Im using a program called coolterm to monitor the raw HEX output from the ECU. I have been looking for the 0xAA and 0xBB coming from the boost chip but that data is never sent specifically. Im not sure if this is a baud rate issue or simply a code error that im not seeing. there is a picture of the data output from coolterm of what the ECU is giving me from the boost chip. im using a stock motor chip for this testing because i did not want to over complicate the process of getting this to work.

    The forum wont let me post the IDB for idapro directly so this is the current added code. maybe someone will see an error that im not and help me correct it. the boost chip im using is the 551A from AAN actually because it has the overboost function and such that the 3B never had plus its more similar to the RS2 boost chip that PRJ used. any input as to why its giving me the wrong data would be great. once this works i'll post it up here in the forum with a working ADX for tuner pro and a working winlog plugin/dash for those who prefer that.


    Code:
    code:000001CE          ; =============== S U B R O U T I N E =======================================
    code:000001CE
    code:000001CE
    code:000001CE          Logging_Code_01:                        ; CODE XREF: IE0+B0E↓p
    code:000001CE C0 83                    push    DPH             ; Data Pointer, High Byte
    code:000001D0 C0 82                    push    DPL             ; Data Pointer, Low Byte
    code:000001D2 90 1F F0                 mov     DPTR, #Logging_On_Off ; Move (Op1 <- Op2)
    code:000001D5 E4                       clr     A               ; Clear Operand (0)
    code:000001D6 93                       movc    A, @A+DPTR      ; Move code byte relative to second op to Acc
    code:000001D7 70 1B                    jnz     code_1F4        ; Jump if Acc is not zero
    code:000001D9 20 AC 16                 jb      IEN0.4, code_1F2 ; Jump if serial channel 0 interrupt is not enabled.
    code:000001DC 78 B2                    mov     R0, #0xB2       ; Move (Op1 <- Op2)
    code:000001DE 16                       dec     @R0             ; Decrement Operand
    code:000001DF E6                       mov     A, @R0          ; Move (Op1 <- Op2)
    code:000001E0 70 10                    jnz     code_1F2        ; Jump if Acc is not zero
    code:000001E2 75 87 00                 mov     PCON, #0        ; Set Baud Rate.
    code:000001E5 75 98 98                 mov     SCON, #0x98     ; Serial Channel Control Reg.
    code:000001E8 76 12                    mov     @R0, #0x12      ; Move (Op1 <- Op2)
    code:000001EA 75 7E FF                 mov     Open_RAM_7E, #0xFF ; Move (Op1 <- Op2)
    code:000001ED 85 49 99                 mov     SBUF, RAM_49    ; Serial Channel Buffer Reg.
    code:000001F0 D2 AC                    setb    IEN0.4          ; Interrupt Enable Register 0
    code:000001F2
    code:000001F2          code_1F2:                               ; CODE XREF: Logging_Code_01+B↑j
    code:000001F2                                                  ; Logging_Code_01+12↑j
    code:000001F2 D2 18                    setb    RAM_23.0        ; Set Direct Bit
    code:000001F4
    code:000001F4          code_1F4:                               ; CODE XREF: Logging_Code_01+9↑j
    code:000001F4 D0 82                    pop     DPL             ; Data Pointer, Low Byte
    code:000001F6 D0 83                    pop     DPH             ; Data Pointer, High Byte
    code:000001F8 75 F0 00                 mov     B, #0           ; B-Register
    code:000001FB 22                       ret                     ; Return from subroutine
    code:000001FB          ; End of function Logging_Code_01
    Code:
    code:00000EE6          ; ---------------------------------------------------------------------------
    code:00000EE6
    code:00000EE6          Logging_Code_02:                        ; CODE XREF: code_15BA+5↓j
    code:00000EE6 90 1F F0                 mov     DPTR, #Logging_On_Off ; Move (Op1 <- Op2)
    code:00000EE9 93                       movc    A, @A+DPTR      ; Move code byte relative to second op to Acc
    code:00000EEA 60 07                    jz      code_EF3        ; Jump if Acc is zero
    code:00000EEC E4                       clr     A               ; Clear Operand (0)
    code:00000EED 90 18 5E                 mov     DPTR, #0x185E   ; Move (Op1 <- Op2)
    code:00000EF0 02 15 C2                 ljmp    code_15C2       ; Long Jump
    code:00000EF3          ; ---------------------------------------------------------------------------
    code:00000EF3
    code:00000EF3          code_EF3:                               ; CODE XREF: code_EA7+43↑j
    code:00000EF3 D0 83                    pop     DPH             ; Data Pointer, High Byte
    code:00000EF5 D0 82                    pop     DPL             ; Data Pointer, Low Byte
    code:00000EF7 22                       ret                     ; Return from subroutine
    code:00000EF7          ; ---------------------------------------------------------------------------
    Code:
    0016CF          ; =============== S U B R O U T I N E =======================================
    code:000016CF
    code:000016CF
    code:000016CF          Logging_Code_03:                        ; CODE XREF: IE0+43B↑p
    code:000016CF 50 06                    jnc     code_16D7       ; Jump if Carry is clear
    code:000016D1 F5 6B                    mov     RAM_6B, A       ; Move (Op1 <- Op2)
    code:000016D3 2C                       add     A, R4           ; Add Second Operand to Acc
    code:000016D4 FC                       mov     R4, A           ; Move (Op1 <- Op2)
    code:000016D5 80 03                    sjmp    code_16DA       ; Short jump
    code:000016D7          ; ---------------------------------------------------------------------------
    code:000016D7
    code:000016D7          code_16D7:                              ; CODE XREF: Logging_Code_03↑j
    code:000016D7 75 6B 00                 mov     RAM_6B, #0      ; Move (Op1 <- Op2)
    code:000016DA
    code:000016DA          code_16DA:                              ; CODE XREF: Logging_Code_03+6↑j
    code:000016DA E5 50                    mov     A, RAM_50       ; Move (Op1 <- Op2)
    code:000016DC 22                       ret                     ; Return from subroutine
    code:000016DC          ; End of function Logging_Code_03
    code:000016DC
    code:000016DC          ; ---------------------------------------------------------------------------
    Code:
    001A43          ; =============== S U B R O U T I N E =======================================
    code:00001A43
    code:00001A43
    code:00001A43          Logging_Code_04:                        ; CODE XREF: RI_TI↑j
    code:00001A43 C0 83                    push    DPH             ; Data Pointer, High Byte
    code:00001A45 C0 82                    push    DPL             ; Data Pointer, Low Byte
    code:00001A47 C0 E0                    push    ACC             ; Accumulator
    code:00001A49 90 1F F0                 mov     DPTR, #Logging_On_Off ; Move (Op1 <- Op2)
    code:00001A4C E4                       clr     A               ; Clear Operand (0)
    code:00001A4D 93                       movc    A, @A+DPTR      ; Move code byte relative to second op to Acc
    code:00001A4E 60 0F                    jz      code_1A5F       ; Jump if Acc is zero
    code:00001A50 D0 E0                    pop     ACC             ; Accumulator
    code:00001A52 D0 82                    pop     DPL             ; Data Pointer, Low Byte
    code:00001A54 D0 83                    pop     DPH             ; Data Pointer, High Byte
    code:00001A56 10 98 03                 jbc     SCON.0, code_1A5C ; If SCON.0 is set go to Disable serial channel 0 interrupt,
    code:00001A56                                                  ; if not clear SCON.0.
    code:00001A59 C2 99                    clr     SCON.1          ; Stop Serial transmission.
    code:00001A5B 32                       reti                    ; Return from Interrupt
    code:00001A5C          ; ---------------------------------------------------------------------------
    code:00001A5C
    code:00001A5C          code_1A5C:                              ; CODE XREF: Logging_Code_04+13↑j
    code:00001A5C C2 AC                    clr     IEN0.4          ; Disable serial channel 0 interrupt.
    code:00001A5E 32                       reti                    ; Return from Interrupt
    code:00001A5F          ; ---------------------------------------------------------------------------
    code:00001A5F
    code:00001A5F          code_1A5F:                              ; CODE XREF: Logging_Code_04+B↑j
    code:00001A5F 10 99 09                 jbc     SCON.1, code_1A6B ; If SCON.1 is set go to transmit logging data,
    code:00001A5F                                                  ; if not clear SCON.0.
    code:00001A5F                                                  ;
    code:00001A5F                                                  ; SCON.1 set=8 bit data, 1 stop bit, 1 start bit.
    code:00001A62 C2 98                    clr     SCON.0          ; Serial Channel Control Reg.
    code:00001A64 D0 E0                    pop     ACC             ; Accumulator
    code:00001A66 D0 82                    pop     DPL             ; Data Pointer, Low Byte
    code:00001A68 D0 83                    pop     DPH             ; Data Pointer, High Byte
    code:00001A6A 32                       reti                    ; Return from Interrupt
    code:00001A6B          ; ---------------------------------------------------------------------------
    code:00001A6B
    code:00001A6B          code_1A6B:                              ; CODE XREF: Logging_Code_04:code_1A5F↑j
    code:00001A6B C0 D0                    push    PSW             ; Program Status Word Register
    code:00001A6D C0 F0                    push    B               ; B-Register
    code:00001A6F 05 7E                    inc     Open_RAM_7E     ; Increment Operand
    code:00001A71 E5 7E                    mov     A, Open_RAM_7E  ; Move (Op1 <- Op2)
    code:00001A73 75 F0 02                 mov     B, #2           ; B-Register
    code:00001A76 A4                       mul     AB              ; Multiply Acc by B
    code:00001A77 D0 F0                    pop     B               ; B-Register
    code:00001A79 D0 D0                    pop     PSW             ; Program Status Word Register
    code:00001A7B 90 1F 60                 mov     DPTR, #Logging_RAM ; Move (Op1 <- Op2)
    code:00001A7E 73                       jmp     @A+DPTR         ; Jump indirect relative to Data Pointer
    code:00001A7E          ; End of function Logging_Code_04
    code:00001A7E
    code:00001A7E          ; ---------------------------------------------------------------------------
    Code:
    1F60
    code:00001F60          ; =============== S U B R O U T I N E =======================================
    code:00001F60
    code:00001F60
    code:00001F60          Logging_RAM:                            ; DATA XREF: Logging_Code_04+38↑o
    code:00001F60 80 1A                    sjmp    code_1F7C       ; Short jump
    code:00001F62          ; ---------------------------------------------------------------------------
    code:00001F62 80 1D                    sjmp    code_1F81       ; Short jump
    code:00001F64          ; ---------------------------------------------------------------------------
    code:00001F64 80 20                    sjmp    code_1F86       ; Short jump
    code:00001F66          ; ---------------------------------------------------------------------------
    code:00001F66 80 23                    sjmp    code_1F8B       ; Short jump
    code:00001F68          ; ---------------------------------------------------------------------------
    code:00001F68 80 26                    sjmp    code_1F90       ; Short jump
    code:00001F6A          ; ---------------------------------------------------------------------------
    code:00001F6A 80 30                    sjmp    code_1F9C       ; Short jump
    code:00001F6C          ; ---------------------------------------------------------------------------
    code:00001F6C 80 3A                    sjmp    code_1FA8       ; Short jump
    code:00001F6E          ; ---------------------------------------------------------------------------
    code:00001F6E 80 44                    sjmp    code_1FB4       ; Short jump
    code:00001F70          ; ---------------------------------------------------------------------------
    code:00001F70 80 4E                    sjmp    code_1FC0       ; Short jump
    code:00001F72          ; ---------------------------------------------------------------------------
    code:00001F72 80 58                    sjmp    code_1FCC       ; Short jump
    code:00001F74          ; ---------------------------------------------------------------------------
    code:00001F74 80 5E                    sjmp    code_1FD4       ; Short jump
    code:00001F76          ; ---------------------------------------------------------------------------
    code:00001F76 80 61                    sjmp    code_1FD9       ; Short jump
    code:00001F78          ; ---------------------------------------------------------------------------
    code:00001F78 80 64                    sjmp    code_1FDE       ; Short jump
    code:00001F7A          ; ---------------------------------------------------------------------------
    code:00001F7A 80 67                    sjmp    code_1FE3       ; Short jump
    code:00001F7C          ; ---------------------------------------------------------------------------
    code:00001F7C
    code:00001F7C          code_1F7C:                              ; CODE XREF: Logging_RAM↑j
    code:00001F7C 85 49 99                 mov     SBUF, RAM_49    ; Serial Channel Buffer Reg.
    code:00001F7F 80 64                    sjmp    code_1FE5       ; Short jump
    code:00001F81          ; ---------------------------------------------------------------------------
    code:00001F81
    code:00001F81          code_1F81:                              ; CODE XREF: Logging_RAM+2↑j
    code:00001F81 85 71 99                 mov     SBUF, RAM_71    ; Serial Channel Buffer Reg.
    code:00001F84 80 5F                    sjmp    code_1FE5       ; Short jump
    code:00001F86          ; ---------------------------------------------------------------------------
    code:00001F86
    code:00001F86          code_1F86:                              ; CODE XREF: Logging_RAM+4↑j
    code:00001F86 85 6D 99                 mov     SBUF, RAM_6D    ; Serial Channel Buffer Reg.
    code:00001F89 80 5A                    sjmp    code_1FE5       ; Short jump
    code:00001F8B          ; ---------------------------------------------------------------------------
    code:00001F8B
    code:00001F8B          code_1F8B:                              ; CODE XREF: Logging_RAM+6↑j
    code:00001F8B 85 72 99                 mov     SBUF, RAM_72    ; Serial Channel Buffer Reg.
    code:00001F8E 80 55                    sjmp    code_1FE5       ; Short jump
    code:00001F90          ; ---------------------------------------------------------------------------
    code:00001F90
    code:00001F90          code_1F90:                              ; CODE XREF: Logging_RAM+8↑j
    code:00001F90 E8                       mov     A, R0           ; Move (Op1 <- Op2)
    code:00001F91 C0 E0                    push    ACC             ; Accumulator
    code:00001F93 78 D2                    mov     R0, #0xD2       ; Move (Op1 <- Op2)
    code:00001F95 86 99                    mov     SBUF, @R0       ; Serial Channel Buffer Reg.
    code:00001F97 D0 E0                    pop     ACC             ; Accumulator
    code:00001F99 F8                       mov     R0, A           ; Move (Op1 <- Op2)
    code:00001F9A 80 49                    sjmp    code_1FE5       ; Short jump
    code:00001F9C          ; ---------------------------------------------------------------------------
    code:00001F9C
    code:00001F9C          code_1F9C:                              ; CODE XREF: Logging_RAM+A↑j
    code:00001F9C E8                       mov     A, R0           ; Move (Op1 <- Op2)
    code:00001F9D C0 E0                    push    ACC             ; Accumulator
    code:00001F9F 78 D3                    mov     R0, #0xD3       ; Move (Op1 <- Op2)
    code:00001FA1 86 99                    mov     SBUF, @R0       ; Serial Channel Buffer Reg.
    code:00001FA3 D0 E0                    pop     ACC             ; Accumulator
    code:00001FA5 F8                       mov     R0, A           ; Move (Op1 <- Op2)
    code:00001FA6 80 3D                    sjmp    code_1FE5       ; Short jump
    code:00001FA8          ; ---------------------------------------------------------------------------
    code:00001FA8
    code:00001FA8          code_1FA8:                              ; CODE XREF: Logging_RAM+C↑j
    code:00001FA8 E8                       mov     A, R0           ; Move (Op1 <- Op2)
    code:00001FA9 C0 E0                    push    ACC             ; Accumulator
    code:00001FAB 78 D4                    mov     R0, #0xD4       ; Move (Op1 <- Op2)
    code:00001FAD 86 99                    mov     SBUF, @R0       ; Serial Channel Buffer Reg.
    code:00001FAF D0 E0                    pop     ACC             ; Accumulator
    code:00001FB1 F8                       mov     R0, A           ; Move (Op1 <- Op2)
    code:00001FB2 80 31                    sjmp    code_1FE5       ; Short jump
    code:00001FB4          ; ---------------------------------------------------------------------------
    code:00001FB4
    code:00001FB4          code_1FB4:                              ; CODE XREF: Logging_RAM+E↑j
    code:00001FB4 E8                       mov     A, R0           ; Move (Op1 <- Op2)
    code:00001FB5 C0 E0                    push    ACC             ; Accumulator
    code:00001FB7 78 D5                    mov     R0, #0xD5       ; Move (Op1 <- Op2)
    code:00001FB9 86 99                    mov     SBUF, @R0       ; Serial Channel Buffer Reg.
    code:00001FBB D0 E0                    pop     ACC             ; Accumulator
    code:00001FBD F8                       mov     R0, A           ; Move (Op1 <- Op2)
    code:00001FBE 80 25                    sjmp    code_1FE5       ; Short jump
    code:00001FC0          ; ---------------------------------------------------------------------------
    code:00001FC0
    code:00001FC0          code_1FC0:                              ; CODE XREF: Logging_RAM+10↑j
    code:00001FC0 E8                       mov     A, R0           ; Move (Op1 <- Op2)
    code:00001FC1 C0 E0                    push    ACC             ; Accumulator
    code:00001FC3 78 D6                    mov     R0, #0xD6       ; Move (Op1 <- Op2)
    code:00001FC5 86 99                    mov     SBUF, @R0       ; Serial Channel Buffer Reg.
    code:00001FC7 D0 E0                    pop     ACC             ; Accumulator
    code:00001FC9 F8                       mov     R0, A           ; Move (Op1 <- Op2)
    code:00001FCA 80 19                    sjmp    code_1FE5       ; Short jump
    code:00001FCC          ; ---------------------------------------------------------------------------
    code:00001FCC
    code:00001FCC          code_1FCC:                              ; CODE XREF: Logging_RAM+12↑j
    code:00001FCC 90 00 78                 mov     DPTR, #0x78 ; 'x' ; Move (Op1 <- Op2)
    code:00001FCF E0                       movx    A, @DPTR        ; Move from/to external RAM
    code:00001FD0 F5 99                    mov     SBUF, A         ; Serial Channel Buffer Reg.
    code:00001FD2 80 11                    sjmp    code_1FE5       ; Short jump
    code:00001FD4          ; ---------------------------------------------------------------------------
    code:00001FD4
    code:00001FD4          code_1FD4:                              ; CODE XREF: Logging_RAM+14↑j
    code:00001FD4 85 6B 99                 mov     SBUF, RAM_6B    ; Serial Channel Buffer Reg.
    code:00001FD7 80 0C                    sjmp    code_1FE5       ; Short jump
    code:00001FD9          ; ---------------------------------------------------------------------------
    code:00001FD9
    code:00001FD9          code_1FD9:                              ; CODE XREF: Logging_RAM+16↑j
    code:00001FD9 75 99 AA                 mov     SBUF, #0xAA     ; Serial Channel Buffer Reg.
    code:00001FDC 80 07                    sjmp    code_1FE5       ; Short jump
    code:00001FDE          ; ---------------------------------------------------------------------------
    code:00001FDE
    code:00001FDE          code_1FDE:                              ; CODE XREF: Logging_RAM+18↑j
    code:00001FDE 75 99 BB                 mov     SBUF, #0xBB     ; Serial Channel Buffer Reg.
    code:00001FE1 80 02                    sjmp    code_1FE5       ; Short jump
    code:00001FE3          ; ---------------------------------------------------------------------------
    code:00001FE3
    code:00001FE3          code_1FE3:                              ; CODE XREF: Logging_RAM+1A↑j
    code:00001FE3 C2 AC                    clr     IEN0.4          ; Disable serial channel 0 interrupt.
    code:00001FE5
    code:00001FE5          code_1FE5:                              ; CODE XREF: Logging_RAM+1F↑j
    code:00001FE5                                                  ; Logging_RAM+24↑j ...
    code:00001FE5 D0 E0                    pop     ACC             ; Accumulator
    code:00001FE7 D0 82                    pop     DPL             ; Data Pointer, Low Byte
    code:00001FE9 D0 83                    pop     DPH             ; Data Pointer, High Byte
    code:00001FEB 32                       reti                    ; Return from Interrupt
    code:00001FEB          ; End of function Logging_RAM
    code:00001FEB
    code:00001FEB          ; ---------------------------------------------------------------------------
    Bad output from boost chip.
    "The really good drivers got the bugs on the side windows." Walter Röhrl

  • #2
    Baud issue. Didn’t checked your code.
    Read the manual of the 8051 and try the other baudrates or understand your code.

    Comment


    • #3
      Originally posted by Acki View Post
      Baud issue. Didn’t checked your code.
      Read the manual of the 8051 and try the other baudrates or understand your code.
      i did look through it the SAB80C535 manual, everything seems to be right. i have tried everything from 9600 baud the whole way to 200,000 baud with the same output result within reason. A friend calculated the baud for me from the code and said that it is set to 187500 which as you see in my picture above thats what my baud rate is. i tested my blue VAG cable on a different car with PRJ's logging working so i rule the cable itself out being the problem. i feel that if i can get the boost chip to transmit 0xAA 0xBB than the rest will fall into place and start to function properly.
      "The really good drivers got the bugs on the side windows." Walter Röhrl

      Comment


      • #4
        so i conducted a test making the boot chip output the BB bits only and these are my results. something seems to be calculating those values and pushing them out in pairs of 3 bits.

        input=output
        A3=00 06 FF
        7D=00 FB FE
        7F=00 FF FF
        80=00 00 00
        81=00 03 00
        "The really good drivers got the bugs on the side windows." Walter Röhrl

        Comment


        • #5
          Hi,

          How many beers for little help?

          I will not trace the code, there is no time and interest.

          From a first look, incorrect speed setting of serial channel!!!! One byte is wrong! If settings of speed is incorrect, received bytes on expected speed will be different, recalculated by difference of serial channel speed and you never see AA BB start bytes. If you "guess" current "wrong" setting of speed you will see correct bytes!! Take a look on serial channel setting and will find the error or read 80C535 manual for current setting of speed.

          Why you separate your Logging_RAM subroutine/procedure from addressing subroutine/procedure by Ram_7E. Are you sure about this and do you need this jump from code:00001A7E to code:00001F60???

          Advice: Check all used RAMs and bit RAMs in boost main code (3B or 551A) for compliance. Not all RAMs, bit RAMs and parameters are 1:1

          No more time, Sorry ) I hope there is value for one beer )))

          Best Regards.

          Comment


          • #6
            Originally posted by d_anev View Post
            Hi,

            How many beers for little help?

            I will not trace the code, there is no time and interest.

            From a first look, incorrect speed setting of serial channel!!!! One byte is wrong! If settings of speed is incorrect, received bytes on expected speed will be different, recalculated by difference of serial channel speed and you never see AA BB start bytes. If you "guess" current "wrong" setting of speed you will see correct bytes!! Take a look on serial channel setting and will find the error or read 80C535 manual for current setting of speed.

            Why you separate your Logging_RAM subroutine/procedure from addressing subroutine/procedure by Ram_7E. Are you sure about this and do you need this jump from code:00001A7E to code:00001F60???

            Advice: Check all used RAMs and bit RAMs in boost main code (3B or 551A) for compliance. Not all RAMs, bit RAMs and parameters are 1:1

            No more time, Sorry ) I hope there is value for one beer )))

            Best Regards.
            thank you for the input! i will look into this and post my findings.

            Why you separate your Logging_RAM subroutine/procedure from addressing subroutine/procedure by Ram_7E. Are you sure about this and do you need this jump from code:00001A7E to code:00001F60???
            Im going off of how the original logging works but i am very limited on code space with only an 8k boost chip so i fit the logging code where i had open space. thats the reason for the jump from 0x1A7E to 0x1F60. RAM 7E is an unused RAM variable according to the disassembly so that is why it was chosen. the original RAM variable used in PRJ's boost chip is used in this one so i just moved to another one that appeared to be open.
            Last edited by vwnut8392; 13th November 2018, 22:07.
            "The really good drivers got the bugs on the side windows." Walter Röhrl

            Comment


            • #7
              For anyone interested in looking at the problem heres some files to help with hunting for the problem.

              Here is a link to the IDB in my google drive of the modified boost chip file disassembled. IDB file is for IDApro 7.0.
              https://drive.google.com/file/d/1f32...ew?usp=sharing


              Here is a link to the stock 551A boost chip.
              https://drive.google.com/file/d/1N0I...ew?usp=sharing
              "The really good drivers got the bugs on the side windows." Walter Röhrl

              Comment


              • #8
                i just copy and pasted my IDB as i have my notes in there in bold red. but from what i get the baud should be 187500 and i still get the same junk data. i wonder if i have a messed up ECU or something? If there is still an error i dont see it. everything adds up to functioning right and it does not.

                Code:
                e:000001CE          ; =============== S U B R O U T I N E =======================================
                code:000001CE
                code:000001CE
                code:000001CE          Logging_Code_01:                        ; CODE XREF: IE0+B0E↓p
                code:000001CE C0 83                    push    DPH             ; Data Pointer, High Byte
                code:000001D0 C0 82                    push    DPL             ; Data Pointer, Low Byte
                code:000001D2 90 1F F0                 mov     DPTR, #Logging_On_Off ; Move (Op1 <- Op2)
                code:000001D5 E4                       clr     A               ; Clear Operand (0)
                code:000001D6 93                       movc    A, @A+DPTR      ; Move code byte relative to second op to Acc
                code:000001D7 70 1B                    jnz     code_1F4        ; Jump if Acc is not zero
                code:000001D9 20 AC 16                 jb      IEN0.4, code_1F2 ; Jump if serial channel 0 interrupt is not enabled.
                code:000001DC 78 B2                    mov     R0, #0xB2       ; Move (Op1 <- Op2)
                code:000001DE 16                       dec     @R0             ; Decrement Operand
                code:000001DF E6                       mov     A, @R0          ; Move (Op1 <- Op2)
                code:000001E0 70 10                    jnz     code_1F2        ; Jump if Acc is not zero
                code:000001E2         Processor oscillator is 12mhz from data sheet.
                code:000001E2          PCON is set to 0 meaning that its 1/64 of the oscillator.
                code:000001E2          so i took 12mhz * 1000000/64=187500 baud.
                code:000001E2 75 87 00                 mov     PCON, #0        ; Set Baud Rate.
                code:000001E2                                                                    ; 00=BAUD 38400
                code:000001E2                                                                    ; 80=baud 19200
                code:000001E5 75 98 88                 mov     SCON, #0x88     ; -----------------------------------------
                code:000001E5                                                                    ; 0x88=10001000
                code:000001E5                                                                    ; First 2 bits (10) mean Mode 2
                code:000001E5                                                                    ; 5th bit (1) is the 9th bit transferred
                code:000001E8 76 12                    mov     @R0, #0x12      ; -----------------------------------------------
                code:000001E8                                                                    ; This is the frequency that can adjust the speed
                code:000001E8                                                                    ; output by lowering the HEX value
                code:000001EA 75 7E FF                 mov     Open_RAM_7E, #0xFF ; Move (Op1 <- Op2)
                code:000001ED 85 49 99                 mov     SBUF, RAM_49    ; Serial Channel Buffer Reg.
                code:000001F0 D2 AC                    setb    IEN0.4          ; Interrupt Enable Register 0
                code:000001F2
                code:000001F2          code_1F2:                               ; CODE XREF: Logging_Code_01+B↑j
                code:000001F2                                                  ; Logging_Code_01+12↑j
                code:000001F2 D2 18                    setb    RAM_23.0        ; Set Direct Bit
                code:000001F4
                code:000001F4          code_1F4:                               ; CODE XREF: Logging_Code_01+9↑j
                code:000001F4 D0 82                    pop     DPL             ; Data Pointer, Low Byte
                code:000001F6 D0 83                    pop     DPH             ; Data Pointer, High Byte
                code:000001F8 75 F0 00                 mov     B, #0           ; B-Register
                code:000001FB 22                       ret                     ; Return from subroutine
                code:000001FB          ; End of function Logging_Code_01
                code:000001FB
                code:000001FB          ; ---------------------------------------------------------------------------
                "The really good drivers got the bugs on the side windows." Walter Röhrl

                Comment


                • #9
                  0x88 is 01011000...


                  Gesendet von iPad mit Tapatalk

                  Comment


                  • #10
                    Originally posted by Acki View Post
                    0x88 is 01011000...


                    Gesendet von iPad mit Tapatalk
                    how do you get that result? i converted the hex 0x88 to binary and i get 10001000.
                    "The really good drivers got the bugs on the side windows." Walter Röhrl

                    Comment


                    • #11
                      Ups... wrong column. I looked at 88dec sorry.


                      Gesendet von iPad mit Tapatalk

                      Comment


                      • #12
                        Originally posted by Acki View Post
                        Ups... wrong column. I looked at 88dec sorry.


                        Gesendet von iPad mit Tapatalk
                        all good man! for reference this is the site i always use for that sort of stuff. https://www.mathsisfun.com/binary-de...converter.html


                        it seems no matter what i do with it i get a negative output. im not really sure whats causing it or how to correct it. i thought it might be a problem with this ECU or the 30015 ADC chip but VCDS works fine plus i tested a second ECU and i get the same end result. totally puzzled with it because hardware is essentially the same as AAN meaning processors and all with only minor changes made to run the 3B. i wish PRJ would give some input on this one because after all he's the one who came up with this protocol.
                        Last edited by vwnut8392; 14th November 2018, 21:03.
                        "The really good drivers got the bugs on the side windows." Walter Röhrl

                        Comment


                        • #13
                          3B XTAL's are different between boost and fuel...
                          http://tuner.ee - http://www.facebook.com/tuner.ee

                          Comment


                          • #14
                            Originally posted by prj View Post
                            3B XTAL's are different between boost and fuel...
                            Thank you for the input. i will investigate into this further.
                            "The really good drivers got the bugs on the side windows." Walter Röhrl

                            Comment


                            • #15
                              Great observation PRJ! boost processor crystal is 8mhz and motor processor crystal is 12mhz. with that i now have the boost processor running logging output at 125000 baud. thanks for the input once again PRJ!
                              "The really good drivers got the bugs on the side windows." Walter Röhrl

                              Comment

                              Working...
                              X