586,096 active members*
3,669 visitors online*
Register for free
Login
Results 1 to 11 of 11
  1. #1
    Join Date
    Dec 2003
    Posts
    24221

    Modbus and the PIC

    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.

  2. #2
    Join Date
    Jan 2006
    Posts
    58
    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!

  3. #3
    Join Date
    Dec 2003
    Posts
    24221
    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.

  4. #4
    Join Date
    Jan 2006
    Posts
    58
    Maybe this could help
    USB Modbus Interface - Field of Cows

  5. #5
    Join Date
    Dec 2003
    Posts
    24221
    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.

  6. #6
    Join Date
    Oct 2005
    Posts
    2392
    Did you check Microchip.com? I would be surprised if they did not have an appnote on it.

  7. #7
    Join Date
    Dec 2003
    Posts
    24221
    Quote Originally Posted by RomanLini View Post
    Did you check Microchip.com? I would be surprised if they did not have an appnote on it.
    That was my first seek? .
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  8. #8
    Join Date
    Oct 2005
    Posts
    2392
    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.

  9. #9
    Join Date
    Dec 2003
    Posts
    24221
    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.

  10. #10
    Join Date
    May 2005
    Posts
    1397
    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)

  11. #11
    Join Date
    Dec 2003
    Posts
    24221
    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.

Similar Threads

  1. Modbus to run GS-2 drive?
    By mecheng10 in forum Mach Mill
    Replies: 14
    Last Post: 06-17-2012, 07:01 PM
  2. USB Modbus I/O Using PIC
    By rdhopkins in forum PIC Programing / Design
    Replies: 7
    Last Post: 05-03-2012, 01:23 AM
  3. MODBUS control of VFD
    By ninefinger in forum LinuxCNC (formerly EMC2)
    Replies: 21
    Last Post: 05-10-2011, 02:19 AM
  4. EMC2/Modbus......HELP!
    By pauldkeeton in forum LinuxCNC (formerly EMC2)
    Replies: 5
    Last Post: 02-18-2007, 11:47 PM
  5. modbus device
    By Drew in forum Machines running Mach Software
    Replies: 14
    Last Post: 02-11-2007, 08:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •