Mikroelektronika MIKROE-742 데이터 시트
![Mikroelektronika](https://files.manualsbrain.com/attachments/e0529b3b58069a916ad7bb89f7e9f5f0eda73421/common/fit/150/50/1b07b99aa3112e022a916b06db07f1f4f211e91d41878452d87c7638b1bf/brand_logo.gif)
MANCHESTER CODE LIBRARY
The mikroPascal PRO for AVR provides a library for handling Manchester coded sig-
nals. The Manchester code is a code in which data and clock signals are combined
to form a single self-synchronizing data stream; each encoded bit contains a transi-
tion at the midpoint of a bit period, the direction of transition determines whether the
bit is 0 or 1; the second half is the true bit value and the first half is the complement
of the true bit value (as shown in the figure below).
nals. The Manchester code is a code in which data and clock signals are combined
to form a single self-synchronizing data stream; each encoded bit contains a transi-
tion at the midpoint of a bit period, the direction of transition determines whether the
bit is 0 or 1; the second half is the true bit value and the first half is the complement
of the true bit value (as shown in the figure below).
Notes: The Manchester receive routines are blocking calls (Man_Receive_Init and
Man_Synchro). This means that MCU will wait until the task has been performed
(e.g. byte is received, synchronization achieved, etc).
Man_Synchro). This means that MCU will wait until the task has been performed
(e.g. byte is received, synchronization achieved, etc).
Note: Manchester code library implements time-based activities, so interrupts need
to be disabled when using it.
to be disabled when using it.
External dependencies of Manchester Code Library
262
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
The following variables
must be defined in all
projects using Sound
Library:
Description:
Example :
var MANRXPIN : sbit;
sfr; external;
sfr; external;
Receive line.
var MANRXPIN : sbit
at PINB.B0;
at PINB.B0;
var MANTXPIN : sbit;
sfr; external;
sfr; external;
Transmit line.
var MANTXPIN : sbit
at PORTB.B1;
at PORTB.B1;
var
MANRXPIN_Direction :
sbit; sfr; external;
MANRXPIN_Direction :
sbit; sfr; external;
Direction of the Receive pin.
var
MANRXPIN_Direction :
sbit at DDRB.B0;
MANRXPIN_Direction :
sbit at DDRB.B0;
var
MANTXPIN_Direction :
sbit; sfr; external;
MANTXPIN_Direction :
sbit; sfr; external;
Direction of the Transmit pin.
var
MANTXPIN_Direction :
sbit at DDRB.B1;
MANTXPIN_Direction :
sbit at DDRB.B1;