83C152.PDF

(1569 KB) Pobierz
104209140 UNPDF
AP-429
APPLICATION
NOTE
Application Techniques for the
83C152 Global Serial Channel
in CSMA/CD Mode
BOB JOHNSON
Embedded Control Applications Engineering
May 1989
Order Number: 270720-001
104209140.003.png 104209140.004.png
Information in this document is provided in connection with Intel products. Intel assumes no liability whatsoev-
er, including infringement of any patent or copyright, for sale and use of Intel products except as provided in
Intel's Terms and Conditions of Sale for such products.
Intel retains the right to make changes to these specifications at any time, without notice. Microcomputer
Products may have minor variations to this specification known as errata.
*Other brands and names are the property of their respective owners.
² Since publication of documents referenced in this document, registration of the Pentium, OverDrive and
iCOMP trademarks has been issued to Intel Corporation.
Contact your local Intel sales office or your distributor to obtain the latest specifications before placing your
product order.
Copies of documents which have an ordering number and are referenced in this document, or other Intel
literature, may be obtained from:
Intel Corporation
P.O. Box 7641
Mt. Prospect, IL 60056-7641
or call 1-800-879-4683
COPYRIGHT © INTEL CORPORATION, 1996
APPLICATION
TECHNIQUES FOR THE
83C152 GLOBAL SERIAL
CHANNEL IN CSMA/CD
MODE
CONTENTS
PAGE
INTRODUCTION ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 1
GSC INITIALIZATION ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 9
INITIALIZATION (PROTOCOL
DEPENDENT) ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 9
Baud Rate ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 9
Preamble Length ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 10
Backoff Mode ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 10
Interframe Space ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 11
Jamming Signal ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 15
Slot Time ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 16
Addressing ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 16
INITIALIZATIONÐPROTOCOL
INDEPENDENT ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 18
Clearing Collision Counter ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 18
Control of the GSC ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 19
Initializing DMA ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 19
Initializing Counters and Pointers ÀÀÀÀÀÀÀÀÀÀ 20
Enabling Receiver and Receiver
Interrupts ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 20
Enabling Transmitter and Transmit
Interrupts ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 21
STARTING, MAINTAINING, AND
ENDING TRANSMISSIONS ÀÀÀÀÀÀÀÀÀÀÀÀ 22
STARTING, MAINTAINING, AND
ENDING RECEPTIONS ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 23
SUMMARY ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ 24
SOFTWARE EXAMPLE ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ A-1
CONTROLLING THE BACKOFF
ALGORITHM ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ B-1
REFERENCES ÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀ C-1
104209140.005.png
AP-429
INTRODUCTION
application note deals with initializing and running the
GSC in CSMA/CD mode only. Carrier Sense Multiple
Access with Collision Detection (CSMA/CD) is a com-
munication protocol that allows two or more stations to
share a common transmission medium by sensing when
the link is idle or busy (Carrier Sense). While in the
process of transmission, each station monitors its own
transmission to identify if and when a collision occurs.
When a collision occurs, each station involved in the
transmission executes a backoff algorithm and reat-
tempts transmission (Collision Detection). This access
method allows all stations an equal chance to transmit
its own packet and thus is referred to as a ``peer-to-
peer'' type protocol (Multiple Access). Even in
CSMA/CD mode, the user has several variations that
can be implemented. Table 1 summarizes the various
CSMA/CD options available. Most of these variations
will be discussed in this application note.
The 83C152 is an 80C51BH based microcontroller with
DMA capabilities and a high speed, multi-protocol,
synchronous serial communication interface called the
Global Serial Channel (GSC). The GSC uses packe-
tized data frames that consist of a beginning of frame
(BOF) flag, address byte(s), data byte(s), a Cyclic Re-
dundancy Check (CRC), and an End Of Frame (EOF)
flag. An example of this type of packet is shown in
Figure 1. Most 80C152 users will be familiar with
UARTs, another type of serial interface. Figures 1 and
2 compare the two types of frames. The UART uses
start and stop bits with a data byte between as shown in
Figure 2. The 83C152 retains the standard MCS É -51
UART.
The 83C152 will be referred to as the ``C152'' through-
out this application note to refer to the device. This
270720±1
Figure 1. Packetized Frame
270720±2
Figure 2. UART Byte
1
104209140.006.png 104209140.001.png 104209140.002.png
Zgłoś jeśli naruszono regulamin