intel.
83C152 HARDWAREDESCRIPTION
This simplifiesthe maintenanceof the GSC and can
make the implementation of an external buffer for
packetizedinformationautomatic.
An externalbuffercanbe usedas the sourceofdata for
transmission,or the destinationof data fromthe receiv-
er. In this
arrangement,the messagesize is limitedto
the W size or 64K, whicheveris smaller. By using
an external butTer,the data carsbe aweased
by otha
deviceswhichmay want accessto the aerialdata. The
amount of time required for the external data moves
will also decrease.Under CPU contro~ a “MOVX”
cmmnandwouldtake 24oscillatorperiodsto complete.
UnderDMA control,externalto internal,or internalto
external,data movestake only 12oscillatorperiods.
3.5.4 BAUD
RATE
The GSC
baudrate is determinedbythe contentsofthe
SFR, BAUD, or the external clock.The formulaused
to determine the baud rate when using the internal
clockis:
(fosc)/((BAUD+ 1)”8)
For
exampleif a 12MHz oscillator is used the baud
rate can vary from:
12,000,000/((0+1)”8)= 1.5
MBPS
to:
12,000,000/((255 +1)”8) = 5.859 KBPS
There are certain requirementsthat the externalclcck
will need to meet. Theaerequirementsare specifkdin
the data sheet. For a descriptionofthe use ofthe GSC
with externalclockpleaseread Section3.5.11.
3.5.5 INITIALIZATION
Initializationcan bebrokendowninto two majorcom-
ponents, 1) initializationof the componentso that its
serial port is capableof proper
comnmnication;and 2)
initializationof the systemor a station sothat intelligi-
ble communicationcan take place.
Mostof the initializationofthe componenthasalready
beendiscussedin theprevioussections.Thoseitemsnot
coveredare the parametersrequiredfor the component
to effectivelycommunicate with other components.
These typeaof issuesare commonto both systemand
componentinitializationand willbe coveredin the fol-
lowingtext.
Initialization of the systemcan be broken down into
several steps. First, are the assumptionsof each net-
workstation.
The tirst assumptionis that the typeof data encoding
rmined for the system and that
to be used is prcdete
eachstation willadhereto the samebasicrules detining
that encoding.The secondassumptionis that the basic
protocol and line discipline is predetermined and
known.This
means thatallstationsare using CSMA/
CD or SDLC or whatever, and that all stations are
either Ml or halfduplez.The third assumptionis that
the baud rate is presetfor the wholesystem.Although
the baud rate couldprobablybe determin
ed by the mi-
croprocessorjustbymonitoringthe link,it willmake it
muchsimplerif the baud rate is knownin advance.
Oneofthe ftrst thingsthat willbe requiredduring sys-
tem initializationis the assignmentof uniqueaddresses
for eachstation. In a two-stationonlyenvironmentthis
is not necessaryand can be ignored.However,keepin
mind, that all systemsshouldbe constructed for easy
futureexpansions.‘l%erefo%evenin onlya two station
system,addressesshouldbe assigned.There are three
basic ways in which addresses can be assigned. The
tirat, and most commonis preassignedaddresaeathat
are loadedinto the station by the user. This could be
donewith a DIP-switch,througha keybcard.The sec-
ond method of assigningaddressesis to randomly as-
sign an address and then check for its uniqueness
throughout the system, and the third method is to
make an inquiryto the systemfor the assignmentof a
uniqueaddress.Oncethe methodofaddreaaassignment
is deterrmn“ ed, the methodshouldbecomepart of the
specificationsfor the systemto whichall additionawill
haveto adhere. l%is, then, is the finalassumption.
The negotiationprocess may not be clear for some
readers. The followingtwo procedure are given as a
guidelinefor dynamicaddressassignment.
In the fimt procedure,a station assumesa random ad-
dressand then checksfor its uniquenessthroughoutthe
system. As a station is inidalizedinto the system it
sends out a messagecontainingits assumed addreaa.
The format of the messageshould be such that any
station decodingthe address recognizesit as a request
for initialization. If that address is shady used, the
receivingstation returns a mssaage,with its own ad-
dressstatingthat the addressin questionis alreadytak-
en. The initiahzingstation then picksanother address.
When the initiahzingstation sends its inquiry for the
addresscheck, a timer is also started If the timer ex-
pires beforethe inquiryis respondedto, then that sta-
tion assumesthe addresschosenis okay.
7-37