Discussion in "General help Guidance and Discussion" started by    Luqman    Jul 9, 2010.
Sat Oct 20 2012, 04:37 pm
#21
@ajay

can i connect MAX 485 to 8051 or i must connect it through MAX 232?
Thu Nov 01 2012, 02:36 am
#22
max485 can be directly connected to 8051. its a line driver IC similar to Max232 but for different protocol.
Thu Nov 01 2012, 06:51 pm
#23
ohk thanks...

i connect it directly to MC...

but i have some problem in data receiving...

i hvnt use any special protocol for sending and receiving for both MC and PC....

i hv send and receive data as we send in RS-232 communication...

i got data but it is corrupted...

please give me solution...
Mon Dec 03 2012, 12:50 am
#24
Hi Jignesh, Sorry I couldnt reply on time as I am not in India. Is your problem solved?
Tue Dec 04 2012, 03:58 pm
#25
Hey ajay...
no need to sorry...i cn understand ur problem...

my Problem is solved and i can receive and transmit any data using MAX-485 at microcontroller side and RS-232 to RS-485 converter at PC side...
Wed Dec 05 2012, 01:59 pm
#26
good to know that
Thu Dec 06 2012, 12:21 pm
#27
thanks...

dear ajay can u please tell me that in which format modscan send data and receive data?


its urgent...
Fri Dec 07 2012, 11:25 am
#28
hey..

i got the format.

but now my doubt is when will slave respond to master?

1) After receiving all bytes and save them and then check its address and then give response if the address is match with its own address?

or

2)first slave receive first byte witch is address byte coming from master and check that address with its own address and if the address is match then it will response to master?

please give me suggestion as soon as possible...
Sun Dec 09 2012, 02:37 pm
#29
all MODBUS transactions start with a start byte then slave address, so just check for slave address and if it matches keep storing byte in buffer else just drop whatever coming, either way is ok.. the thing is you do not need to keep data in buffer if its not meant for you.

e.g. if a device is responding to a command so responce can be longer and if you use option 1 you first need to store the complete thing in a buffer and then check... for a 100 byte respone you need 100 byte buffer so its better to check if data is meant for u only then store it.
Mon Dec 10 2012, 10:12 am
#30
ohk...
thanks ajay once again...

now i want to calculate CRC for last 2 bytes so for that have u any tutorial or material from where i can get any idea about calculation of CRC.

i get data in modscan software but i cant calculate CRC but right nw i send it directly to PC using calculator of CRC.

please give me reply as soon as possible.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Bobbyerilar
Thu Mar 28 2024, 08:08 am
pb58
Thu Mar 28 2024, 05:54 am
Clarazkafup
Thu Mar 28 2024, 02:24 am
Walterkic
Thu Mar 28 2024, 01:19 am
Davidusawn
Wed Mar 27 2024, 08:30 pm
Richardsop
Tue Mar 26 2024, 10:33 pm
Stevencog
Tue Mar 26 2024, 04:26 pm
Bernardwarge
Tue Mar 26 2024, 11:15 am