日本語版はこちら
For his dream that become F1 racer

Possible communication that provides variety speed and bit-level same as my thinking on the PIC.
Hi ,I'm Tokeo as named "OYAJI" at Chiba county of Japan.

In the past, I had tried to communicate with my car after making up some communication program to attack the ECU that seems OBDII based on ISO-9141.

But, he didn't say anything....

Well,,, the program at that time was embedded in PIC16F877.

If it's use for only yourself and not problem, you are welcome to use the following for try.

Name "Nego277", that advanced from ULC-tutorial at Tuning-B and planned base by WBB_OBD2.
Description: This mediates interfaces between single-line and RS232C as a half-duplex synchronized communication.
May think the single-line same as K-line.
May think the RS232C is connected with PC.
In addition,communicating the side of single-line has possibility to variety speed
and bit-level by operation from RS232C's command.
Spec of RS232C side: 1 stop-bit,non-parity.
bps :38400.
Communicates characters:
Some command-characters ("b","Z" and "0-9A-F" follows "b") are defined to setup for single-line. And, be sent or be received data is expressed as HEX-characters ("00","01",,"FF" at capital letter).
Spec of single-line side: 1 stop-bit,non-parity.
bps :19200bps-5bps be set up by operation from PC connecting to RS232C.
Line's level ("Port-ON or Port-OFF",specified as logic 0) is set up by operation from PC also.
Experienced trust: Test environment is communicating between PC(RS232C-side) and PC(single-line).
After bps set up, interactive communication was good at 300bps,1200bps,4800bps,9600bps,19200bps.
Receiving at 9600bps after sending at 5bps was good also.
The various time scale and bit-level was tested by oscilloscope.
But, try was unsuccess at my car.
Embedded to: PIC16F877 provided by Microchip Corp.
For build : builds development environment :
  MPLAB available that can be downloaded from Microchip Corp web site.

Building from progarm source code:
  List of needful source file:
http://tokeon.o.oo7.jp/nego277/COMMON.MAC
http://tokeon.o.oo7.jp/nego277/NEGO277.ASM
http://tokeon.o.oo7.jp/nego277/nego2dat.inc
(Those have to be put on same place in a folder, when making up at the MPLAB project.)

HEX-File for pressing to PIC-Chip:
http://tokeon.o.oo7.jp/nego277/NEGO277.HEX

A schematic circuit:
Refer http://tokeon.o.oo7.jp/nego277/nego277.gif


This photo is Nego277 made by me so very simple.
A English manual :
(1) Setup to your PC for communicating with Nego277:
Before turn on the power of Nego277, connect a RS232C-cable to Nego277's RS232C-side and start a communication software.
Setup a communication of software. (You can use the software same as Windows-Hyperterminal):
  38400bps,1 stop-bit,non-parity,non-flow-control,non-LocalEcho.
(2) Turn on the power of Nego277:
When you sight a LED's ON, it means "power ON".
(3) Connect single-line to target (K-line of ECU,another PC,etc) :
To your aim's.
If the target is ECU you will do (2) and (3) at a time.
(4) Setup to a communication of single-line:
First confirm Nego277 standby:
  If when you type "Z" from PC, you can sight a message "Z001000", it means "standby OK".
Send setup-commands to Nego277 from PC:
Setup-Command characters:
 bXXXXd : Setups to bps and bit-level.
b "b" means character "b".
XXXX "XXXX" is the value of as bps, 1-bit time counter of 3.2 micro-second period and specified between "0010" and "F424" (equals between 19200bps and 5bps).
examples:
Specify the "0020" if you need the 9600bps, it nearly equals "1sec/(9600bit*3.2us)".
Specify the "001E" if you need the 10400bps, it nearly equals "1sec/(10400bit*3.2us)".
d "d" means a level of as the logic-0 of single-line on PIC's Port.
(but,it means a reverse on Nego277's line.)
If logic-0 level is High (+12V) on Nego277's line, specify the "0".
If logic-0 level is Low (GND) on Nego277's line, specify the "1".
A arranged example:
  When you need sending at 5bps to K-line (logic-0 is Low-level), type the "bF4241".
 Z : Displays the setup value.
    When you type "Z" you can sight "XXXXdd".
XXXX "XXXX" is a setup value of as bps, 1-bit time counter of 3.2 micro-second period and expressed between "0010" and "F424" (equals between 19200bps to 5bps).
dd "dd" means a setup bit-level of as the logic-0 of single lin on PIC's Port.
If logic-0 level was High (+12V) on Nego277's line, expressed the "00".
If logic-0 level was Low (GND) on Nego277's line, expressed the "04".
(5) Sending data to single-line:
Type Hex-characters the following:
"XX" is 1 byte data that be specified between "FF" from "00".
(It must be a capital letter and 2 characters.)
And "CR-code" instructs to send the above-mentioned stacked data to single-line.
Or when the above-mentioned stacked data reach to 10 byte,sent also.
(6) Receiving data from single-line:
Sight the Hex-characters of the following while receiving data from single-line:
"XX" is 1 byte data that be expressed between "FF" from "00".
(7) A serial operation
The following example is sending "55" to single-line at 5bps, and bps is changed to 10400, and it waits the data.
1) Types "bF4241" and CR-code. (Setup 5bps and logic-0 is set Low-level)
2) Types "55b001E1". (Waiting the data after sending "55".)
At the last: I'm pleased with your visit and I thank you for your reading though this page is unskillful English.

I hope that your try is success and getting message from you for improving this.

Writer,and planner,and acter is:
H.tokeo(Singo Bluse Nabeshima) at 2003/07/29.


GO HOME page.

WBB_OBD2
Tuning-B


This site is a member of WebRing.
To browse visit  Here.