Your program looks OK at first glance altough I didn't verify the BRG values.
What puzzles me is: do you really use an PIC18F258 in combination with an MCP2510?
Or do you use the PIC18F258 with the MCP2551 CAN transceiver as mentioned earlier?
The MCP2551 has a standby pin - how is it controlled?
It must be tied low for operation!
Check this and we can do further examination on the code.
Are you sure you have set up and connected your CAN-USB adaptor correctly?
A scope could show you if there is any activity on the bus.
Bookmarks