Manchester code library, Mikroc – ABL electronic PIC Microcontrollers PIC16 User Manual

Page 227

Advertising
background image

mikroC provides a library for handling Manchester coded signals. 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 transition at the midpoint
of a bit period, the direction of transition determines whether the bit is a 0 or a 1;
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: Manchester receive routines are blocking calls (

Man_Receive_Config

,

Man_Receive_Init

,

Man_Receive

). This means that PIC will wait until the

task is performed (e.g. byte is received, synchronization achieved, etc). Routines
for receiving are limited to a baud rate scope from 340 ~ 560 bps.

Man_Receive_Config

Man_Receive_Init

Man_Receive

Man_Send_Config

Man_Send_Init

Man_Send

MikroElektronika: Development tools - Books - Compilers

219

page

mikroC - C Compiler for Microchip PIC microcontrollers

mikroC

making it simple...

Manchester Code Library

1

0

Manchest er RF_Send_Byt e format

Bi-phase coding

0 0 0

0 0 0

1

1

1

1 1

Example of transmission

St 1 St 2 Ct r B7 B6 B5 B4 B3 B2 B1 B0

2.4m s

Library Routines

Advertising
This manual is related to the following products: