Discussion in "General help Guidance and Discussion" started by    Luqman    Jul 9, 2010.
Thu Jul 05 2012, 06:25 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, 08:22 AM
#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, 08:58 AM ]
Thu Jul 05 2012, 07:46 PM
#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
Fri Jul 06 2012, 07:09 PM
#14
Nice Explanation Ajay Bhargav
 ajay_bhargav like this.
Sat Jul 07 2012, 07:27 AM
#15
thanks majoka
Sat Jul 07 2012, 08:43 AM
#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????????

Sun Jul 08 2012, 07:41 PM
#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, 04:57 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, 03:28 PM
#19
thanks a lot...
Fri Oct 19 2012, 07:30 AM
#20
nice effort

Get Social

Information

Powered by e107 Forum System

Conversation

Thu Jun 11 2020, 06:27 AM
anudee
sir could please send the code for I2C and wifi interfacing with 8051
scena
Tue May 19 2020, 10:29 PM
Does anyone have microcontroller programming software for STC15F104W (core 8051, 4 k, 128 byte, 6 I/O pin, UART ... DIL8), that works?
Sat May 02 2020, 07:38 PM
Tamu Gurung
Hi I am looking for a assembly language program for a digital decimal counter. Time counts max limit of 2 mins starting from 2.00 mins and ending at 0.00. time is to be displayed on 4 7-segment LED displays. Edsim51 simulator to be used. Thanks
Wed Mar 25 2020, 01:39 PM
Tajammul
Sir kindly send the code file i2c for 8051
ExperimenterUK
Fri Mar 13 2020, 10:36 PM
@ Rohitnani,ABEBE..which project ?

Downloads

Comments

Mirza123
Thu Jun 25 2020, 03:46 PM
eunicelove124
Mon Jun 22 2020, 03:03 PM
cerouno
Tue Jun 16 2020, 05:10 PM
Marce
Sat Jun 13 2020, 09:43 PM
Davidthils
Thu May 21 2020, 12:44 PM
Jakeror
Thu May 21 2020, 01:28 AM
motorCar
Wed May 20 2020, 07:05 PM
Vordrync
Wed May 20 2020, 11:52 AM

Online

Guests: 107, Members: 0 ...

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

Members: 38215
Newest member: Mirza123