Datasheet

RS485Master_Send
393
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
void RS485Master_Send(char *data_buffer, char datalen, char
Slave_address);
Returns Nothing.
Description
Sends message to Slave(s). Message format can be found at the bottom of this
page.
Parameters :
- data_buffer: data to be sent
- datalen: number of bytes for transmition. Valid values: 0...3.
- Slave_address: Slave(s) address
Requires
MCU must be initialized as a Master for RS-485 communication. See
RS485Master_Init.
It is the user’s responsibility to ensure (by protocol) that only one device sends
data via 485 bus at a time.
Example
char msg[8];
...
// send 3 bytes of data to Slave with address 0x12
RS485Master_Send(msg, 3, 0x12);