View previous topic :: View next topic |
Author |
Message |
albertsm
Joined: 09 Apr 2004 Posts: 5914 Location: Holland
|
Posted: Wed Jul 27, 2011 9:06 am Post subject: |
|
|
a normal forum usual starts with a question, or some code.
the blog is essential a forum, so users can respond to the blog, but the topic/blog starter can update it when he/she likes.
so it could be updated each day, week, or month or time there is something to report. _________________ Mark |
|
Back to top |
|
|
Matrixx
Joined: 30 Nov 2005 Posts: 158
|
Posted: Wed Jul 27, 2011 1:17 pm Post subject: |
|
|
Hello
I have used the project with the car itself. Altough it seems to get all the bytes I noticed sometimes it get some long frames, I'm suspect they are no so well spaced frames, nodes data crowd or maybe a IFR (In Frame Response). As I read GM does no use IFR's but this is something I need to check. I had no time to mount the web page but I have working on a Delphi utility instead to parse the interface output.
At this time I grab the interface ouput using the Bascom terminal emulator then saving to file. The purpose of the utility is a temporary way to expand the messages significance, from saved file first, then realtime for sure.
I think I will review the M2560 code and do some tweaks at EOF detection. VHDL mod is required in the simulation to add more simulated data and start to play with frame separation timings.
Whiile this, I need to build the bidirectional circuit to start talking with the nodes.
|
|
Back to top |
|
|
Matrixx
Joined: 30 Nov 2005 Posts: 158
|
Posted: Sat Jul 30, 2011 6:46 am Post subject: |
|
|
I have uploaded the actual project content to
http://www.diyprojects.zobyhost.com/
I have had a busy week. The bidirectional schematic is built and I;m woking on the TX procedure. This procedure sends the request to PCM.
So far so good, byte parsing works fine.
This is the result of TX sub:
Say we want to send $6A to PCM:
output:
Code: | J1850VPW SENDER 1.00
By: Matrixx
Go.
Bytes To Send: 1
ŻŻŻŻŻŻ|__|ŻŻ|____|ŻŻŻŻ|____|ŻŻŻŻ|____|ŻŻŻŻ|______ as $6A
|
|
|
Back to top |
|
|
Matrixx
Joined: 30 Nov 2005 Posts: 158
|
Posted: Wed Aug 17, 2011 5:41 am Post subject: |
|
|
Finally I'm getting the Send vpw subroutine to work.
I wrote a separate source to act as vpw sender, to send bytes to the previous vpw receiver. I get messed adjusting the timings for the sending routine as the loop itself added some uC cycle time making the output pulses wider.
So far this is the subs code in Bascom:
Code: |
Dim Snd_str As String * 30
Snd_str = "6A7C3B35FF"
Gosub J1850_send
Wait 1
End
Sub J1850_send
Gosub Preparebytestosend
For I = 1 To Nbytes
If I = 1 Then
Gosub Send_sof
End If
Tmpbyte = Txarray(i)
Gosub Tx_data
Next I
Gosub Send_eof
End Sub
'Fill The Array with the Bytes to shorten waste time..
Sub Preparebytestosend
Snd_qty = Len(snd_str) : Snd_qty = Snd_qty / 2 'Every Byte is represented by 2 characters
If Snd_qty > 12 Then
Print "Error: more than 12 bytes!"
Waitms 500
Exit Sub
End If
Print "Bytes Qty: " ; Snd_qty
Nbytes = Snd_qty
Print ""
Print "Sending: ";
Str_index = 1
For I = 1 To Snd_qty
Sbyte = Mid(snd_str , Str_index , 2)
Tmpbyte = Hexval(sbyte)
' Tmps = Bin(tmpbyte)
Print "$" ; Hex(tmpbyte) ; " " ;
Txarray(i) = Tmpbyte
'Gosub Tx_data
Str_index = Str_index + 2
Next I
'Gosub Send_eof
End Sub
Sub Tx_data
For J = 7 To 0 Step -1
If Tmpbyte.j = 1 Then
If Last = 1 Then
Gosub 1_low
Else
Gosub 1_high
End If
Else
If Last = 1 Then
Gosub 0_low
Else
Gosub 0_high
End If
End If
Next J
End Sub
|
Project advance at: http://www.diyprojects.zobyhost.com/ |
|
Back to top |
|
|
Matrixx
Joined: 30 Nov 2005 Posts: 158
|
Posted: Mon Aug 22, 2011 2:58 am Post subject: |
|
|
[August 21th 2011]
This is a nice day. I joined the Sender part with the Receiver part. After some errors I started talking with the Desk PCM.
I have a borrowed TouchScreen Serial color LCD screen. The LCD brings 480x272 at 4.2" full 65,535 colors. I have started with this LCD because it brings a very good space to play with debug data. For DIY release I will use a cheaper B&W LCD (this one is $260, out of my budget).
Using serial LCD is great, I'm have it set to 57,600 baud and as it has buffers I can go faster with the timing operations.
Project can now request available PID's, request Troublecodes, Clear troublecodes and Freeze Frame data (turn off SES a.k.a ENGINE light). Altough it does, I'm currently working on decode the bytes to show it in plain english on LCD.
Image captures will be ready next day, as well the site update I hope.
B.T.W, Wonder why I implemented Clear codes now?
My car is going mad. There are some months it started suffering of "summer heat"... I can drive ok until sun gets outdoor temperature up to 35 C.
Then car stalls and die. It need to cool 1 or 2 minutes to go again. This gets worst at stop lights in crowded traffic.
Yes, I know... I have tested fuel pressure, fuel regulator, MAP, MAF, TPS, O2, CPK24x, CPK7x. Water temp do not go over mid-gauge so I guess is not the engine coolant. This afternoon I swapped the PCM I was using for experiments, relearned it and drove the neighborhood. Tomorrow will test if have any cure. I have pending to change the CAM sensor too.
All this leave the SES light on. Codes? EGR insufficient, but I have replaced it too. At least this day I was able to clear the SES with my own DIY scanner |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
|
Back to top |
|
|
Matrixx
Joined: 30 Nov 2005 Posts: 158
|
|
Back to top |
|
|
Matrixx
Joined: 30 Nov 2005 Posts: 158
|
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Fri Aug 26, 2011 11:24 am Post subject: |
|
|
Matrixx wrote: | Hey, that touchscreen is nice!
|
Yes and cheap only $24 US including delivery just have to ask them to "pack it good in box" it comes from china my first one the touch screen was broken (LCD works) but they were good about it, gave a big dicount on second one which I was happy with since the LCD is still ok. |
|
Back to top |
|
|
six1
Joined: 27 Feb 2009 Posts: 553
|
Posted: Sun Dec 11, 2011 10:37 am Post subject: helpfull for you? |
|
|
Hi Matrixx,
years ago i played arround with OBD-II and Bascom.
here is the code, maybe it's usefull for you... _________________ For technical reasons, the signature is on the back of this message. |
|
Back to top |
|
|
Matrixx
Joined: 30 Nov 2005 Posts: 158
|
Posted: Mon Dec 26, 2011 4:57 am Post subject: |
|
|
Thank you!! I just get my vacations 1 week for hollydays so I will update the page, i need to continue the project.
Happy New Yer 4 all : ) |
|
Back to top |
|
|
Matrixx
Joined: 30 Nov 2005 Posts: 158
|
Posted: Mon Jun 18, 2012 7:10 am Post subject: |
|
|
Hello guys!
I sad that have not worked on this project for several months.
Work is really overhelming me, I have 2 big projects and deadline times. i want to finish because i have been working late up to 2:am almost 4 days at week, since some months..
I will finish these projects soon. Will be glado to continue with the OBDII.
By the way, today I belive I found the problem of my car. Laugh if you want. this problem appears when ambient temperatures rises the 40 centigrade, so I have been chasing the problem for about 2 years.
Dumb Me.
I replaced almost everything, but the fuel pump.. when car fails, voltage to the Fp is still present, and the FP is still whinning if I get close to the fuel tank..
today, I plug a fuel pressure tester (manometer). Parked in my house refused to fail for more than other half hour. then I
take the risk to drive for more than half hour with the pressure tester hooked inside motor compartiment. Guess what? the car begins to fail. I stopped, opened the motor compartiment, and voila, pressure was around 15 PSI.
so many sensors, computer, loss time for nothing?????????
Hope to replace the fuel pump and PR too.
And finish the Onboard OBDII display!!!! |
|
Back to top |
|
|
|