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 language. so i want process or say steps should i follow to make this protocol working.If anybody has worked on this previously can share document it will be great help. thanks in advance..!!
Need Information about Implementing of Modbus protocol in fpga ( mostly spartan 6)
Started by ●November 26, 2018
Reply by ●November 26, 20182018-11-26
On 26/11/18 11:08, Swapnil Patil wrote:> 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 language. so i want process or say steps should i > follow to make this protocol working.If anybody has worked on this > previously can share document it will be great help. thanks in > advance..!! >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.
Reply by ●November 26, 20182018-11-26
On Monday, November 26, 2018 at 3:42:10 PM UTC+5:30, David Brown wrote:> On 26/11/18 11:08, Swapnil Patil wrote: > > 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 language. so i want process or say steps should i > > follow to make this protocol working.If anybody has worked on this > > previously can share document it will be great help. thanks in > > advance..!! > > > > 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.
Reply by ●November 26, 20182018-11-26
On 26/11/18 13:09, Swapnil Patil wrote:> On Monday, November 26, 2018 at 3:42:10 PM UTC+5:30, David Brown > wrote: >> On 26/11/18 11:08, Swapnil Patil wrote: >>> 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 language. so i want process or say steps >>> should i follow to make this protocol working.If anybody has >>> worked on this previously can share document it will be great >>> help. thanks in advance..!! >>> >> >> 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.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.> > and also i would like to know while writing vhdl program what steps > should i follow. >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.