Mikroelektronika MIKROE-738 Datenbogen
![Mikroelektronika](https://files.manualsbrain.com/attachments/e0529b3b58069a916ad7bb89f7e9f5f0eda73421/common/fit/150/50/1b07b99aa3112e022a916b06db07f1f4f211e91d41878452d87c7638b1bf/brand_logo.gif)
mikroC PRO for PIC32
MikroElektronika
355
Library Routines
- Man_Receive_Init
- Man_Receive
- Man_Send_Init
- Man_Send
- Man_Synchro
- Man_Break
The following routines are for the internal use by compiler only:
- Manchester_0
- Manchester_1
- Manchester_Out
Man_Receive_Init
Prototype
unsigned int Man_Receive_Init();
Description The function configures Receiver pin. After that, the function performs synchronization procedure in
order to retrieve baud rate out of the incoming signal.
Parameters None.
Returns
Returns
-
0
- if initialization and synchronization were successful.
-
1
- upon unsuccessful synchronization.
-
255
- upon user abort.
Requires
Global variables:
-
MANRXPIN
: Receive line
-
MANRXPIN_Direction
: Direction of the receive pin
must be defined before using this function.
Example
‘ Initialize Receiver
sbit MANRXPIN at RF0_bit;
sbit MANRXPIN_Direction at TRISF0s_bit;
...
if (Man_Receive_Init() == 0) {
...
}
Notes
In case of multiple persistent errors on reception, the user should call this routine once again or
Man_Synchro routine to enable synchronization.