English
Language : 

COM20051 Datasheet, PDF (56/82 Pages) List of Unclassifed Manufacturers – Integrated Microcontroller and ARCNET (ANSI 878.1) Interface
DUPID Algorithm Exception Handling
There are two cases that require special
processing that the normal Duplicate ID
algorithm does not handle. The first case is
when the node is the first node to join the
network. The second case is when the node is
the second node to join the network.
When a node is the first to join a network it will
detect no receive activity and detect no tokens
(i.e. RCVACT = 0 and TOKEN = 0). If this is the
case, a special routine is entered that monitors
the MYRECON bits and constantly polls the
RCVACT, TOKEN, and DUPID bits. If any of the
RCVACT, TOKEN, or DUPID bits gets set prior
to the MYRECON bit, then another node has
entered the network just prior to this one. If the
MYRECON bit sets and the RCVACT, TOKEN,
and DUPID bits remain reset then the node takes
the ID value of FFh. Node ID FFh is reserved for
the first node to join the network.
The second case involves a node that is the
second node to join the network. In this case the
node will detect the presence of tokens and
receive activity (RCVACT & TOKEN = 1), and no
duplicate IDs (DUPID = 0). The algorithm will
detect that RECON bit has set. This is because
the only existing node on the network is
undergoing constant reconfigurations because it
cannot pass tokens to another node. In order to
prevent an endless loop from occurring due to
the RECON test failure, a count of RECON bit
tests is kept. If three consecutive polls of the
RECON bit are positive it can be safely assumed
that this node is the second node to join the
network and takes the ID value of FEh.
Basic Transmit and Receive Service Routines
Transmit and Receive Service routines are often
found together as part of an single interrupt
service routine used to service the ARCNET
interrupt. The COM20051 provides a 1Kx8 RAM
for buffering of both transmit and receive packets
and accommodates two types of packet formats:
A short format which takes a maximum of 253
bytes of data and a long format which takes a
maximum of 508 bytes of data. Most
industrial/embedded applications use the short
(256 byte) format, thus allowing the RAM to
buffer four packets. The following examples will
use a two packet buffer for receptions and a two
packet buffer for transmissions. Examples are
shown for both Command and Non-Command
Chaining systems. Figure 18 shows how a
typical program will run.
Upon entry into the service routine all relevant
8051 registers are pushed onto the stack
including the PSW and DPTR. The state of the
COM20051 address registers is also saved so
that any procedures that were interrupted in the
process of accessing the COM20051 RAM are
not corrupted. The COM20051 status register is
then read and stored in a variable. A series of
case statements then check the bit settings and
branch to the appropriate service routine.
Service Priority
The ARCNET core of the COM20051 can
generate a single interrupt from multiple sources
including reception of packets, transmission of
packets, EXcessive NACK counts,
RECONfigurations, and New Next ID generation.
When testing status bits to determine the source
of the interrupt it is best to use the following
priority:
1) RI - Receiver Inhibited (packet received)
2) TA - Transmitter Available (packet
transmitted)
3) EXNACK - Excessive Number of NACK's to
FBE's
4) RECON - either a full or mini RECON was
detected
5) New Next ID - the node to which this node is
passing the token to has not responded to
the token pass and this node has found a
new id to pass the token to.
56