Pin 39 input

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kymi
    S2Forum Enthusiast
    • May 2014
    • 107
    • Country: Finland

    #1

    Pin 39 input

    Reply for the off-topic, sorry. It should take no more than 15min to find out what mov, addat and cjne does (from 8051 documentation). addat = response from AD conversion (I believe in this case #0x4) that's placed (mov) into A. Then A is compared (cjne) to #0xFF, if it's not equal jump to code_8644 and set carry (in this case) or if they're equal continue running the code. Better to study CPU's internals and motronic schematics.
  • vwnut8392
    S2Forum Addict
    • Jul 2012
    • 418
    • Country: United States

    #2
    Originally posted by kymi
    Reply for the off-topic, sorry. It should take no more than 15min to find out what mov, addat and cjne does (from 8051 documentation). addat = response from AD conversion (I believe in this case #0x4) that's placed (mov) into A. Then A is compared (cjne) to #0xFF, if it's not equal jump to code_8644 and set carry (in this case) or if they're equal continue running the code. Better to study CPU's internals and motronic schematics.
    I just figured that 0xFF is like a constant meaning 12V and than whatever HEX in A from ADDAT is compared to 0xFF. so what i was questioning is if i change 0xFF to a lesser value like 0x00 would that consider it to be checking for a grounding input instead of a 12V input. basically what im looking to do is sort of invert the signal in the code if you know what i mean. so from what you are saying is that in its steady state with no ground or power that ADDAT will be 0x04. i think that when 12v is supplied its the analog input is pulled high making ADDAT 0xFF. theres nothing to the input in the schematic, it practically connects from the ECU pin straight to the processor. so i guess is need to figure out if when the analog input is grounded ADDAT becomes 0x00 or another value than replace the 0xFF in the clutch switch code with whatever the grounded value is and that will invert the input to grounding. lastly if this is the case than a simple patch could be added to tunerpro if someone wanted to invert the clutch switch and it could be 12v or a grounded input depending on what they prefer.
    "The really good drivers got the bugs on the side windows." Walter Röhrl

    Comment

    • Acki
      S2Forum Addict
      • Mar 2014
      • 302
      • Country: Germany

      #3
      A "ground switch" might create other issues during the reading of the input - how the CPU knows ground or open? You would need 12V when clutch NOT pressed and 0V when pressed.
      The schematics shows a pull-down to REF- so you need a voltage higher than 3,75V to "trigger" the signal.
      12V are easy available - maybe you want to replace the output of the CPU, change the board layout?!

      /edit: What happens at Pin43?
      Last edited by Acki; 23 January 2018, 23:22.

      Comment

      • vwnut8392
        S2Forum Addict
        • Jul 2012
        • 418
        • Country: United States

        #4
        Originally posted by Acki
        A "ground switch" might create other issues during the reading of the input - how the CPU knows ground or open? You would need 12V when clutch NOT pressed and 0V when pressed.
        The schematics shows a pull-down to REF- so you need a voltage higher than 3,75V to "trigger" the signal.
        12V are easy available - maybe you want to replace the output of the CPU, change the board layout?!

        the BE 00 to BE 07 is the analog inputs. map switch would be BE 06 because MFTS pin is tied to AN6 on motor chip processor. clutch switch is on pin 39 so that would be AN4 or in the code any reference to it would be BE 04. on the analog inputs there the processor would put values into RAM like 0V be 0x00 and 12V being 0xFF. i think there are 3 possible ways the circuit could work, there is 12V, 0V (grounded) and open meaning no voltage or ground. i think if the circuit is open it may just float at a random hex value between 0x00 and 0xFF or their may be code somewhere that sets it to a value if its found to be floating open with no power or ground tied to it.
        "The really good drivers got the bugs on the side windows." Walter Röhrl

        Comment

        • Acki
          S2Forum Addict
          • Mar 2014
          • 302
          • Country: Germany

          #5
          There is a pull-down, look at the schematics you marked on your own.
          It's also mentioned at the M232 Wiki.
          Make a pull-up and change the code or use it as it is?!

          Comment

          Working...