Datasheet

Man_Receive
Man_Send_Init
249
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
Prototype
sub function Man_Receive(dim byreferror as byte) as 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
dim data, error as byte
...
data = 0
error = 0
data = Man_Receive(&error)
if (error <> 0) then
' error handling
end if
Prototype
sub 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:
dim MANTXPIN as sbit at PINB.B1
dim MANTXPIN_Direction as sbit at DDRB.B1
...
Man_Send_Init()