PDA

View Full Version : Reading from External Hex Address...



sbouda
- 29th October 2008, 05:17
Hey all,

Ive used pics on and off for a while and just recently made a TPS and AFM volt and percentage display but now im onto a new project. Im using if its adequite a 16F877A.

I am trying to make a Nissan ECU reader using a pic similar to http://www.ecutalk.com which also uses a Pic and plugs into the Consult port of the ECU.

I have a list of Hex addresses and the scaling so i know what address on the ECU is for what.

Basically what im trying to do is send a HEX string to the ECU to initialise it to output (in which case its 0xff 0xff 0xef) and then read from the TX/RX port of the ECU a certain hex address, in which the ECU will send out as a byte or bytes, which the pic will then using some math will convert it to the right value to display on an LCD.

For example: Coolant Temp from Hex address 0x08.

How would you go about this? this is where im stumped - ill keep searching the forum but ive searched for a we while and nothing yet.


Also, another - would an extra chip be required to read the TX/RX lines then the pic reading that chip? Max232 for example? or can i just connect straight to the chip?

Just a note, people have made RS232 adaptors to plug in a computer to the ECU (schematics are freely available on the net), so what im trying to do is replace the computer side with a standalone unit like the one above using a 16x4 or larger LCD.

Thanks.

Im using PicBasic Pro 2.46 as the compiler.

aratti
- 29th October 2008, 11:23
You can use three push-buttons. Two for up & down to select the address you want to send out. once you have the wanted address on the LCD then you press the send button. This command SEROUT your address code and immediatly you SERIN to listen the answer that you will direct to the LCD after your maths manipulations.

I have no idea of how many codes you need to handle, but if they are too many and will not fit in the internal eeprom, than you have the chance to use an external memory chip via I2C.

Al.

sbouda
- 30th October 2008, 03:14
Thanks for that - that gave me an idea on where to start and how to go about it. Ill have a crack at the SEROUT and SERIN and see what i can come up with.

Ill be limiting the list of addresses to about 10, to the ones that i actually want and if they dont fit or i need more, I will work around some form of external memory.

Right, ill go and see what i can do. Will post back soon.

skimask
- 30th October 2008, 03:27
Do you have the specifications of Nissan's Consult protocol?
It's not just plain 'serial' data, it's a lot more complicated than that, a lot more complicated than even ISO9141-2.

sbouda
- 30th October 2008, 06:33
The only thing i could find on the protocol was this PDF which explains it. http://www.plmsdevelopments.com/images_ms/Consult_Protocol_&_Commands_Issue_6.pdf


Edit: After a bit of searching, i found a few posts by oldcarguy85 about a similar thing that he has done so im looking into it.