Canbus open your mind part 4
CANBus Development Kit Overview
Parts
- Seeed CANBed Dual Dev Kit Ver 1.1
- Atmega32U4 chip with 18 pins including digital, analog, UART, and I2C interfaces
- MCP2515 CAN Bus controller with SPI interface
- MCP2551 for CAN-Bus capability
- Two types of CAN Bus interfaces: sub-D9 connector and terminal block interface
Steps
1. Download Arduino files from [Longan CAN MCP2515 GitHub](https://github.com/Longan-Labs/Longan_CAN_MCP2515) 2. Add the Longan RP2040 boards via the Arduino IDE
Notes
- The device appears in
lsusbbut requires re-flashing. - Found a trial program (CanEasy) and an inexpensive CAN device for practical use.
RP2040 Features
Summary
The RP2040 from Raspberry Pi offers high performance, ease of use, and low cost. It supports MicroPython and C++ programming.
Key Points
- Dual ARM Cortex-M0+ @ 133MHz
- 264kB on-chip SRAM in six independent banks
- Support for up to 16MB of off-chip Flash memory via dedicated QSPI bus
- DMA controller & Fully-connected AHB crossbar
- Interpolator and integer divider peripherals
- On-chip programmable LDO to generate core voltage
- 2 on-chip PLLs to generate USB and core clocks
- 30 GPIO pins, 4 of which can be used as analogue inputs
- Peripherals: 2 UARTs, 2 SPI Controllers, 2 I2C Controllers, 16 PWM, USB 1.1 Controller and PHY (Host & Device), 8 PIO State Machines
Programmable I/O (PIO) Subsystem
- Provides additional computing power and flexibility
- Uses simple state machines to supplement the computing capabilities of the main CPU
- Delegates simple but resource-intensive tasks to state machines, freeing up CPU resources
Programming with Arduino IDE
- Install RP2040 boards via the Arduino IDE using the following URL:
``` https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json ```
Python Programming
- Use simple Python for coding
- Install Thonny editor on Linux for Python development
Problem
The unit was unable to move to the next level and required re-flashing.
Solution
- Use CanEasy trial program and an inexpensive CAN device for practical use.
- Download and install the necessary Arduino files and add the Longan RP2040 boards via the Arduino IDE.