Rather than reinvent the wheel I am looking for a jumping off point to implement Modbus RTU in a Pic as a slave.
Anyone done this or know of a source of example code?
Al.
Rather than reinvent the wheel I am looking for a jumping off point to implement Modbus RTU in a Pic as a slave.
Anyone done this or know of a source of example code?
Al.
CNC, Mechatronics Integration and Custom Machine Design
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
IMHO you will have to reinvent the wheel. Everybody talking about it, but nobody to explain it. I am looking for basic explanation too, but without success. Is it some kind of secret!? Everybody puts the link The Modbus Organization
and say that is easy to understand. To me, it is not.
I wish you luck to find explanation, or try to write your own protocol, its easiest way and you will know exactly what you done :-)
Good luck!
Working on it!
I am very surprised by the lack of Pic/Modbus oriented projects out there?
I found a few Pic related for I2c, SPI and MicroWire, Nothing on Modbus.
The robot guys seem to be using I2c.
I have an idea of the packet requirement, just have to work on the details.
Thanks.
Al.
CNC, Mechatronics Integration and Custom Machine Design
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
Maybe this could help
USB Modbus Interface - Field of Cows
Thanks, I had seen that, it is just that the designer converts to descrete I/O and analogue control, I may be able to modify the code.
Al.
CNC, Mechatronics Integration and Custom Machine Design
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
Did you check Microchip.com? I would be surprised if they did not have an appnote on it.
Sorry Al, I just assumed they had one as it's a pretty standard comms protocol.
Microchip have a good user forum, maybe if you ask there one of the official guys or one of the PIC users might be able to suggest a solution for you. sometimes it can be a bit slow getting help there but the quality of the help can be good.
I am part of the way there adapting one of the PICMicro UART examples (AN774), it is a bit simplified in my case as I am only designing for master to one slave, RS422 and not multi-slave RS485.
Al.
CNC, Mechatronics Integration and Custom Machine Design
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
A quick search of the archive at www.piclist.com finds
http://web.archive.org/web/201010300.../microchip.htm
Which may be of help.
James hosts the single best wiki page about steppers for CNC hobbyists on the net:
http://www.piclist.com/techref/io/steppers.htm Disagree? Tell him what's missing! ,o)
Thanks, I think I have something figured out.
Al.
CNC, Mechatronics Integration and Custom Machine Design
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.