therooster2001
Active member
- 824
- 44
- 28
- Location
- Colorado
Steel Soldiers now has a few new forums, read more about it at: New Munitions Forums!
DE = DRIVER ENABLE, pull high to enable data transmitGRR. so it was my wiring. I will probably jumper the board permanently.
[COLOR=#323333][FONT=Courier][SIZE=2][COLOR=#008000]#define RSE 14[/COLOR][/SIZE][/FONT][/COLOR]
[COLOR=#323333][FONT=Courier][SIZE=2][COLOR=#008000]void setup() **
Serial.begin(115200);
Serial1.begin(9600);[/COLOR][/SIZE][/FONT][/COLOR]
[COLOR=#323333][FONT=Courier][SIZE=2][COLOR=#008000] digitalWrite(RSE, LOW);
delay(100);
}[/COLOR][/SIZE][/FONT][/COLOR]
[COLOR=#323333][FONT=Courier][SIZE=2][COLOR=#008000]void loop() **[/COLOR][/SIZE][/FONT][/COLOR]
[COLOR=#323333][FONT=Courier][SIZE=2][COLOR=#008000] // Declarations
unsigned char sBuffer[100];
digitalWrite(RSE, HIGH);[/COLOR][/SIZE][/FONT][/COLOR]
[COLOR=#323333][FONT=Courier][SIZE=2][COLOR=#008000] // Check for RS485 data[/COLOR][/SIZE][/FONT][/COLOR]
[COLOR=#323333][FONT=Courier][SIZE=2][COLOR=#008000] int nBytes = Serial1.available();
if(nBytes > 0)
**
int nCount = Serial1.readBytes(sBuffer, nBytes);
for(int nIndex = 0; nIndex < nCount; nIndex++)
**
Serial.print(sBuffer[nIndex], HEX);
Serial.print(" ");
}// end for
} //end if
}// end loop[/COLOR][/SIZE][/FONT][/COLOR]
[COLOR=#008000][FONT=Arial][FONT=monospace]#define RSE 14[/FONT][/FONT]
[FONT=monospace]void setup() **
[/FONT][FONT=monospace]Serial.begin(115200);
Serial1.begin(9600);
digitalWrite(RSE, LOW);
// delay(100); commented this one out, as I don't want to miss anything.
}[/FONT]
[FONT=Arial][FONT=monospace]void loop() **[/FONT][/FONT]
[FONT=Arial][FONT=monospace] // Declarations
unsigned char sBuffer[100];
[/FONT][/FONT]
[FONT=Arial][FONT=monospace] // Check for RS485 data
int nBytes = Serial1.available();
if(nBytes > 0)
**
int nCount = Serial1.readBytes(sBuffer, nBytes);
for(int nIndex = 0; nIndex < nCount; nIndex++)
**
Serial.print(sBuffer[nIndex], HEX);
Serial.print(" ");
}// end for
} //end if
}// end loop[/FONT][/FONT][/COLOR]
Yeah, I was considering that lately, it would at least give me a bunch of error codes I could immediately deal with. I have the pin outs, so not a bad idea. I was hoping this would be easier and quicker, and with no idea the signal, I should have started with a scope. I really thought I would just pick the signal up quickly, but I keep running into issues with a seemingly simple problem. I am just reading a known signal from a wire. I am using this as another learning experience, but it is definitely a back burner project, so it looks like I've been floundering for a year, but in actuality, It's just tough to keep running back and forth to the truck (about 20 miles away) to test, then realize it's a stupid mistake (like the the jumpers, or the wrong direction of states). I am a newbie at scopes so it's a bit of hesitation so I don't do the wrong thing, read it wrong or something silly. Sometimes when you tackle new things, you need to learn more about more things. J1708 protocols, RS485 IC's, and now scopes. All new to me. Armed with a good diagram, but no knowledge of IF the actual ECU is outputting the signal,and no one to confirm flashes or even to talk to about the ECU is a little like stumbling in the dark,and is literally reverse engineering 30 year old technology. I am convinced I will get it, and we will have some sort of Nirvana with what codes it's outputting. I bet it will still be "you have an air leak somewhere" 75% of the time. I do best with a buddy to bounce those ideas off of, so thanks all for the ideas and encouragement.Perhaps putting 24V on a pulled module and bench testing it in the comfort of your home would be easier than on a 5-ton until you establish communications?