83C152 HARDWARE DESCRIPTION
the transmitter
is disabled,althoughthe jam and back-
off are performed.If enabled,the CPU is then inter-
rupted. The user softwareshouldthen determinewhat
actionto take. The possibilitiesrange tkomjust report-
ingthe error and abortingtransmissionto reinidalizing
the serialchannelregistersand attempt rctransxm“ssion.
If lessthan eightattemptsare desiredTCDCNTcan be
loadedwith somevaluewhichwill reduce the number
of collisionspossiblebeforeTCDCNT overflows.The
valueloadedshouldconsistofall 1sas the least signifi-
cant bits, e.g.7, OFH,3FH.A solidblockof 1sis sug-
gestedbecauseTCDCNTis usedas a mask whengen-
erating the random slot number assignment. The
TCDCNTregisteroperatesbyshiftingthe contentsone
bit positionto the left as each collisionis detected.~
each shift occurs a 1 is loaded into the LSB. When
TCDCNT overtlows,GSC operation stops and the
CPU is notifiedby the settingof the TCDT bit which
can tlag an interrupt.
Theamountoftimethat the GSChas beforeit mustbe
ready to retransmit after a collisionis determinedby
the mode which is selected.The mode is determined
MO(GMOD.5) and Ml (GMOD.6). If MOand Ml
equal 0,0 (normal backo~ then the minimum pericd
before rctrammisaion will be either the interframe
spaceor the backoffPerk@whicheveris longer.If MO
andMl equal1,1(alternatebacko~ then the minimum
period before retransmissionwill be the intefikame
SP plus the backoffperiod Bothof these m shown
in Figure 3.4.Alternatebackoffmust be enabledif us-
ingdetermin”Kticresolution.If the GSCis not readyto
retransmit by the time its assignedslot becomesavail-
able,the slot timeis lostand the station must waituntil
the collisionresolutiontime periodhas passed.
Instead of waitingfor the collisionresolutionto pass,
the transmission could be aborted. The decision to
abortis usuallydependentonthe numberofstationson
the link and how many collisionshave already oc-
curred. The number of collisionscan be obtained by
examiningtheregister,TCDCNT.Theabort is normal-
ly implementedby ckarin
g TEN. The new tranamia-
sion beginsby setting TEN and loadingTFIFO. The
minimumamountoftimeavailableto initiatea retrans-
missionwouldbe oneinterframespaceperiodafter the
lineis sensedas beingidle.
Asthe numberofstationsapproach256the probability
of a successfultransmissiondecreaaearapidly.If there
are more than 256 stations involvedin the collision
there wouldbe no resolutionsince at least two of the
stations will always havethe same backoffintervalae-
Iected.
AUthe stations monitorthe linkas longas that station
is active, evenif not attemptingto transmit. This is to
ensure that each station always defers the minimum
amountoftimebeforeattemptinga transmissionand so
that addresses are recognized.However,the collision
detect CircuitryO~teS Slightlydit%redy.
In normalback-offmode a
transmitting station always
monitors the link while transmitting. If a collisionis
detectedone or more ofthe transmittingstationsapply
the jam signal and all transnu
“ttingstations enter the
back-off algorithm The receivingstations also con-
stantly monitor for a collisionbut do not take part in
the resolution phase. This allows a station to try to
transmit in the middleof a resolutionperiod. This in
turn mayor maynot causeanothercollision.If thenew
station
trying to transmit on the link doesso duringan
unusedslot time then therewillprobablynot bea colli-
sion.If trying to transmitduringa usedslot time,then
there will probablybe a collision.The actions the re-
ceiver does take when detectinga collisionis to just
stop receiving data if data has not been loaded into
RFIFO or to stop reception, clear receiver enable
-N) and set the receiver abort flag (RCABT -
RSTAT.6).
If determines
tic resolutionisused,the transmittingsta-
tions go through pretty muchthe same proeea.sas in
normal back-off, except that the slots are predeter-
mined.All the receiversgo through the back-offalgo-
rithm and InSyOldytransmitduringtheir assignedS1OL
3.6.4 SUCCESSFULENDINGOF
TRANSMISSIONSANDRECEPTIONS
In both CSMA/CD and SDLCmodeajthe TDN bit is
set and TEN cleared at the end of a successfultrans-
mission.The end of the tmmnusw‘on occurs whenthe
TFIFO is emptyand the lastbytehas beentransnu
“tted.
In CiSMA/CDthe usershouldclear the TCDCNTreg-
ister after sucaasful transmission.
At the end of a successfulreception,the RDN bit is set
and GREN is cleared. The end of reception occurs
whenthe EOF flagis detectedby the GSChardware.
7-43