Discussion in "General help Guidance and Discussion" started by    Luqman    Jul 9, 2010.
Thu Jul 05 2012, 06:25 AM

What kind of device are you going to communicate with your controller over RS485? is it a MODBUS device?

Ajay Bhargav

i have no any idea of difference b/w RS-485 and modbus...

but i want to interface multiple microcontrollers(8051) with each other and i can access them by pc or my one master..

so i req u to please give me any basic details from which i can start my aim..

and i can interface RS-232 with 8051...
Thu Jul 05 2012, 08:22 AM
@ jigneshdoshi
u can do this by RS485
u has to do reading of basics of RS485
using this protocol u can communicate between many micro controllers
u can use MAX485 for this purpose it is an ic by maxim
getting power from serial port

[ Edited Thu Jul 05 2012, 08:58 AM ]
Thu Jul 05 2012, 07:46 PM
if you know how to communicate over uart/RS232 of 8051. then it becomes easy for you to work on RS485. As Majoka mentioned, RS485 is nothing but uart + voltage level of RS485 standard. So on protocol level they work over uart but on physical media they are on RS485 which is a multidrop bus communication.

You can design a packet for communication and each 8051 over that bus will have an ID. so you can send a packet over uart e.g.

now SOF is start of frame, which can be any special byte to indicate that new data is coming.
DES-ID = destination ID of controller to whom you are going to send the data
SRC-ID = who is sending this data, so if controller has to answer he must know whom to reply
LEN = length of data
DATA = actual data to send..
EOF = end of frame

this way you can send data packet over bus and every controller connected on RS485 bus will receive this packet. then who so ever matches with DES-ID that controller will process that data rest of them just discard it.
 jigneshdoshi like this.
Tags sample RS485 protocolrs485 communication
Fri Jul 06 2012, 07:09 PM
Nice Explanation Ajay Bhargav
 ajay_bhargav like this.
Sat Jul 07 2012, 07:27 AM
thanks majoka
Sat Jul 07 2012, 08:43 AM
thnaks a lot ajay...

i hv one doubt dat is hw can reciver microcontroller work???

hv i program at receiver side which contains its destination ID and it can scan in particular time duration????????

Sun Jul 08 2012, 07:41 PM
@ jigneshdoshi
whenever any slave will set data in the above mention format
controller will receive that data
we has to check it by device id
let say 8051 is a master controller and at89c2051 is slave controller
now master send to slave that give me tempertaure value
master will talk to slave by its id
let say id of at89c2051 is 1
now at89c2051 replay back with temperature value in this format
1 40
now 1 is id and 40 is temperature
now master know this data comes from slave id 1
 jigneshdoshi like this.
Mon Jul 09 2012, 04:57 AM
RS485 is generally a single master communication where there is only one master who can ask for data or send commands to slave controllers. and other controllers always stay in receive mode. As soon as data comes on bus receiver checks for ID and addressed controller reply back to master.
 jigneshdoshi like this.
Thu Jul 12 2012, 03:28 PM
thanks a lot...
Fri Oct 19 2012, 07:30 AM
nice effort

Get Social


Powered by e107 Forum System


Mon May 10 2021, 04:32 AM
This is a topic that is close to my heart... Cheers! Exactly where are your contact details though? online casino real money https://playslotsapp.com



Thu Jun 25 2020, 03:46 PM
Mon Jun 22 2020, 03:03 PM
Tue Jun 16 2020, 05:10 PM
Sat Jun 13 2020, 09:43 PM
Thu May 21 2020, 12:44 PM
Thu May 21 2020, 01:28 AM
Wed May 20 2020, 07:05 PM
Wed May 20 2020, 11:52 AM


Guests: 87, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 38215
Newest member: Mirza123