Mikroelektronika MIKROE-724 データシート

ページ / 726
mikroBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
383
Man_Receive
Man_Send_Init
Prototype
sub function Man_Receive(dim byref error as word) as byte
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. 
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
dim data_, error as word
...
error = 0
data_ = 0
data_ = Man_Receive(error)
if (error <> 0) then
    ‘ error handling 
end if
Notes
None.
Prototype
sub procedure Man_Send_Init()
Description The function configures Transmitter pin.
Parameters None.
Returns
Nothing.
Requires
Global variables: 
MANTXPIN
 : Transmit line 
MANTXPIN_Direction
 : Direction of the transmit pin 
must be defined before using this function. 
Example
‘ Initialize Transmitter:
dim MANTXPIN as sbit at LATF1_bit
dim MANTXPIN_Direction as sbit at TRISF1_bit
...
Man_Send_Init()
Notes
None.