This question already has an answer here:
- Modbus stack for Microchip PIC 4 answers
I am looking for basic Modbus RTu slave code for PIC using rs485. Please guide me to get source code or develop source code & What are function i need to take care while developing it
liblightmodbus is a very lightweight, highly configurable, platform-independent Modbus RTU library.
This is the closest I could find: freemodbus.
There is a port to PIC32xx but I did not test it.
There used to be a bunch of projects implementing Modbus for PIC microcontrollers but most of them are old, with dead links and nowhere to be found anymore.
With Arduino & friends and SBCs running so cheap nobody seems to be into this kind of thing with PIC anymore.
来源:https://stackoverflow.com/questions/57073482/how-to-get-source-code-for-modbus-slavertu-for-pic-microcontroller-kindly-sug