Datasheet
Man_Receive_Init
315
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
unsigned int Man_Receive_Init();
Returns
- 0 - if initialization and synchronization were successful.
- 1 - upon unsuccessful synchronization.
- 255 - upon user abort.
Description
The function configures Receiver pin and performs synchronization procedure in
order to retrieve baud rate out of the incoming signal.
Note: In case of multiple persistent errors on reception, the user should call this
routine once again or Man_Synchro routine to enable synchronization.
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 PORTB.B0;
sbit MANRXPIN_Direction at DDRB.B0;
...
Man_Receive_Init();