| ??? 12/03/02 16:48 Read: times |
#33678 - RE: To CAN, or not to CAN? |
If you have the choice, use CAN.
Its many times easier to write software for it, since most protocol overhead was already handled inside the hardware. E.g. to send something to another node write the data and address into the transmit buffer, thats all. Then you get an interrupt, if transmission was done successfully. Also if you get an interrupt, that something arrieved the CAN receiver, simple read out the receive buffer, thats all. Also most CAN controller can work as a receive buffer and up to 15 messages can be received without data loss. No need to build a receive buffer in software. Absolutely no care must be taken on CRC generation or retransmission or arbitration or where is the master on the bus or enabling and disabling of the bus transceiver and many more complicated things, which are problematic on the RS-485. Especially on using such devices with builtin CAN (T89C51CC01, DS80C380, P87C591, C505), you need no extra hardware as a cheap CAN transceiver circuit. E.g. I use the PCA82C251, which was designed for high speed (1Mbit) and tolerant against permanent short circuit of up to +/-40V on the data lines. Thus this transceiver was preferred inside industrial 24V control systems. Peter |



