Microcontroller with external or embedded CAN interface.

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have built some custom ATmega2560 boards with external can interface using the mcp2515 controller and mcp2551 transceiver in order to experiment with CAN protocol. It is a solution that covers all of my needs as there are a lot of libraries about the mcp controller/transceiver. But after some thought and looking around I saw that there are some AVR microcontrollers that support the can protocol (AT90CAN - ATmegaC1 - ATmega32M1). So I am wondering which of these 2 solutions is better.

 

1) Is it better to have a microcontroller with embedded CAN interface or the solution with the external CAN controller/transceiver (MCP2515-MCP2551) is sufficient?

2) Would my CAN communication be faster?

3) Am I going to need external peripherals with the AT90CAN - ATmegaC1 - ATmega32M1 or do they have everything that I am going to need (i.e controller, transceiver) for CAN communication?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No answers to your questions.

vamoirid wrote:
It is a solution that covers all of my needs as there are a lot of libraries about the mcp controller/transceiver.
For PIC, a possible source for code is the MPLAB Code Configurator (MCC)

Microchip Technology Inc

Microchip

Press Release

Improve Response Time to Critical System Events on CAN Networks with New 8-Bit MCU with Core Independent Peripherals

The PIC18 K83 family makes CAN-based designs simpler and more cost effective

Chandler, Arizona, Nov. 13, 2017

https://www.microchip.com/en/pressreleasepage/improve-response-time-to-critical-system-events-on-can-networks

Microchip’s PIC18 product line has been expanded to include a new line of 8-bit microcontrollers (MCUs) that combine a Controller Area Network (CAN) bus with an extensive array of Core Independent Peripherals (CIPs).

...

... visit: www.microchip.com/k83.

...

(flash: 32KB, 64KB)

...

Each of these parts is available in 28-pin SPDIP, SOIC, SSOP, UQFN and QFN packages. 

...


http://www.microchipdirect.com/product/search/all/PIC18F26K83-I/SP

via

http://www.microchip.com/wwwproducts/en/PIC18F26K83

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

An internal CAN controller cause many times lesser CPU load. All registers are internal mapped inside the memory space. No need to transfer data and controls over the SPI bottleneck.

I use the AT90CAN128, its not the newest but good available. It has 15 MOBs, which can be used for transmission or receive. E.g. you can select 14 MOBs as a 14 messages wide receive buffer.
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

eewiki

Microcontroller

Home

CAN Example - ATmega32M1 - STK600

Created by Scott Schmit, last modified by Robert Nelson on Apr 05, 2016

...

 

Application Code

http://eewiki.net/display/microcontroller/CAN+Example+-+ATmega32M1+-+STK600#CANExample-ATmega32M1-STK600-ApplicationCode

ATmegaxxM1 CAN Libraries

The AT90CAN software libraries provided by Atmel for Studio 4 were modified and used in Studio 6 for this project.  The libraries provide some low-level CAN macros, as well as some higher level functions that are implemented by the main application.  The modified CAN libraries for ATmegaxxM1 are provided below.

Zip containing all files:

...

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks a lot for your responses!