2003 Microchip Technology Inc. DS00877A-page 1
AN877
INTRODUCTION
The DeviceNet™ system is an open network standard,
built on the Controller Area Network (CAN), designed
to reduce the cost and time to install industrial devices
while providing compatibility with multiple vendors. The
DeviceNet specification is available from the Open
DeviceNet Vendor Association, Inc. (ODVA). Example
DeviceNet devices might include motor starters,
valves, sensors, displays and more.
The DeviceNet specification covers multiple layers, from
the wiring and protection circuits, up to the software
protocol and application definition (see Figure 1);
however, this application note only focuses on a specific
development of the software known in the specification
as the Predefined Master/Slave Connection Set. To be
even more accurate, this application note only presents
a slave node within the Predefined Connection Set, also
referred to as a Group 2 Slave.
The Group 2 Slave developed here is designed with the
following features:
• Supports Polling Messaging
• Supports Multicast Polling Messaging
• Supports Change of State/Cyclic Messaging
• Supports Bit Strobe Messaging
• Supports Acknowledged Fragmentation
• Supports Unacknowledged Fragmentation
This application note, with attached firmware, is pro-
vided to accelerate the process to design a Group 2
Slave node but not do all of the work. There are many
details to a slave node that require an understanding of
the target application; therefore, this implementation is
provided in a very general form with numerous config-
urable parameters, event handling functions and vari-
ables that must be set or developed for the application.
Essentially, you cannot develop a DeviceNet applica-
tion without some knowledge of the DeviceNet system
and its specification. It is a good idea to have the
complete specification available for reference while
designing a node.
The firmware associated with this document may
change as new features are added.
Throughout this application note, there are references
to the specification. All references are to Volume I of
the specification unless otherwise noted.
FIGURE 1: LAYER PROTOCOL
OVERVIEW OF THE FIRMWARE
The DeviceNet system is described in the specification
as a collection of objects. Figure 2 shows a simplified
view of the object model. There are a number of possi-
ble objects within the object model but the required
objects include:
• Connection Object
• Message Router Object
• Identity Object
• DeviceNet Object
These are the objects that are developed in this
application note. Other objects not listed may become
available in future revisions of the firmware.
The Connection Object
The Connection Object manages all communications
between the CAN bus and higher level objects and
contains a number of source files. It can contain
multiple instances as defined by the Predefined
Master/Slave Connection Set (see Chapter 7 of the
specification). Table 1 lists the files associated with the
Connection Object.
Author: Ross Fosler
Microchip Technology Inc.
DeviceNet™
Protocol
CAN
Protocol
Physical
Layer
Transmission
Media
Media Layer
Physical Layer
Data Link Layer
Application Layer
DeviceNet™ Group 2 Slave Firmware for PIC18 with CAN