Discussion in "General help Guidance and Discussion" started by    Luqman    Jul 9, 2010.
Thu Jul 05 2012, 11:55 am
#11


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, 01:52 pm
#12
@ jigneshdoshi
u can do this by RS485
u has to do reading of basics of RS485
http://www.bb-elec.com/tech_articles/rs485_basics.asp
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
http://www.next.gr/uploads/139-5604966fcc.gif


[ Edited Thu Jul 05 2012, 02:28 pm ]
Fri Jul 06 2012, 01:16 am
#13
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.
{SOF} {DES-ID} {SRC-ID} {LEN} {DATA} {EOF}

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
Sat Jul 07 2012, 12:39 am
#14
Nice Explanation Ajay Bhargav
 ajay_bhargav like this.
Sat Jul 07 2012, 12:57 pm
#15
thanks majoka
Sat Jul 07 2012, 02:13 pm
#16
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????????

Mon Jul 09 2012, 01:11 am
#17
@ 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, 10:27 am
#18
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, 08:58 pm
#19
thanks a lot...
Fri Oct 19 2012, 01:00 pm
#20
nice effort

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

carpinteyrowrl
Fri Apr 19 2024, 02:51 pm
DonaldJAX
Fri Apr 19 2024, 01:08 pm
Lewisuhakeply
Thu Apr 18 2024, 06:00 pm
Darrellciz
Thu Apr 18 2024, 11:07 am
Charlessber
Thu Apr 18 2024, 09:29 am
BartonSem
Thu Apr 18 2024, 04:56 am
DonaldKnown
Thu Apr 18 2024, 12:24 am
utaletxcyw
Wed Apr 17 2024, 10:21 am