User manual

mikroC PRO for dsPIC
MikroElektronika
407
Man_Receive
Man_Send_Init
Prototype
unsigned char Man_Receive(unsigned int *error);
Description The function extracts one byte from incoming signal.
Parameters - error: error ag. If signal format does not match the expected, the error ag will be set
to non-zero.
Returns A byte read from the incoming signal.
Requires To use this function, the user must prepare the MCU for receiving. See Man_Receive_Init routines.
Example
unsigned int data = 0, error = 0;
...
data = Man_Receive(&error);
if (error)
{ /* error handling */ }
Notes None.
Prototype
void Man_Send_Init();
Description The function congures Transmitter pin.
Parameters None.
Returns Nothing.
Requires Global variables :
- MANTXPIN : Transmit line
- MANTXPIN_Direction : Direction of the transmit pin
must be dened before using this function.
Example
// Initialize Transmitter:
sbit MANTXPIN at LATF1_bit;
sbit MANTXPIN_Direction at TRISF1_bit;
...
Man_Send_Init();
Notes None.