Datasheet
RS485Master_Send
342
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
Prototype
procedure RS485Master_Send(var data_buffer: array[20] of byte;
datalen: byte; slave_address: byte);
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
var msg : array[20] of byte;
...
// send 3 bytes of data to Slave with address 0x12
RS485Master_Send(msg, 3, 0x12);