Mikroelektronika MIKROE-742 데이터 시트

다운로드
페이지 532
Man_Receive
Man_Send_Init
264
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
Prototype
function Man_Receive(var error: byte): byte;
Returns
A byte read from the incoming signal.
Description
The function extracts one byte from incoming signal.
Parameters : 
error
: error flag. If signal format does not match the expected, the error flag  
will be set to non-zero. 
Requires
To use this function, the user must prepare the MCU for receiving. See
Man_Receive_Init.
Example
var data, error : byte
...
data := 0
error := 0
data := Man_Receive(&error);
if (error <> 0) then
begin
// error handling 
end;
Prototype
procedure Man_Send_Init();
Returns
Nothing.
Description
The function configures Transmitter pin.
Requires
Global variables : 
MANRXPIN
: Receive line 
MANRXPIN_Direction
: Direction of the receive pin 
must be defined before using this function.
Example
// Initialize Transmitter:
var MANTXPIN : sbit at PINB.B1;
var MANTXPIN_Direction : sbit at DDRB.B1;
...
Man_Send_Init();