Layer-2 Driver Interface

-

CONTENTS
Home

TECHNOLOGY
Message IDs
Layer-2 Driver
MM2.h
Layer-7 API
MM7.h

 

 

Definition of a Message

In order to be compatible with the message oriented communication technologies LIN and CAN a single MicroMessaging message should consist of an identifier, a data length counter and data bytes. As both LIN and CAN allow for a maximum of 8 data bytes per message, this maximum message length is adapted for MicroMessaging, too.

The length of the message identifier varies greatly from 6-bit in LIN to 11-bit in CAN (which even allows an extended 29-bit ID).  Per default, MicroMessaging specifies to use message identifiers with 8-bits. However, other implementations using 6 or 11 bits are possible.

A single MicroMessaging message (8-bit default) is shown in the table below and consists of a message identifier (default of 8 bits), a data indicator (with a 4-bit checksum and a 4-bit data length counter) and up to 8 data bytes.

 

The bits in the message identifier are divided into a 3-bit function code stored in the most significant bits and a node ID stored in the least significant bits. The node ID field may use 3, 4 or 5 bits allowing for a maximum of 7, 15 or 31 nodes in one MicroMessaging network.

Data Byte Order

MicroMessaging supports numerical data types that consist of multiple bytes. The maximum number of bytes allowed per data type is four. Multiple byte data types are transmitted in Little Endian format. The least significant byte is transmitted first.

Required Common Services

The minimal services required at the layer 2 level are functions to transmit and receive single messages. These services must support both an interrupt driven systems as well as a system based on continuous polling.