I went through each and every Dupont pin, bending the small contact grips to form a more tighter contact to the pins as I suspected it may possibly be a bad connection. The enxt day I came back to do some more logging and suddenly the failed to set CAN rate was showing again. So I took it out to my car and set it up - started logging the 500KBPS lines, and then my laptop's battery died, I packed the Mega and MCP2515 module into my glove box and went to recharge my laptop. After I corrected this, I got it setting the CAN Baudrate perfectly. In the above picture I had wired it wrong (coming back to it later at night I instantly recognised the issue) - SCK was on Pin2, rather than Pin3. Has anyone got any advice on how to proceed here at all? I've "wasted" more time than I care to admit switching pins around, and trying different libraries and fixes elsewhere. Unfortunately I don't speak German, and translate gave some sketchy results, but it seemed to be a hardware issue? I thought I'd try pushing my connections on the MCP module side of things a little harder to ensure they were secure - as I did this, it returned a status of "111111", but I suspect this was due to me perhaps somehow shorting the pins on the back of the module with my thumb more than a loose connection. It returned simply "MCP2515 status: 0" most of the time. I then tried the sketch posted by Tobias K. As mentioned I've tried numerous different pin locations for this, but no matter what, I can't seem to get this to work! When running the Coreyjfowler's receive example in debug mode, I get "Enter setting mode fall" which is obviously an issue communicating with the MCP2515 chip to set it Baudrate etc. I've then also tried using pin 50,51,52, and 53 for the SPI lines too. I've tried Seeedstudio's library, and even followed the advice about using the ICSP headers on the Mega for SCK, SI and SO (And changing CS to pin 9). I'm currently having issues getting it work still. I've recently purchased a MCP "module" that looks like this:įirst hurdle was finding out the 8MHz crystal didn't work with the Seeedstudio/Coryjfowler's examples - so I went ahead and swapped that out for a 16MHz crystal from Maplin. So I know there's quite a few posts about CAN already, but I'm really struggling to get this to work.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |