CAN - Shield

I am using the UNO SMD r3, and i am trying to use the skpang can shield with it to communicate with my racing car ecu. The ECU is a DTA Fast S800pro. The can stream data can be found at this addresshttp://www.dtafast.co.uk/Downloads/Manuals/S%20Series%20CAN%20Stream%20Generic.pdf

I am struggling to find libraries / code for anything to read can at 1Mbps (1000kbps). All i need to do is receive messages and output them over serial to other devices. The output i have no trouble with, i just cannot find a way to get the device to read the can from my car at all,
any help much appreciated,
Chris

SK Pang delivers some sample code for the shield (http://skpang.googlecode.com/files/Canbus_v4.zip). Can you explain what difficulties you have with that code? You should filter the messages from the CAN bus on the Arduino because you won't be able to transfer all the traffic to the computer at 1Mb/s.

thankyou, i will have a look at that. the problems i am having are that i cannot get the arduino to display any of my messages from the car. the default baud rate for the can in this is 250k, i need 1M and i do not understand what and how i modify the code for it to read this, or how to filter out the messages i need, i have the identifiers, but where do i go from there?
sorry, but i really do not understand why this will not work

If you set

Canbus.init(0);

you should have selected the maximum speed available which is 1Mb/s according to the datasheet.

would that be instead of canbus.init(CANSPEED_500);
or should i put (CANSPEED_0)
Sorry, i'm new to all of this

CANSPEED_0 is not defined, so you should use the supplied line instead of the other canbus.init() line.

this is not working with the car

I just told you how to get 1Mb/s out of the MCP2515.

this is not working with the car

This expression is not very helpful. Have you got a scope to that line to check what signals there are? We can't solve your problems because we don't have the hardware. You have to do the investigations, you have to measure and try and try again.

the car is communicating with a canalyzer, so the can messages are there. i just cannot get the arduino to read them, i am having the trouble that not only is it extended can, 29bit, also that it is HS, 1000kbps. all of the libraries available are for 250, or 500, standard can

also that it is HS, 1000kbps. all of the libraries available are for 250, or 500, standard can

With the change I posted you can set the MCP2515 to 1Mbit/s.

But you still didn't explained what "this is not working with the car" means. Did you get incomplete messages? Did you get no reaction at all?

Show us YOUR code! Exactly the one you're experimenting with.

i am getting no reply at all. i am using the demo code at the moment, as i am just trying to get the messages to print to screen. after that i will use them in the way i need to. but at the moment i am just trying to get it sending messages to the unit. But your line of code had no effect on it, i am still receiving nothing

You should have changed at least my line of code. So post that changed code. The library exists in several versions and the examples may have changed too. We must know, what code exactly you are using.

Also provide a picture of the wiring you have done (with explanations if not everything is visible). When you get nothing it's possible that the error lies there (a hundred pairs of eyes see more than one pair).

i literally just tried it modifying the line you told me, but it did nothing. so i reverted back to the original. As far as the circuit goes. Arduino uno with skpang can-bus shield. the d-sub of this, is connected to a d-sub on the car, which is communicating the CAN messages. the car side DSub is working with a canalyser, so i know the can messages are there

joneschri:
the d-sub of this, is connected to a d-sub on the car

Connected how?

I don't understand why you're so reluctant to give details of the hardware and software you're using. It matters; without that information, how is anybody supposed to guess what may be going wrong?

i am not reluctant. i am telling it as it is. there is a d sub on the can-bus shield. There is also a d sub on the car, pinned as the dsub on the canalyser and can shield require, can high, and can low going to the appropriate pin. That is the set up. what else is there to tell?

joneschri:
i am not reluctant. i am telling it as it is. there is a d sub on the can-bus shield. There is also a d sub on the car, pinned as the dsub on the canalyser and can shield require, can high, and can low going to the appropriate pin. That is the set up. what else is there to tell?

What pins are connected to what? Does the CAN bus require any RS232 control signals? Are you using a straight or crossover cable? There are umpteen different ways to connect RS232.

I hope there aren't any RS232 signals on the D-Sub connector. But PeterH is right: Just because there is D-Sub connector on the car and one on the shield doesn't mean that the right pins are connected. Even if your canalyser connects there and has the right connections, that doesn't mean that the CAN shield is wired the same way. The CAN shield has a D-Sub to connect a cable which connects to a OBD-II connector in a car. I'm not aware of a CAN standard for D-Sub connectors.

So please provide the requested material!