Another point to check just came into my mind:
The PIC you are using has internal PLL - did you check its configuration?
Another point to check just came into my mind:
The PIC you are using has internal PLL - did you check its configuration?
Hmm...
I got $03 $BF $07 for 20MHz and 100kbps from the calculator.
Furthermore, your CIOCON configuration differs from the one I suggested, try setting it to $20.
Another idea: I am not sure whether you have to set the DLC register in config mode or if normal mode is possible..
Last edited by inse; - 22nd February 2010 at 22:18.
For anyone willing to dig into the CAN-bus I conclude this thread:
ZX81SP finally got his code running - it was a matter of oscillator configuration.
I have listed the necessary steps for setting up CAN above - except that the CAN Bit timing calculator is available from www.intrepidcs.com, not from Microchip.
This is about the only useful thread I've found regarding CAN communication. This is way above my level of expertise but I was never one to give up. My objective is to communicate with a locomotive that uses CAN communication.
Can anyone tell me if I use the same PIC and code above, will it allow me to transmit data on the CAN network? I realize my configurations will probably be different but what about the RX side of the CAN? Will it be easier than the transmit?
Last edited by Christopher4187; - 2nd July 2012 at 17:16.
Christopher,
it's hard to give sensible answers as you supply no details about the project.
Do you know what the communication is going to look like?
If you are going to setup a bidirectional communication a CAN analyzer will be a very useful tool.
Ingo
Bookmarks