Hi,
As far as I can see there's nothing in your code that actually sends any data anywhere. In the SENDCANDATA you pull the CS line low, then you assign some values to a couple of variables, then you pull CS line high again. There's nothing to actually shift any data out of the PIC using either SHIFTOUT/SHIFTIN or the MSSP module.
Is there any chance you've looked at some code for a PIC with a built in CAN tranceiver? Is that perhaps where the TXBNDLC etc variables are coming from? If so, then those are probably registers for that particular PICs internal CAN tranceiver and simply creating variables with the same name will obviously not get anything out of your 2550 and into an external CAN tranceiver.
/Henrik.
Bookmarks