We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2024-07-09
Package Version: 2.0.0.7
mikroSDK Library: 2.0.0.0
Category: CAN
Downloaded: 88 times
Not followed.
License: MIT license
The application demonstrates CAN receive functionality.
Do you want to subscribe in order to receive notifications regarding "CAN Receive Demo" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "CAN Receive Demo" changes.
Do you want to report abuse regarding "CAN Receive Demo".
DOWNLOAD LINK | RELATED COMPILER | CONTAINS |
---|---|---|
5633_can_receive_demo.zip [9.23KB] | GCC for ARM Clang for ARM mikroC AI for ARM GCC for RISC-V Clang for RISC-V mikroC AI for PIC mikroC AI for dsPIC XC16 mikroC AI for PIC32 XC32 |
|
Code developed on UNI-DS v8 and it can be used on other MIKROE development boards as well. Code was developed with purpose of easier understanding Controller Area Network Interface (CAN) receive functions.
This is a simple example that utilizes mikroSDK 2.10 CAN driver library. We recommend using this demo with CAN Transmit Demo. In this demo MCU receives data using Normal CAN Mode. Default configuration for receiving data is set to receive data from another CAN node, configured with CAN Transmit Demo. In this Demo it is expected to receive 3 data bytes where the first and the third bytes are constant and the second byte is an 8-bit value incremented with each reception and displayed on the port defined as TEST_PORT macro.
This code was developed on UNI-DS v8 board. For this hardware to work according to program, you will need the following:
Note: You might need terminal resistence (aproximately 120 Ohms). This is hardware dependent.
To connect everything properly, follow these steps:
We provide code for demonstrating the usage of functions contained in CAN driver library. To run this example, follow these steps:
In order to make this example work, proper clock setup is needed. To create a setup with the adequate clock scheme, follow these steps: