Am186™CC/CH/CU Microcontrollers User’s Manual
15-1
CHAPTER
15
HIGH-LEVEL DATA LINK
CONTROL (HDLC)
Note: Only the Am186CC and Am186CH microcontrollers support HDLC.
15.1
OVERVIEW
In the Open Systems Interconnection (OSI) model, layer two is the data link layer. This layer
provides control between physical nodes: link initialization, flow control, and error control.
One protocol that performs this function is High-level Data Link Control (HDLC). In HDLC,
all transmissions are in frames. The ISO/IEC 3309 standard specifies this frame structure.
The Am186CC and Am186CH microcontrollers provide HDLC channels, which are used
to transmit and receive frames based on HDLC formats. As a layer 2 function, these
channels only transmit or receive the data; upper layers in the OSI model actually look at
the data.
An HDLC frame uses flags to determine the start and end of a frame.These flags provide
frame synchronization. One flag may be used as both an end flag for one frame and the
start flag for the next frame. Although the Am186CC and Am186CH microcontrollers do
not transmit such shared flags, they can receive and properly handle a shared flag.
As illustrated in Figure 15-1, an HDLC frame typically consists of a start flag, followed by
an address field, a control field, an information field, a frame checking sequencing (FCS)
field, and, finally, a closing flag. Frames maintain
data transparency—a flag, mark, or abort
embedded in the data is not recognized—by
bit stuffing and bit unstuffing. Bit stuffing (also
called
zero-bit insertion) occurs when transmitting data; the transmitter inserts a 0 after five
consecutive 1s.
Bit unstuffing (also called zero-bit deletion) occurs when receiving data;
between opening and closing flags, the receiver deletes any 0 received after five
consecutive 1s.
Figure 15-1
HDLC Frame
In the transmit direction (data is leaving the microcontroller), you can program the HDLC
controller to add the required frame checking sequencing field (CRC error detection bytes)
at the end of the frame, bit stuff the data as needed, and surround it with flags. (Cyclic
Redundancy Check (CRC) is a method for checking errors in transmitted data.)
In the receive direction (data is coming into the microcontroller), the HDLC controller
searches for flags to determine the start and stop of the frame, removes any bit stuffing,
and checks the CRC error detection bytes. The HDLC controller can also check the address
of the incoming frame and reject it if it has an incorrect address.
CH
CC
Address
Start-of-Frame
Flag
Control
Information
FCS
Flag
Delimiter
Frame Header
Information
Field
Frame Check
Sequence
End-of-Frame
Delimiter
8 bits
16 bits
8/16 bits
0–N bits
8 bits
16 bits
Содержание Am186 CC
Страница 1: ...Am186 CC CH CU Microcontrollers User s Manual Order 21914B...
Страница 4: ...iv Am186 CC CH CU Microcontrollers User s Manual...
Страница 18: ...Table of Contents xviii Am186 CC CH CU Microcontrollers User s Manual...
Страница 24: ...Introduction xxiv Am186 CC CH CU Microcontrollers User s Manual...
Страница 39: ...Architectural Overview Am186 CC CH CU Microcontrollers User s Manual 1 15 Figure 1 6 32 Channel Linecard CH CC...
Страница 40: ...Architectural Overview 1 16 Am186 CC CH CU Microcontrollers User s Manual...
Страница 86: ...System Overview 3 36 Am186 CC CH CU Microcontrollers User s Manual...
Страница 92: ...Emulator Support 4 6 Am186 CC CH CU Microcontrollers User s Manual...
Страница 112: ...DRAM Controller 6 8 Am186 CC CH CU Microcontrollers User s Manual...
Страница 134: ...Interrupts 7 22 Am186 CC CH CU Microcontrollers User s Manual...
Страница 186: ...Programmable I O Signals 9 8 Am186 CC CH CU Microcontrollers User s Manual...
Страница 200: ...Watchdog Timer 11 6 Am186 CC CH CU Microcontrollers User s Manual...
Страница 232: ...Asynchronous Serial Ports UARTs 13 24 Am186 CC CH CU Microcontrollers User s Manual...
Страница 242: ...Synchronous Serial Port SSI 14 10 Am186 CC CH CU Microcontrollers User s Manual...
Страница 264: ...High Level Data Link Control HDLC 15 22 Am186 CC CH CU Microcontrollers User s Manual...
Страница 332: ...Universal Serial Bus USB 18 34 Am186 CC CH CU Microcontrollers User s Manual...
Страница 348: ...Register Summary A 16 Am186 CC CH CU Microcontrollers User s Manual...
Страница 376: ...Index Index 18 Am186 CC CH CU Microcontrollers User s Manual...