User manual
380
mikoPascal PRO for dsPIC30/33 and PIC24
MikroElektronika
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
function Man_Receive_Init() : word;
Description The function congures Receiver pin. After that, the function performs synchronization procedure in
order to retrieve baud rate out of the incoming signal.
Parameters None.
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 dened before using this function.
Example
// Initialize Receiver
var MANRXPIN : sbit at RF0_bit;
var MANRXPIN_Direction : sbit at TRISF0_bit;
...
Man_Receive_Init();
Notes In case of multiple persistent errors on reception, the user should call this routine once again or
Man_Synchro routine to enable synchronization.