EasyManuals Logo

Intel MCS 51 User Manual

Intel MCS 51
334 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #289 background imageLoading...
Page #289 background image
i~.
83C152 HARDWAREDESCRIPTION
Jam
Thejam signalisgeneratedby any 8XC152 that isin-
volvedin transmittinga frameat the time a collisionis
detectedat its GRXD pin. Thisis to ensurethat if one
transmittingstationdetectsa collision,all the othersta-
tions on the networkwillalsodetect a collision.
Ifa transmitting8XC152detectsa collisionduringthe
prearnble/BOFpart of the fkamethat it is trying to
transmit, it willcompletethe preamble/BOF and then
beginthe jam signalin the fmt bit time after BOF.If
the collisionis detectedlater in the frame, the jam sig-
nal willbeginin the nextbittimeafter the collisionwas
detected.
Thejam signallasts forthe samenumberofbit timesas
the selectedCRC length-either 16-or 32-bittimes.
The 8XC152provideatwotypeaofjam signalsthat can
be selectedbyusersoftware.If the nodeis DC-coupled
to thenetworlqthe DCjam canbe selected.In thiscase
the GTXD pinis pulledto a logicOfor the durationof
thejam. If the nodeisAC-coupledto the networlqthen
ACjam must be selected.In this case the GSCtakes
the CRC it has calculatedthus far in the transmission,
invertseach bit, and transmitsthe inverted CRC. The
selectionof DC or ACjam is madeby settingor clear-
ing the DCJ bit, which resides in the SFR named
MYSLOT.
When the jam signal is completed,the 8XC152goes
into an idle state. Preamneably,other stations on the
networkare alsogeneratingtheir ownjam signals,after
whichthey toogointoan idlestate. Whenthe 8XC152
detectsthe idlestate at its ownGRXD pin, the backoff
sequencebegins.
Backoff
Therearethreesoftware
selectablecollisionresolution
algorithmsin the 8XC152.The selection is made by
writingvaluesto 3 bits:
DCR Ml MO
Algorithm
o
0
0 Normal Random
o
1 1
Alternate Random
1
1
1 Deterministic
Ml and MO rside in GMOD, and DCR is in
MYSLOT.
In the Normal Randomalgorithm,the GSCbacksoff
for a random number of slot times and then decides
whetherto restart the transmission.The baekofftime
beginsas soonas a line idleconditionis detected.
The Alternate Random algorithmis the same as the
Normal Randomexceptthe backofftime doesn’tstart
until an IFS has
trStlS@d.
In the Deternums
tic algorithm,the GSC backs off to
await its predetermined turn.
Random Backoff
In either of the randomalgorithms,the first thing that
happens after a collisionis detected is that a 1 geta
shifted into the TCDCNT (Transmit Cdliaion Detect
Count)register,fromthe right.
Thus if the softwarecleared TCDCNT before telling
the GSC to transmit, then TCDCNT keeps track of
how many times the transmissionhad to be aborted
becauseof collisions:
TCDCNT = ~ first attempt
OMOOOOl
first collision
OOOOQO1l
secondcollision
mill
third collision
Oooo1111
fourth collision
. . . . . . . . . . . . .
11111111
eighthcollision
After TCDCNT gets a 1 shifted into it, the logical
AND of TCDCNT and PRBSis loaded into a count-
downtimer named BKOFF. PRBSis the name of an
SFR which contains the output of a pseudo-random
binary sequencegenerator.Its functionis to providea
randomnumberfor usc in the backoffalgorithm.
Thuson the first collisionBKOFFgetsloadedrandom-
ly with either
OM030Mlor OOWO@31.If there is a sec-
ondcollisionit getsloadedwiththe randomselectionof
OOOWOOO,~1, @XXOOIO,or OtMOOO1l.On the
third collisiontherewillbea randomselectionamong8
possiblenumbers.On the fourth,among 16,tic. Figure
3.5showsthe logicalarrangementof PRBS,TCDCNT,
and BKOFF.
BKOFF starts countingdownfrom its prebad value,
countingslot times. At any time, the current valuein
BKOFF can be read by the CPU, but CPU writes to
BKOFF have no effect. While BKOFF is counting
down,if its current valueis not O,transmissionis dis-
abled. The output signal “BKOFF = O“ is asserted
whenBKOFF reachesO,andis usedto re-enabletrans-
mission.
At that time tranrim
ission cart proceed, subject of
courseto IFS enforcement,unless:
shiftinga 1into TCDCNTfromthe right causeda 1
to shift out fromthe MSBof TCDCNT,or
. the collisionwasdetectedafter TFIFO had beenac-
cessedby the transmit hardware.
7-25

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Intel MCS 51 and is the answer not in the manual?

Intel MCS 51 Specifications

General IconGeneral
BrandIntel
ModelMCS 51
CategoryMicrocontrollers
LanguageEnglish

Related product manuals