Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

2 PIC microcontrollers via mobus RTU.

Status
Not open for further replies.

KrAK3N

Newbie level 6
Joined
Mar 7, 2007
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,363
pic modbus rtu master

hello everybody

its me again .... needing help ... with a project to communicate 2 PIC microcontrollers via mobus RTU.

the problem is that i read the modbus.org documment and i dont have a remote idea...where should i begin...and most important how

so please people i need your help. in order to start this project soon.


thanks and good night
 

vhn

Member level 4
Joined
Sep 20, 2006
Messages
76
Helped
7
Reputation
14
Reaction score
2
Trophy points
1,288
Activity points
1,803
Re: Modbus RTU Help

Hi KrAK3N,
Implementing Modbus RTU between two PIC microcontrollers would be quite easy if you use the UART peripheral. You need to ensure that the timing constraints mentioned by the protocol are taken care. But you can always ignore these if you do not want to connect your system to any standard modbus devices.

You can first start by configuring the UART in asynchronous mode and your desired baudrate. Then you have to consolidate your data in a specific frame format mentioned in the protocol. (such as Slave ID, Function code, etc). So list down the different function codes that you need to support on both devices and then implement them.

Modbus protocol is used in Master-Slave configuration devices. One of the PIC microcontrollers will be the Master. Once Master sends a command, the slave needs to respond back. Both these data frames will have to be in the prescribed format.

Regards,
vhn
 

    KrAK3N

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top