did any body had tried to transfer data from one c51 <master> to another c51 <slave> by use of serial port
i am trying to work this thing but i fails some how. if any one can provide me some code for reference to this problem...
The processor does not know what hardware there is on the other side of the cable. It may be another C51 or a PC or just about anything else that sends asynchronous data with the correct timing and voltage levels.
You need general serial communication code as available in thousands of examples out on the net and also available among the examples that follows the Keil compiler.
Then it is up to you to write the upper layer, i.e. the part that decides what to send, and the part that processes received data and possibly sends back an acknowledge.
sir, is it possible to implement the modbus protocol on two 89c51 communication, for example to transfer data between them, actually i am a student and i had already done the communication with I2C protocol now i am trying to work on modbus but i fails, if you show me some code or a hint on this protocol..
Yes, it is possible to use Modbus. Nothing magic about it. But will you use RS232 or RS485 as electric layer?
sir, i am using RS485 connection with max485 between two 89c51, sir if you have any example of modbus implementation it will be more help full to understand it.
sir if you have any example of modbus implementation it will be more help full to understand it.
No. sample code can be of great help, but you must UNDERSTAND what you are doing. sample code, that often places arbitrary values in registers, will be of any help. you must read the respective data sheets.
Have you tried "modbus" as search expression on Google?
It has huge amounts of information about both the function of Modbus and how to implement it.
The code I have is proprietary, i.e. because of copyright, ownership etc can't be posted.
The hard part is to keep track of your transmissions, and turn off the transmitter immediately after the last bit of the transmission is done, to make sure that multiple nodes does not talk at the same time.
I am using RS485 connection with max485 between
then you need to read this www.8052.com/.../129030
Erik
sir, i had gone through the google search, but i am not clearly understand it, if i got some example of, i might be clear it out, sir if you send me your code on urvil_suthar@yahoo.co.in
What that a request for a copyright infringement, where I distribute proprietary code that I'm not allowed to distribute? How much would you be prepared to contribute in case of a court decision for monetary compensation for the illegal distribution?
but sir i did't ask for the copyright program i am asking for your help that if you send me some of your knowledge about in form of example it will be help full too.
if you send me some of your knowledge
the FAQ tells you everything that you need to know to make the UART work with 485.