Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Modbus protocol?

Status
Not open for further replies.

amavag

New Member
Hi everybody!
I'm a 3rd year engineering student.We are doing a project in which we are using microcontroller 89c51. We have one master controller & 3 slaves.We are using RS485 for interfacing.
Our professor has told us to use modbus protocol.We went through several articles on modbus protocol on web as well as books; but we are not getting how to implement it in the project.Is there any hardware available,or only the programming is required?
Please give your guidance.Waiting for your kind reply,
amavag
 
In general we do not do your class work for you here. That would result in you learning less. I will help you to understand the problem. Are you allowed to use existing hardware or software ?

Read and understand the definition for Modbus at https://en.wikipedia.org/wiki/Modbus

If you need to build your own hardware then the project has two parts. The first is building the hardware RS485 interface. The next is providing the modbus software to run on the processor that talks over the RS485 network.

A good introductory article on RS485 networks can be found at Designing RS-485 Circuits


Modbus is a serial communications protocol. You will need software to create and parse Modbus packets. Modbus packets take one of two forms. Modbus RTU is a compact, binary representation of the data. Modbus ASCII is human readable, and more verbose. Figure out which one you need to use. What are the constraints.

The packets are sent and recievied by the 89c51's UART. The uart has RX (read) and TX (write) lines that operate at TTL levels. You most often see these connected to RS232 level shifters but you will not be doing so.

Instead connect the uart to a ST485 or similar RS485 interface chip. You will need to use a output pin from the processor to generate the transmitter enable signal for the ST485.

Keep in mind that the UART is capable of full duplex but the ST485 is half duplex.

When you understand all this talk to you instructor to see if you are on the right track.

I would be happy to answer questions about YOUR design. You will get a lot more out of this if you do your own work.

3v0
 
Hi 3v0!
Thank you so much for your reply.Now,we are working on the circuit diagram.We are also trying to write a program for modbus protocol.I will ask for further help whenever needed.
Thanks again!
amavag
 
Modbus

hello 3VO and amavag sir..........
thanks for ur information about MODBUS protocol. Can u please send me the circuit diagram with source code. i m expecting details in 89c51 IC....so please send to my mail.......satheesh.gopi@gmail.com ........
thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top