mikroC
making it simple...
RS485Master_SendmikroC - C Compiler for Microchip PIC microcontrollers
Prototype | void RS485Master_Send(char *data, char datalen, char address); |
|
|
Description | Sends data from buffer to Slave(s) specified by address via |
| number of bytes in message (1 <= datalen <= 3). |
|
|
Requires | MCU must be initialized as Master in |
| address. See RS485Master_Init. |
| It is programmer’s responsibility to ensure (by protocol) that only one device sends data |
| via 485 bus at a time. |
|
|
Example | unsigned short msg[8]; |
| ... |
| RS485Master_Send(msg, 3, 0x12); |
|
|
Prototype | void RS485Slave_Init(char address); |
Description Initializes MCU as Slave with a specified address in
Requires USART HW module needs to be initialized. See USART_Init.
Example | RS485Slave_Init(160); // Initialize MCU as Slave with address 160 |
|
| page |
|
MikroElektronika: Development tools - Books - Compilers | 245 | ||
|
|