Post History
I have a PIC18 and I'm trying to detect whether it is connected on the CAN bus or not. When the PIC is not connected on the bus, and I load the transmit buffers, after setting the TXREQ flag. The ...
#2: Post edited
- I have a PIC18 and I'm trying to detect whether it is connected on the CAN bus or not.
When the PIC is not connected on the bus, and I load the transmit buffers, after setting the TXREQ flag. The transmission does not start. This is also mentioned in the datasheet:- > Setting the TXREQ bit does not initiate a message
- transmission.
- However I cannot find a reliable way to detect that the PIC is not plugged into a healthy bus.
- Also, no errors in the registers appear.
- The only thing I can think of is polling the TXREQ flag for a few milliseconds to check if the peripheral initiated a transmission or not.
- But I'm not sure if that is a reliable algorithm. If yes, how much should that timeout be? 1ms or 100ms?
- I have a PIC18 and I'm trying to detect whether it is connected on the CAN bus or not.
- When the PIC is not connected on the bus, and I load the transmit buffers, after setting the TXREQ flag. The transmission does not start. This is also mentioned in the datasheet:
- > Setting the TXREQ bit does not initiate a message
- transmission.
- However I cannot find a reliable way to detect that the PIC is not plugged into a healthy bus.
- Also, no errors in the registers appear.
- The only thing I can think of is polling the TXREQ flag for a few milliseconds to check if the peripheral initiated a transmission or not.
- But I'm not sure if that is a reliable algorithm. If yes, how much should that timeout be? 1ms or 100ms?
#1: Initial revision
CAN bus open circuit detection
I have a PIC18 and I'm trying to detect whether it is connected on the CAN bus or not. When the PIC is not connected on the bus, and I load the transmit buffers, after setting the TXREQ flag. The transmission does not start. This is also mentioned in the datasheet: > Setting the TXREQ bit does not initiate a message transmission. However I cannot find a reliable way to detect that the PIC is not plugged into a healthy bus. Also, no errors in the registers appear. The only thing I can think of is polling the TXREQ flag for a few milliseconds to check if the peripheral initiated a transmission or not. But I'm not sure if that is a reliable algorithm. If yes, how much should that timeout be? 1ms or 100ms?