3 Attachment(s)
Low level J1850 tool/HW/SW
Hi,
I have come to the end of another of my sub-projects. I spent the last few months learning some of the details of windows programming. I have built software that works in conjunction with the Home Brew Cable (HBC) that was written earlier. This tool gives the user the ability to exercise the J1850 port. All commands can be supported with the exception of the 4X mode... still working on that.
This system breaks down into three main sections.
The first section is the cable hardware. This was detailed earlier, but two small changes have been made to enhance the operation. There is a new JPEG of the interface. The Arduino Nano is used for it's low cost. This whole interface fits on a small perforated board. The costs of parts is way up, but it is still under $20 to build.
The second section is the cable software. This software runs on the Nano and essentially translates between the J1850 and standard NRZ serial over USB. Small changes to this code have been made to prevent overrun of the TX. To prevent this overrun, XON/XOFF protocol has been added to the PC --> PCM link. This change permits the cable to throttle data coming to it from the PC.
Last section is the PC software. I wrote an app that the user can issue the J1850 commands. Once the app is booted, the user selects the Com port that the cable is on and connects. There are 20 configurable keys that allow the user to issue commands. There is also a command line entry for the commands that are entered once. This is an interface that I find flexible. Another feature is the repeat "tester present" timer. This ensures that once the security password is issued, it does not time out.
I wrote this for the 1997 Z28 Camaro PCM that I am working on but is should work fine on GM cars 1996 through about 2003.
Attachment 17970
The interface has a dozen parts or so and should be easy to build.
Attachment 17971
The software that resides on the Nano is provided in the archived sketch. By running the Arduino software tool, the sketch can be uploaded in less than a minute.
Attachment 17972
Here is a shot of the user interface. The buttons down the left screen are programmable to any J1850 command you need. Details of this software will be in another post following soon.
-Tom
2 Attachment(s)
Low level J1850 tool/HW/SW
The app that works with HBC is written in C++. People with other cables that would like to port the software, feel free to ask and I will get you my source code. Please if you do use the source, understand that I am self taught and some conventions that you might be used to I might not follow. I tried to write the code in classes that make it easy for me to port them to other apps.
The C++ IDE I use is Microsoft visual studio 2015. It is free, fairly complete and easy to use. One small disadvantage is that a microsoft runtime DLL must be installed. You can get the module needed at this URL:
https://www.microsoft.com/en-us/down....aspx?id=48145
Just follow MS's install instructions and you are done.
OK, so now to the app...
Attachment 17974
The app has a simple menu structure at the top. There is help available if you forget some detail, but fairly terse. The repeat menu permits you to turn on/off the tester present messages. Once connected, if you enable this timer, the app will send a "tester present" message periodically to prevent the tester from exiting the security disabled state.
The taskbar just under the menus contains a few controls. In the combo box, select the port your Nano is connected to. Not sure which port? --> run device manager and look at the available serial ports, pick out the one associated with your Nano. Once the app port select combo is set, hit the connect button. This lets system start and you should see an OK come up in the transcript.
At this point the app is ready to send commands. The user can enter them into the "line entry" edit control as follows. Permitted characters are hex (that is 0-9, a-f or A-F). User may enter spaces to make it more readable. Once the command is entered, hit the enter key and the command will be sent. The transcript will show both the command and the response. The transcript is always looking at the bus. This gets away from the ELM327 type command response. This permits commands that have multiple responses to be correctly monitored. Yes GM does use this sort of one request multiple response format.
The command buttons down the left side are configurable. To do this click the button with shift key down. You can then change the key name and the content to be sent.
Here is the app with the name changed with an appended .TXT.
Attachment 17973
I hope this is of use to someone.