Mikroelektronika MIKROE-738 Datenbogen
356
mikoC PRO for PIC32
MikroElektronika
Man_Receive
Man_Send_Init
Prototype
unsigned char Man_Receive(unsigned int *error);
Description The function extracts one byte from incoming signal.
Parameters -
Parameters -
error
: error flag. If signal format does not match the expected, the
error
flag 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 configures Transmitter pin.
Parameters None.
Returns
Parameters None.
Returns
Nothing.
Requires
Global variables:
-
MANTXPIN
: Transmit line
-
MANTXPIN_Direction
: Direction of the transmit pin
must be defined before using this function.
Example
// Initialize Transmitter:
sbit MANTXPIN at LATF1_bit;
sbit MANTXPIN_Direction at TRISF1_bit;
...
Man_Send_Init();
Notes
None.