Is it possible to implement CAN communication with ATmega32, AT90usb1287

Thread Starter

veerubiji

Joined Oct 9, 2012
13
Hi,

I am new to embedded programming. I want to know is it possible to implement CAN bus communication between AVR microcontrollers like ATmega32, AT90USB1287 e.t.c.

I have found some AVR microcontrollers which have built in CAN interface. But i have already working hardware with above microcontrollers so just i want to replace already existing communication(usb) with CAN bus. I am going to connect several microcontroller boards to the main board which contains CPU. Is it possible ? can anyone explain me how to implement?

Thanks in advance.
 

Papabravo

Joined Feb 24, 2006
21,225
It is certainly possible. You need to decide on a connection system. Trunkline-dropline works well on a board or across a factory floor. You should become familiar with transceivers like the PCA82C251.

The next thing you need to do is decide how you will apportion the identifier space.

These are challenging, but not impossible tasks.
 
Last edited:

JohnInTX

Joined Jun 26, 2012
4,787
.. you'll also need a CAN controller that interfaces with your processor via
parallel
SPI
or some other local interface to the uC. The CAN controller then interfaces with your bus via a driver such as PB called out.

Implementing CAN in firmware i.e. without a dedicated controller would not be for the faint of heart.

Other than that, sure its doable. Properly implemented, CAN is extremely robust and a great choice for small (8 bytes/message) data packets.
 

Papabravo

Joined Feb 24, 2006
21,225
And if longer messages are required there are numerous, simple fragmentation protocols.
BTW the AVR series has several variants with onboard CAN Controllers.
 
Top