English
Language : 

COM20051I Datasheet, PDF (47/74 Pages) SMSC Corporation – Integrated Microcontroller and ARCNET (ANSI 878.1) Interface
Initializing Receptions and Interrupt Masking
Normally the receiver is enabled immediately after joining the network. Since a node never will know when a packet
will be transmitted to it, it is advisable to have the receiver enabled at the earliest time possible. Generally, Enable to
Receive commands are given at the end of the initialization. For systems using the Command Chaining feature, two
receive commands should be given. For Non-Command Chaining systems a single Enable to Receive command
should be issued.
Interrupt Masking is a critical function in Non-Command Chaining systems. The interrupt mask is critical because it
provides the only method of releasing interrupts in Non-Command Chaining systems. For Non-Command Chaining
systems, the RI interrupt should be unmasked right after the Enable to Receive commands to ensure that an interrupt
will be generated. Note that the interrupt must be masked to release the interrupt once the packet has been
received. For Command Chaining systems, the Receive Interrupt mask should be enabled and left enabled prior to
the first Enable to Receive Commands. The Command Chaining mode utilizes a software Clear Receive Interrupt
command to release the interrupt thus the interrupt can be left unmasked.
DUPLICATE ID DETECTION (AUTO NODE ID SELECTION)
The Duplicate ID algorithm was introduced previously as a software only method of obtaining unique ID values to join
the network. The algorithm uses many of the diagnostic features found in the COM20051I including the RECON,
RCVACT, TOKEN, DUPID, and MYRECON diagnostic bits to locate a unique ID value. Caution should be used
when using this algorithm in that it cannot isolate a unique value when two nodes power-on simulatneously or within
close proximity of each other. Two nodes using the same ID value will cause the network to fail.
The basic algorithm operates as follows: The COM20051I's Node ID is temporaily initialized to FEh. A 52us waiting
period is then entered to allow the core to read the new node ID value. This is necessary to allow time for the
ARCNET microsequencer to read the value from the ARCNET Node register. A one second timing loop is then
entered in which several diagnostic bits are sampled in order to determine if the selected node ID is being used or
not. The first determination made is if the RCVACT (RECEIVER ACTIVITY) and the TOKEN bits are set. If both are
reset, this node is most likely to be the first node to join the network. If one of these bits is reset, then a timing loop is
entered and the bits are sampled again. Once both bits are found to be set then the DUPID bit is sampled. If this bit
is set then the current node ID is decremented and the timing loop is restarted. If the DUPID bit is reset then the
program continues in the timing loop and the RECON bit tested after the loop is exited to determine if a RECON had
occurred during the sampling of the diagnostic status bits. If the RECON bit is reset then another loop is entered to
synchronize the COM20051I with its Token Rotation timer in order to prevent multiple nodes from using the same
Node ID. This loop samples the MYRECON bit which only gets set when the node has not seen a token to itself for
840ms. While the program is sampling the MYRECON bit, the DUPID bit is checked to prevent two nodes which
have reconfigured close together from using the same ID. If the DUPID bit is set before the MYRECON bit is set then
another node ID must be found. Once the MYRECON bit is found to be set then the TOKEN bit is checked again to
make sure that another node has not RECONed just prior to this node. If all these conditions are satisfied then the
TXEN bit of the Configuration Register is set and a transmission is sent out to the same Node ID. The TA and TMA
bits are polled for 840ms. If the TMA bit is sampled as set within 840ms then the node ID is not valid and the
selection process starts again. In the event that the MYRECON bit is not found to be set, an 840ms timer has been
incorporated into the polling loop to account for this. The only time the MYRECON bit will not get set is when there is
a single node network. Once a valid node ID has been located then the transmitter is enabled and the initialization
process is completed.
SMSC DS – COM20051I
Page 47
Rev. 03/27/2000