Hello folks, I wanted to implement Modbus protocol on fpga. I don't know how to start? I read various documents on internet but didn't got any clear idea. basically my aim is to make package of this protocol. I am using Vhdl as la nguage. so i want process or say steps should i follow to make this protoco l working.If anybody has worked on this previously can share document it wi ll be great help. thanks in advance..!!
Need Information about Implementing of Modbus protocol in fpga ( mostly spartan 6)
Nov 26, 2018
3 Replies
There are basically two ways to do Modbus. One is Modbus RTU, using a UART with RS-485. On the hardware side you need a UART with a transmit enable control line. Everything else is in software.
The other is Modbus TCP/IP over Ethernet. On the hardware side, you need Ethernet. Everything else is in software.
So "Modbus on an FPGA" means having a processor (soft or hard) and software on the FPGA or the board, and a UART or Ethernet. Trying to implement Modbus directly in FPGA hardware without a processor is insanity.
Thanks David for information. I just wanted to know that are you suggesting to use external processor for implementation.
and also i would like to know while writing vhdl program what steps should i follow.
I am suggesting you use a processor for handling the protocol. It is entirely up to you if this is external to the FPGA, a hard core in the FPGA, or a soft core in the FPGA.
If you have to ask this, I would recommend that you drop the idea of an FPGA altogether. A $2 microcontroller will let you build a Modbus RTU slave on RS-485 - it will have a UART and all the processing power you need. If you are thinking of Modbus over Ethernet, your microcontroller will be around $5.
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required