Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 40

Thread: Looking for asistance with ALDL project...

  1. #16
    Fuel Injected!
    Join Date
    Mar 2013
    Posts
    1,470
    F0 56 F4 C6 0A 58 00 00 00 9E 0A 58 00 00 00 9E 0A 58 00 00 00 9E 05 5F 00 20 00 3C 7F 00 00 02 00 01 BE 0A 58 00 00 00 9E
    That is the message and here is the decoding


    F0 56 F4 C6 -message 1 broadcast message of bus master F4 indicates the id of the master
    0A 58 00 00 00 9E -message 2 to module ID $0A 3 bytes long
    0A 58 00 00 00 9E -repeat
    0A 58 00 00 00 9E - repeat
    05 5F 00 20 00 3C 7F 00 00 02 00 01 BE message 5 to module ID $05, 10 bytes long
    0A 58 00 00 00 9E -repeat

    The structure of message is as
    [05]first byte recieving module ID
    [5F]second byte length
    [00..01]message data
    [BE]checksum of message

    Decoding the 10 byte length message will get you want you need.
    I bin disassembly might get the decoding pretty fast than trying to reverse the datastream.

  2. #17
    LT1 specialist steveo's Avatar
    Join Date
    Aug 2013
    Posts
    4,007
    i guess one question is does the dash even care about that initial broadcast message to go into some kind of receiving mode, or is it a simple device unaware of anything but 0A messages..? never really thought about that part of how aldl slaves work. there must be a reason for announcing broadcast mode but i always assumed their comms logic was pretty simple

  3. #18
    LT1 specialist steveo's Avatar
    Join Date
    Aug 2013
    Posts
    4,007
    ahh so what it looks like it's actually doing is updating the dash with both messages. it uses the shorter message for updating RPM quickly and then periodically sends this longer message to update other parts of the dash. might want to handle both messages to update some other things on the dashboard

    Code:
    ..PAGE
    ..HEAD02L ALDL NORMAL MESSAGE *F9MSG2*
     - MESSAGE ID     = $05
     - MESSAGE LENGTH = $5F
     - DATA       NAME            DESCRIPTION
    
       1          IPMW9           MODE WORD FOR INSTRUMENT PANEL
              0     NOT USED
              1     NOT USED
              2     NOT USED
              3     NOT USED
              4      1 = DIAGNOSTIC ENABLE LINE SHORTED
              5      1 = ALDL MODE
              6      1 = SERVICE ENGINE SOON LIGHT ON
              7      1 = UP SHIFT LIGHT ON
       2         IPMW8            MODE WORD FOR INSTRUMENT PANEL
              0     NOT USED
              1      1 = FUEL SYSTEM DISABLED BY VATS
              2     NOT USED
              3      1 = MALF 24 DETECTED
              4     NOT USED
              5      1 = LOW COOLANT
              6      1 = MALF 14 OR 15 DETECTED
              7     NOT USED
       3            FILTMPH       VEHICLE SPEED
                                       MPH = N
       4            KREDLINE      REDLINE RPM
                                       RPM = N*100
       5            ADBAT         BATTERY VOLTAGE
                                       VOLTS = N/10
       6            ACUMFUEL      ACCUMULATED FUEL FOR DRIVER DISPLAY (MSB)
       7            ACUMFUEL+1    ACCUMULATED FUEL FOR DRIVER DISPLAY (LSB)
                                       MSEC = (MSB*256 + LSB)/65.536
       8            KDISF         SINGLE INJECTOR FLOW RATE IN GALLONS/HOUR (MSB)
       9            KDISF+1       SINGLE INJECTOR FLOW RATE IN GALLONS/HOUR (LSB)
                                       G/H = (MSB*256 + LSB)/6144
      10            COOLDEGA      COOLANT TEMPERATURE
                                       DEG C = N*.75 - 40
     - CHECKSUM

  4. #19
    LT1 specialist steveo's Avatar
    Join Date
    Aug 2013
    Posts
    4,007
    alternatively if the car had a second display unit somewhere for driver warning messages, maybe the second message was exclusively for that module?

  5. #20
    Fuel Injected! Quaraxkad's Avatar
    Join Date
    May 2019
    Posts
    37
    The tachometer is the only part of the panel that is controlled by the ALDL stream. All other gauges and lights on the panel are handled by the "traditional" method. That's why I made my initial test as only that one short message block. The $05 $5F message includes the redline, which I will want to use also so I'll be including that in the final code. And yes, there is an optional Driver Information System that displays things like fuel efficiency, which I presume it gets the data for from that $05 $5F message, and also a HUD that projects messages onto the windshield. If I ever get either of those options, now I'll know how to make them work!

    Regarding the delay, I thought that making sure the write buffer had space would slow it down. Is that not the case?

  6. #21
    Fuel Injected!
    Join Date
    Mar 2013
    Posts
    1,470
    0A 58 00 00 00 9E message is also streamed on an 94 f-body. The first 2 bytes are some 16 bits rpm derived and the third is empty.
    F-bodies got only abs and sir modules on the line. Abs message is with id $91 so $0A could be targeted only to SIR module.

    With eehack raw mode you can send fake aldl message and see how the dash reacts to them.

    It is very likely that the obd2 pcm can stream aldl data. Gm keep the aldl modules upto 2002+ year and most of the newer pcms stream data on the aldl to integrate with the older modules. Do you have the p/n of the pcm.

  7. #22
    Fuel Injected!
    Join Date
    Mar 2013
    Posts
    1,470
    There is no sir module on the international cutlass. The logs that you have are made by a 92 pcm? It is very likely the dash you have to use different pcm message from an ealier model pcm.

  8. #23
    Fuel Injected! Quaraxkad's Avatar
    Join Date
    May 2019
    Posts
    37
    Quote Originally Posted by kur4o View Post
    It is very likely that the obd2 pcm can stream aldl data. Gm keep the aldl modules upto 2002+ year and most of the newer pcms stream data on the aldl to integrate with the older modules. Do you have the p/n of the pcm.
    It's a 2004 PCM. The service number is 12583827

  9. #24
    Fuel Injected! Quaraxkad's Avatar
    Join Date
    May 2019
    Posts
    37
    Got the Arduino this morning, uploaded the code, plugged it in:

    Attached Images Attached Images

  10. #25
    Fuel Injected!
    Join Date
    Mar 2013
    Posts
    1,470
    That dashboard is sick.
    The 2004 pcm is not likely to have built in aldl line. Hacking that is another topic.
    However it will stream rpm data over obd2. It uses VPW protocol.

    Why not just make a vpw -> aldl transciever.

  11. #26
    Fuel Injected! Quaraxkad's Avatar
    Join Date
    May 2019
    Posts
    37
    VPW, that's the Class 2 stream, right? I was looking into that as a possible source of input to get the RPM signal.

    But first, I think I may have a math problem in the code above... I attached a pot to use for input, and I get a whole sweep from 0 to 7000, but it happens in large chunks rather than one segment at a time. Almost like it's only reading the MSB.

    Code:
    int potPin = 2;
    int potVal = 0;
    
    void setup() {
      Serial.begin(8192);
    }
    
    void loop() {
      delay(100);
      if (Serial.availableForWrite() > 5) {
        potVal = analogRead(potPin) * 7;
        int rpm = potVal;
        byte msb = floor(rpm / 256);
        byte lsb = rpm % 256;
    
        byte b[5] = {0x0A, 0x58, 0x00, msb, lsb};
    
        unsigned int x = 0, sum = 0;
        for (x = 0; x < sizeof(b); x++) sum += b[x];
        byte cs = ( 256 - ( sum % 256 ) );
    
        Serial.write(b, 5);
        Serial.write(cs);
    
      }
    }
    I added the longer delay so I could see the onboard TX LED flashing, too short a delay and it just looks like it's *on*. The potentiometer input should be 0-1023, so multiplying that by 7 gives me something closer to my 0-7000 gauge. Am I calculating the lsb correctly?

  12. #27
    Fuel Injected!
    Join Date
    Mar 2013
    Posts
    1,470
    The whole conversion might be wrong

    Code:
     ldd     #$168
    RESERVED:90BF                 ldx     word_1C3 minorloop reference
    RESERVED:90C2                 fdiv
    RESERVED:90C3                 cpx     #$168
    RESERVED:90C6                 bhi     loc_90CB
    RESERVED:90C8                 ldx     #0
    RESERVED:90CB
    RESERVED:90CB loc_90CB:                               ; CODE XREF: BYTE_d1_SOME_SPEEDO_RELsub_8FEB+DBj
    RESERVED:90CB                 stx     word_1B26
    RESERVED:90CE                 xgdx
    RESERVED:90CF                 lsrd
    RESERVED:90D0                 lsrd
    RESERVED:90D1                 lsrd
    RESERVED:90D2                 adcb    #0
    RESERVED:90D4                 adca    #0
    RESERVED:90D6                 std     word_15D streamed word
    This is the pcm calculation from 94 pcm $0A 58 message. It is some kind of high res rpm, but time based than revolution based.

    To get a better picture of the dash conversion start dumping 0a 58 xx xx xx messages with raw mode in eehack program and look how it is interpreted by the dash.

    It could also be
    byte b[5] = {0x0A, 0x58, msb, lsb, 0x00};


  13. #28
    Fuel Injected! Quaraxkad's Avatar
    Join Date
    May 2019
    Posts
    37
    I tried manually setting numbers for all three values after 0x58 one at a time, and the second one is the only one that causes the gauge to respond. Even if my MSB and LSB calculation is correct, the LSB doesn't do anything! I can *not* imagine that's how the gauge works with only ~27 steps between 0 and 7000.

    I could play with eehack, but that's just another thing I don't understand and would have to learn how to wire up and use...

  14. #29
    Fuel Injected! Quaraxkad's Avatar
    Join Date
    May 2019
    Posts
    37
    Success! I changed my code to this and got a smooth sweep from 500 up...

    Code:
    byte msb = 0;
    byte lsb = 0;
    
    void setup() {
      Serial.begin(8192);
    }
    
    void loop() {
      delay(10);
      lsb++;
      if (lsb > 254) {
        msb++;
        lsb = 0;
      }
    
      byte b2[5] = {0x0A, 0x58, 0x00, msb, lsb};
    
      unsigned int x = 0, sum = 0;
      for (x = 0; x < sizeof(b2); x++) sum += b2[x];
      byte cs2 = ( 256 - ( sum % 256 ) );
      Serial.write(b2, 5);
      Serial.write(cs2);
    }
    Now to figure out what I was doing wrong to begin with. It's gotta be the LSB math?

  15. #30
    LT1 specialist steveo's Avatar
    Join Date
    Aug 2013
    Posts
    4,007
    it worked already!?
    that byte order thing always screws me around too.
    the uno int is 16 bit so you can probably just cast it.

    b2[3] = (unsigned int)rpm;

Similar Threads

  1. New guy old project
    By The Stickman in forum Introductions
    Replies: 1
    Last Post: 04-24-2015, 05:26 AM
  2. Need help on new project
    By SuperHbody in forum GM EFI Systems
    Replies: 0
    Last Post: 01-05-2015, 06:45 AM
  3. new here...odd project and need help
    By travisr1988 in forum GM EFI Systems
    Replies: 5
    Last Post: 04-19-2014, 06:30 PM
  4. Another TPI Project..
    By ezobens in forum GM EFI Systems
    Replies: 16
    Last Post: 01-20-2014, 05:49 PM
  5. 85 k5 project?
    By mjc in forum GM EFI Systems
    Replies: 0
    Last Post: 12-24-2013, 01:50 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •