Sorry for late reply, forgot to subscribe to topic. I used MCP_8MHZ but nothing comes from the car, guess I am doing something else wrong. Has anyone successfully connected with the car over OBD2 with this Nirem board?
The code should work with a MCP2510, MCP2515, and an MCP25625, but I have only confirmed it on the latter two ICs. Additionally, I have tested the library with that very module you linked to and recently infact. When you tried the receive example, did you have it connected to the vehicle with the key-switch ON (engine OFF)?
seems the code doesn't work for the CAN BUS shield mentioned, if not how to modify?
If the board has an MCP2515, MCP25625, or MCP2510, the library should work for those protocol controllers.The TJA1050 is a common CAN transceiver and is only used to translate the CAN_RX and CAN_TX into CAN_H and CAN_L for use on an actual bus.
Thank you coryjfowler for your reply.Yes like you said the ELM327 USB1.5 seems a surplus if do the diagnosis to a car. I used it here only try to get the communication between ELM327 USB1.5 and MCP2515+TJA1050 module. I have some novice questions need help please, sorry about.1. Should I set the ELM327 USB1.5's Baudrate same as the other device , guess YES, do you know how to do it? it was default set 38400 bps.
2. If it is hard to set ELM327's Baudrate, may easy to set the other device say MCP2515+TLA1050 can module, I modified the mcp_can.cpp and mcp_can_dfs.h added 38k4BPS 3 lines into the library used, still not work. I'll attached the modifications below. Maybe cause of the 38k4BPS s not a standard number, it doesn't like the other numbers say 250/500 change the color in the sketch.
3. The error "'CAN_38K4BPS' was not declared in this scope" , why?
4. I saw your advice about the ELM327, the purpose I'm doing this is try to make a ECU simulator with the Arduino+MCP2515 module work as a fake ECU, sure refer to Techthink.
5. I also tried the sketch you posted on #11 to reynard80, I got the same result with Arduino and MCP2515+TJA1050 MODULE, I tested it on two separately two sets of, all Error sending message ... , is it possibly to run the sketch without a real ECU unit connected ?
What's the key difference between TLA1050 and MCP2551? any solution on sketch?
hugo,your board has MCP2515 controller, so I it not any different from other boards with the same controller. I guess you have a wiring or code issue.
I assumed the loopback program would not work if the SPI wires are not all working properly???
You would be correct with that assumption, the loopback sketch would test SPI and /INT connectivity.The link you provided for the Joy-It module suggests the crystal is 8MHz, did you replace this or confirm that it is running at 16MHz as you suggest earlier?Are the CAN boards both Joy-It modules or is one a Seeed Studio shield? Have you tried connecting grounds between the two? What sketches are you testing with?If both microcontroller setups work with the loopback program, there is no good reason that going on bus would not work assuming the hardware is good.