{"id":21116637,"url":"https://github.com/canopennode/canopenpic","last_synced_at":"2026-04-01T18:40:16.737Z","repository":{"id":53056621,"uuid":"44625361","full_name":"CANopenNode/CANopenPIC","owner":"CANopenNode","description":"CANopenNode on PIC microcontrollers.","archived":false,"fork":false,"pushed_at":"2024-12-29T05:49:22.000Z","size":413,"stargazers_count":67,"open_issues_count":1,"forks_count":35,"subscribers_count":8,"default_branch":"master","last_synced_at":"2026-03-27T11:46:46.689Z","etag":null,"topics":["arduino-style","canopen","canopennode","embedded","max32","microchip","microcontroller","pic"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CANopenNode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["paypal.me/jnz022"]}},"created_at":"2015-10-20T18:06:10.000Z","updated_at":"2026-03-05T21:50:24.000Z","dependencies_parsed_at":"2024-11-20T02:34:35.908Z","dependency_job_id":"f8eb7f5e-7c93-4772-b32f-1c06bbca2213","html_url":"https://github.com/CANopenNode/CANopenPIC","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/CANopenNode/CANopenPIC","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CANopenNode%2FCANopenPIC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CANopenNode%2FCANopenPIC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CANopenNode%2FCANopenPIC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CANopenNode%2FCANopenPIC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CANopenNode","download_url":"https://codeload.github.com/CANopenNode/CANopenPIC/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CANopenNode%2FCANopenPIC/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31051896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-27T16:55:14.406Z","status":"ssl_error","status_checked_at":"2026-03-27T16:55:07.885Z","response_time":164,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino-style","canopen","canopennode","embedded","max32","microchip","microcontroller","pic"],"created_at":"2024-11-20T02:32:05.055Z","updated_at":"2026-04-01T18:40:16.716Z","avatar_url":"https://github.com/CANopenNode.png","language":"C","readme":"CANopenPIC                                                   {#readmeCANopenPIC}\n==========\n\nCANopenPIC is a CANopen stack running on PIC microcontrollers.\n\nIt is based on [CANopenNode](https://github.com/CANopenNode/CANopenNode), which is free and open source CANopen Stack and is included as a git submodule.\n\nCANopen is the internationally standardized (EN 50325-4) ([CiA301](http://can-cia.org/standardization/technical-documents)) CAN-based higher-layer protocol for embedded control system. For more information on CANopen see http://www.can-cia.org/.\n\nCANopenPIC homepage is https://github.com/CANopenNode/CANopenPIC\n\n\nGetting or updating the project\n-------------------------------\nClone the project from git repository and get submodules:\n\n    git clone https://github.com/CANopenNode/CANopenPIC.git\n    cd CANopenPIC\n    git submodule init\n    git submodule update\n\nUpdate the project:\n\n    cd CANopenPIC\n    git pull # or: git fetch; inspect the changes (gitk); git merge\n    git submodule update\n\n\nUsing on PIC32, dsPIC33, PIC24 and dsPIC30\n------------------------------------------\nVisit [Microchip](http://www.microchip.com/) and Install MplabX IDE, XC32 C compiler for PIC32 or XC16 C compiler for others. Works on Linux, Mac or Windows.\n\nPIC programmer is required, for example [PICkit 4](https://microchipdeveloper.com/pickit4:start).\n\nOpen one of the example projects, build and program your microcontroller.\n\nProgram is tested on Explorer16 board from Microchip with devices PIC32MX795F512L and dsPIC33FJ256GP710, and on Max32 board. CAN transciever chip must be soldered to the Explorer16 board.\n\nProgram also works on dsPIC30F4011 with basic CANopen functionality (see dsPIC30F/CO_driver_target.h). Device has only 2 Kbytes of RAM.\n\nAfter connecting the CANopen PIC device into the CAN(open) network, bootup message is visible. By default device uses Object Dictionary from `CANopenNode/example`, which contains only communication parameters. With the external CANopen tool all parameters can be accessed and CANopen PIC device can be configured (For example write heartbeat producer time in object 0x1017,0).\n\nFor more information and examples see https://github.com/CANopenNode/CANopenDemo\n\n\n### PIC32 on Arduino style Max32 board\n- [Max32 board](https://reference.digilentinc.com/reference/microprocessor/max32/start) with [PIC32MX795F512L](https://www.microchip.com/wwwproducts/en/PIC32MX795F512L) Microcontroller.\n- Board must be programmed directly from MPLAB X, with PIC programmer, [PICkit 4](https://microchipdeveloper.com/pickit4:start) for example. It is necessary to solder the connector for programmer to the Max32 board.\n- Add CAN transciever (MCP2551 or similar) and EEEPROM (25LC128 or similar) chips to the board. See example schema below. CAN connector is DB9, according to CiA303,1, values in brackets are pins for flat cable, if used with DB9 connector.\n\n      +-------+             +-------------+                +----------------+\n      |       |           5-| VREF    RXD |-4-----------45-| C1RX/ETXD1/RF0 |\n      | CAN_L |-2(3)------6-| CAN_L   VCC |-3-------+--5V0-| VCC5V0         |\n      | CAN_H |-7(4)------7-| CAN_H   GND |-2--+    |      |                |\n      |       |        +--8-| RS      TXD |-1--|----|---46-| C1TX/ETXD0/RF1 |\n      |       |        |    +-------------+    |    |      |                |\n      |       |      47kΩ    MCP2551           |  100nF    |                |\n      |       |        |                       |    |      |                |\n      | GND   |-3(5)---+------------GND--------+----+--GND-| GND            |\n      +-------+                                            |                |\n       DB9                                                 |                |\n                                                           |                |\n                  +-----------------------------+------3V3-| VCC3V3         |\n                  |  +--------------------------|-------29-| SDI2/RG7       |\n                  |  |  +-----------------------|-------53-| SS2/RG9        |\n                  |  |  |                       |          |                |\n                  |  |  |   +-------------+     |          |                |\n                  |  |  +-1-| !CS     VCC |-8---+          |                |\n                  |  +----2-| SO    !HOLD |-7---+          |                |\n                  +-------3-| !WP     SCK |-6---|-------52-| SCK2/RG6       |\n                        +-4-| GND      SI |-5---|-------43-| SDO2/RG8       |\n                        |   +-------------+     |          |                |\n                        |    25LC128          100nF        |                |\n                        |                       |          |                |\n                        +-----------------------+------GND-| GND            |\n                                                           +----------------+\n                                                            Max32\n\n- If EEprom chip is not used or connected differently, disable or configure it in CO_driver_custom.h file.\n- File appl_max32_demo.c contains entry functions for custom application in Arduino style with additional CANopen communicationReset function and real-time thread. See file CO_application.h for more information.\n- Default CAN bitrate is 250kbps and CANopen NodeId is 0x30. See appl_max32_demo.c file. Can also be configured by CANopen LSS commands.\n- After Max32 is first connected to the CANopen network it shows bootup message and emergency message, because it has empty eeprom. It is necessary to trigger saveAll command and reset: `cocomm \"0x30 w 0x1010 1 vs save\" \"0x30 reset node\"`. To see heartbeat messages use: `cocomm \"0x30 w 0x1017 0 u16 1000\"`, etc. See also tutorial in https://github.com/CANopenNode/CANopenDemo\n\n\nStarting new project with MplabX\n--------------------------------\n#### Create new project\n- Microchip Embedded, Application Project\n- Choose device, compiler\n- Specify project name and location, set UTF-8\n- Add header and source files, may be organized in logical folders, see example\n\n\n#### MplabX project configuration:\n- encoding: UTF-8\n- (gcc -\u003e optimization-level = 1)\n- Global Options -\u003e Use legacy libc: NO\n- Global Options -\u003e Additional options : Add `-std=gnu99`\n- gcc -\u003e Include directories (example_PIC32): `.;../PIC32;../CANopenNode`\n- Add `DO.h` and `OD.c` files to the project or include `../CANopenNode/example` above.\n- ld -\u003e Heap size (bytes): 10000 (see heapMemoryUsed in main() for actual usage).\n  If macro `CO_USE_GLOBALS` is definded, then heap is not needed.\n\n\nChange Log\n----------\n- **[v4.0](https://github.com/CANopenNode/CANopenPIC/tree/HEAD) - current**: Update CANopenNode to branch v4.0. [Full Changelog](https://github.com/CANopenNode/CANopenPIC/compare/v2.0...master)\n  - Update CANopenNode to branch v4.0 (new object dictionary interface).\n  - Minor updates in the drivers.\n  - PIC32: renewed storage, main_PIC32.c and application interface.\n  - Added Max32 board example.\n  - Put some project files into gitignore.\n  - Cleanup readme.md, wider example is in https://github.com/CANopenNode/CANopenDemo\n- **[v2.0](https://github.com/CANopenNode/CANopenPIC/tree/v2.0) - 2021-04-08**: Update CANopenNode to branch v2.0. [Full Changelog](https://github.com/CANopenNode/CANopenPIC/compare/v1.0...v2.0)\n  - Update CANopenNode to branch v2.0.\n  - License changed to Apache 2.0.\n  - Drivers moved from CANopenNode into this project. Changed directory structure. Changed CANopen.h interface.\n  - Trace added to PIC32. Time base changed to microseconds in all functions.\n  - LSS slave running in all microcontrollers.\n- **[v1.0](https://github.com/CANopenNode/CANopenPIC/tree/v1.0) - 2016-03-21**: Stable. [Full Changelog](https://github.com/CANopenNode/CANopenPIC/compare/v0.5...v1.0)\n- **[v0.5](https://github.com/CANopenNode/CANopenPIC/tree/v0.5) - 2015-10-20**: Git repository started on GitHub.\n- **[v0.4](https://sourceforge.net/p/canopennode/code_complete/ci/master/tree/) - 2012-02-26**: Git repository started on Sourceforge.\n- **[v0.3](https://sourceforge.net/projects/canopennode/files/canopennode/CANopenNode-3.00/) - 2011-08-26**: First edition for 16 and 32 bit PIC on SourceForge.\n\n\nLicense\n-------\nThis file is part of CANopenNode, an opensource CANopen Stack.\nProject home page is \u003chttps://github.com/CANopenNode/CANopenNode\u003e.\nFor more information on CANopen see \u003chttp://www.can-cia.org/\u003e.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","funding_links":["paypal.me/jnz022"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanopennode%2Fcanopenpic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcanopennode%2Fcanopenpic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanopennode%2Fcanopenpic/lists"}