Is it possible to implement CAN communication with ATmega32, AT90usb1287

Discussion in 'Embedded Systems and Microcontrollers' started by veerubiji, May 6, 2013.

  1. veerubiji

    Thread Starter New Member

    Oct 9, 2012

    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.
  2. Papabravo


    Feb 24, 2006
    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: May 6, 2013
  3. JohnInTX


    Jun 26, 2012
    .. you'll also need a CAN controller that interfaces with your processor via
    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.
  4. Papabravo


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