Modbus stack for Microchip PIC
Asked Answered
M

4

8

Can someone suggest an open source implementation of a Modbus RTU Slave for a Microchip PIC18 processor? I'm looking for an implementation of Modbus RTU for RS-232/RS-485, but a Modbus TCP/IP implementation would be welcome as well.

Montpellier answered 25/1, 2010 at 15:38 Comment(0)
P
6

I've implemented a Modbus RTU (and ASCII) slave for PIC18 but using USB instead of RS232/485. It would be very easy to convert to RS232/485 though as the protocol code only requires character transmit and receive functions. I can help you with this if required.

Take a look at my USB Modbus I/O page at http://www.fieldofcows.com/index.php?title=USB_Modbus_Interface to see if it meets your needs. The page includes a download link for the source code. The source is released under GNU GPL.

Paries answered 27/1, 2010 at 0:6 Comment(0)
C
3

Solutions seems limited. There a example code at www.sourceboost.com which is freemodbus port targeting their compiler. Also porting Freemodbus on your own to a PIC18 should not be to hard. I have used the free mod bus library without any problems on larger processors and I see there is AVR ports so a PIC port should be possible.

Charlenacharlene answered 26/1, 2010 at 6:25 Comment(0)
P
3

You can find a Modbus RTU and TCP slave implementation in 'C' source code form at http://www.colwaysolutions.com. Since the implementation is in ANSI 'C' you can port it easily to PIC too. The vendor also provides ports to a few popular micro controller cores like 8051, ARM, Coldfire etc. including for some RTOS kernels (OS9, MQX, uc-OS). The library is very light weight consuming negligible RAM and ROM space.

Painstaking answered 27/10, 2010 at 13:7 Comment(1)
Sorry, nobody likes a 404 - Please accept this discount for your inconvenience.Influent
S
1

Microchip recently released a Modbus TCP server which uses their TCP/IP stack. I have used it successfully.

Shute answered 20/3, 2014 at 15:44 Comment(1)
Sorry, nobody likes a 404 - Please accept this discount for your inconvenience.Influent

© 2022 - 2024 — McMap. All rights reserved.