Hi Shruti,
In master/slave implementation, master initiate the communication by
sending the address of slave, (in case if you have a multiple channel and
multiple slaves on each channel)
if((ADDRESS >= 01)&&(ADDRESS <= 06))
{
UART0Tx(ADDRESS);
}
else if// to second channel
This is for master, after that master will transmit the actual data
frame,
Then you need to implement the function Rx at the slave side, all slave
received the address and then data frame but only slave having that address
will respond to a data frame.
Assign a unique address
#define slave_addr xx in your slave code or you can use a DIP Switch.
Refer the UARTRS485Slave example.
Refer this link for the master code,
https://github.com/Protoneer/RS485-Arduino-Library/blob/master/RS485.cpp
On Thu, Feb 28, 2019 at 9:06 PM shruti.patel@in.atlascopco.com <