User manual
mikroPascal PRO for dsPIC30/33 and PIC24
MikroElektronika
381
Man_Receive
Man_Send_Init
Prototype
function Man_Receive(var error : word) : byte;
Description The function extracts one byte from incoming signal.
Parameters - error: error ag. If signal format does not match the expected, the error ag 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
var data_, error : word;
...
error := 0;
data_ := 0;
data_ := Man_Receive(error);
if (error <> 0) then
begin
// error handling
end;
Notes None.
Prototype
procedure Man_Send_Init();
Description The function congures Transmitter pin.
Parameters None.
Returns Nothing.
Requires Global variables:
- MANTXPIN : Transmit line
- MANTXPIN_Direction : Direction of the transmit pin
must be dened before using this function.
Example
// Initialize Transmitter:
var MANTXPIN : sbit at LATF1_bit;
var MANTXPIN_Direction : sbit at TRISF1_bit;
...
Man_Send_Init();
Notes None.