ARC-EVS ARCNET Evaluation System

User Manual # TD020200-0MA

Trademarks Contemporary Controls and ARC Control are registered trademarks of Contemporary Control Systems, Inc. ARCNET is a registered trademark of Datapoint Corporation. Other product names may be trademarks or registered trademarks of their respective companies. Copyright © Copyright 2002, by Contemporary Control Systems, Inc. All rights reserved. No part of this publication may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language or computer language, in any form or by any means, electronic, mechanical, magnetic, optical, chemical, manual, or otherwise, without the prior written permission of:

Contemporary Control Systems, Inc. Tel: +1-630-963-7070 2431 Curtiss Street Fax: +1-630-963-0109 Downers Grove, Illinois 60515 USA E-mail: [email protected] WWW: http://www.ccontrols.com

Contemporary Controls Ltd Tel: +44 (0)24 7641 3786 Barclays Venture Centre Fax: +44 (0)24 7641 3923 University of Warwick Science Park E-mail: [email protected] Sir William Lyons Road WWW: http://www.ccontrols.eu Coventry CV4 7EZ UK

Contemporary Controls Shanghai Representative Office Tel: +86-21-62551335 Room 1012, Zhongchuang Building Fax: +86-21-62552925 819 Nanjing Road (W.) E-mail: [email protected] Shanghai 200041, China WWW: http://www.ccontrols.com.cn

Disclaimer Contemporary Control Systems, Inc. reserves the right to make changes in the specifications of the product described within this manual at any time without notice and without obligation of Contemporary Control Systems, Inc. to notify any person of such revision or change.

Warning — This is a Class A product as defined in EN55022. In a domestic environment this product may cause radio interference in which case the user may be required to take adequate measures.

Contemporary Controls TD020200-0MA i

Table of Contents

1 Introduction ...... 1 1.1 Description...... 1 1.2 Kit Features...... 2 1.3 ARCNET Evaluation Board Specifications ...... 3 1.4 PCI22-485X Specifications ...... 4 1.5 Connectors ...... 5

2 ARC-EVB Description ...... 6

3 PCI22-485X NIM ...... 8 3.1 Description...... 8 3.2 Hardware Installation...... 8 3.3 Software Installation ...... 8 3.4 Indicator Lights...... 9 3.5 Node ID Switch ...... 9 3.6 Fieldbus Connection ...... 9

4 Source Code ...... 10

5 Modbus-over-ARCNET Setup...... 11

6 Modbus-over-ARCNET Operation...... 14

7 Firmware Modification ...... 15

8 Keil Compiler/Debugger...... 18

9 Service...... 20 9.1 Warranty ...... 20 9.2 Technical Support ...... 20 9.3 Warranty Repair ...... 21 9.4 Non-Warranty Repair...... 21 9.5 Returning Products for Repair...... 21

10 Appendix ...... 22 10.1 Modbus Message Format...... 22 10.2 ARC-EVB Component Layout ...... 23 10.3 ARC-EVB Schematic Diagram...... 24

Contemporary Controls TD020200-0MA ii

Figures

Figure 1 — ARC-EVS Components ...... 1 Figure 2 — Evaluation Board Block Diagram...... 6 Figure 3 — PCI22-485X Indicator Lights and Node ID Switch...... 9 Figure 4 — ARC-EVB Control Panel — Inactive...... 12 Figure 5 — Application Settings...... 12 Figure 6 — ARC-EVB Control Panel — Active ...... 13 Figure 7 — LED Status...... 14 Figure 8 — LED Control...... 14 Figure 9 — Atmel Flip Initial Screen...... 15 Figure 10 — Device-Specific Panel before Reading the T89C51RB2 ...... 16 Figure 11 — RS232 Options...... 16 Figure 12 — Device-Specific Panel after Reading the T89C51RB2 ...... 17 Figure 13 — Evaluation Board Layout ...... 23

Tables

Table 1 — Connectors ...... 7 Table 2 — Switches...... 7 Table 3 — Test Points...... 7 Table 4 — Data Rate (J8) ...... 7

Contemporary Controls TD020200-0MA iii

1 Introduction

1.1 Description The ARCNET Evaluation System (ARC-EVS) is a very useful tool for exploring embedded ARCNET. The system contains: • one ARCNET Evaluation Board (ARC-EVB) • one PCI22-485X ARCNET network interface module (NIM) • one wall-mount power supply • one null-modem cable • one modular cable • one RJ-11 modular cable terminator • one RJ-45 modular cable terminator • one CD-ROM

Figure 1 —ARC-EVS Components

The ARC-EVB contains a microcontroller that allows users to upload their firmware into FLASH and execute it. It also works with the Keil compiler, which allows users to debug their ARCNET code on the board. The CPU is provided with external RAM to allow users to load up to 30 KB of firmware. The PCI22-485X is a PCI-based COM20022 ARCNET card. When the card is installed in a computer and connected to the ARC-EVB via the provided modular cable, a complete ARCNET network is created.

Contemporary Controls TD000800-0MA 1

1.2 Kit Features

• ARCNET compliant (ANSI/ATA 878.1) • Industrial temperature range (–40ºC to +85ºC) • Employs standard TTL signal levels • Dual RJ-11 jacks for EIA-485X ARCNET • Dual D-Sub 9 plugs for serial communication • Prototyping area with dual resettable fuses for Vcc • Linear power supply • One 8-pole DIP switch for Node ID • One 8-pole DIP switch for data input • 8 LEDs for input indication • 8 LEDs for output indication • LED for power indication

Contemporary Controls TD020200-0MA 2

1.3 ARCNET Evaluation Board Specifications

Electrical Power Requirements: Power Consumption: 1.8 W, maximum (with all LEDs lit) Voltage: 9–24 VDC Current: commensurate with applied voltage

Environmental Operating Temperature: 0ºC to+60ºC Storage Temperature: –40ºC to+85ºC

Data Rates

10 Mbps, 5 Mbps, 2.5 Mbps, 1.25 Mbps

Dimensions

7" x 4" (178 mm x 102 mm)

Functional Digital Signals: Number Type Input or Output: 8 TTL, 5 V Input Signal Voltage: 0–5 V Maximum Output Low: 450 mV, 1.6 mA Minimum Output High: 4.5 V, 10 µA Serial Port: TTL, 5 V ARCNET Compliance ANSI/ATA 878.1

LED Indicators Function Number Color Power 1 Green CPU Access 1 Yellow Fieldbus Data Received 1 Green Input Signals 8 Red Output Signals 8 Red

Contemporary Controls TD020200-0MA 3

1.4 PCI22-485X Specifications

Environmental Operating Temperature: 0ºC to+60ºC Storage Temperature: –40ºC to+85ºC

Data Rates 10 Mbps, 5 Mbps, 2.5 Mbps, 1.25 Mbps

Dimensions 4.20" x 5.5" (107 mm x 140 mm)

I/O Mapping Requires 16 bytes of I/O space for COM20022 controller

Interrupt Lines Supports PCI INTA

Compatibility Fully compatible with all of Contemporary Controls ARCNET products and PCI computers.

Regulatory Compliance CE Mark FCC Part 15 Class A

Power Requirements Voltage: +5V Current: 400mA

LED Indicators Function Number Color Host CPU Access 1 Yellow Fieldbus Data Transmitted 1 Green

Contemporary Controls TD020200-0MA 4

1.5 Fieldbus Connectors

Two cabling methods are provided for the fieldbus and differ by their connector type.

Identical open-wire, 3-terminal connectors are available on both the ARC-EVB and the NIM:

Open-Wire Connector Pin Assignments Pin Usage 1 Signal 2 Signal 3 Shield

The ARC-EVB modular connector is of the RJ-11 type:

RJ-11 Modular Connector Pin Assignments Pin Usage 1 Not Installed 2 Not Used 3 Signal 4 Signal 5 Not Used 6 Not Installed

The NIM modular connector is of the RJ-45 type:

RJ-45 Modular Connector Pin Assignments Pin Usage 1 Not Used 2 Not Used 3 Not Used 4 Signal 5 Signal 6 Not Used 7 Not Used 8 Not Used

Contemporary Controls TD020200-0MA 5

2 ARC-EVB Description

The core of the ARC-EVB is an Atmel T89C51 CPU which contains 16 KB of FLASH memory to hold the provided test application (Modbus-over-ARCNET)—or the user’s firmware. The FLASH memory can also hold the Keil monitor, allowing it to work with the Keil compiler/debugger. The ARC-EVB also contains an SMSC COM20022 ARCNET controller (backward compatible with the COM20020) which can support data rates from 156 kbps to 10 Mbps using a 20 MHz crystal. This chip offers enhanced features over earlier generation chips. New features include command chaining, sequential access to internal RAM, duplicate Node ID detection and variable data rates up to 10 Mbps. An 8-bit DIP switch (S1) is provided as the input device and 8 associated LEDs report the state of each input. An additional 8 LEDs indicate the states of the output signals. LED 7 in each array is the MSB. Another 8-bit DIP switch (S2) is used for setting the ARCNET Node ID. Switch 8 is the MSB. The data rate is set by jumpers at jumper block J8. The ARC-EVB uses an HYC4000 transformer-coupled ARCNET transceiver. This provides balanced EIA-485 signaling so that either a straight-through or a crossover cable can be used. ARCNET fieldbus connections are provided by either a 3- terminal open-wire connector or an RJ-11 jack for standard twisted-pair cable. An extra RJ- 11 jack is provided for installing the modular terminator provided in the ARC-EVS. The extra jack can also be used for daisy- chaining a twisted-pair bus if the ARC-EVB is configured with more than one ARCNET adapter. Figure 2 — Evaluation Board Block Diagram

Contemporary Controls TD020200-0MA 6

J1 2-pin header Boot ROM (for FLASH reprogramming) Leave off in normal operation J2 D-SUB 9 CPU UART Firmware upload and debug J3 D-SUB 9 Extra serial port Customer SPI development J4 RJ-11 ARCNET RJ-11 port Connect to PCI22-485X J5 RJ-11 ARCNET RJ-11 port Connect terminator here J6 Open 3-wire ARCNET 3 wire port Extra ARCNET port J7 30-pin header Prototyping header J8 6-pin header ARCNET data rate Set to desired rate (Table 4 — Data Rate (J8)) J9 Power input connector Using provided power supply

Table 1 — Connectors

Type Usage Comment S1 8-pin DIP Data Input Set to desired data value S2 8-pin DIP ARCNET Node ID Set to ARC-EVB ARCNET node ID

Table 2 — Switches

Usage DR0 DR1 DR2 Data Rate TP1 VCC — — — 2.5 Mbps TP2 GND X — — 1.25 Mbps TP3 Pulse1 ARCNET signal — X — 625 * kbps TP4 RXIN received ARCNET X X — 312.5 * kbps TP5 TXEN transmit enable — — X 156.25 * kbps TP6 EIA-485 output (Φ B) X — X 5 Mbps TP7 EIA-485 output (Φ A) — X X 10 Mbps X X X N/A Table 3 — Test Points ( X = jumper installed )

Table 4 — Data Rate (J8)

* These rates are not supported by the ARC-EVB transceiver, but are available if the user wishes to replace the ARC-EVB transceiver with a custom transceiver.

Contemporary Controls TD020200-0MA 7

3 PCI22-485X NIM

3.1 Description The PCI22-485X is one of a family of Contemporary Controls network interface modules (NIMs), each serving to link a PCI bus compatible computer with the ARCNET (LAN). Each model within the family is identified by a model number ending in a 3- or 4-character suffix. This suffix specifies a transceiver type which matches a particular type of cable. Because the capabilities of each transceiver differ, different models cannot occupy the same LAN segment. The PCI22-485X supports data rates from 1.25 Mbps to 10 Mbps and operates in a Windows environment with one of our null stack drivers. The driver directory on the CD-ROM provides a selection of null stack drivers from which to choose. This NIM incorporates the same ARCNET controller chip as used on the ARC-EVB. Bus contention problems are minimized since the interrupt level and I/O base address are assigned through Plug and Play. There is no requirement for wait-state arbitration. Two LEDs monitor network operation and bus access to the module. An external DIP switch allows node addresses to be easily reassigned without removing the module.

3.2 Hardware Installation The NIM can be installed in any PCI bus compatible computer bus. With power detached from the computer, remove the computer cover to expose the motherboard and expansion slots (connectors). Care should be taken when installing the card; both it and the exposed motherboard are sensitive to electrostatic discharge. To prevent inadvertent damage, touch the metal case of the internal power supply to discharge yourself then remove the card from its protective ESD package. Remove the backplate of the computer adjacent to the desired slot (connector). Then insert the card into this slot by applying an even downward pressure until it firmly seats in the connector. The card’s backplate can be fastened to the computer with the small screw used to attach the original backplate. Hardware installation is completed by replacing the computer’s cover.

3.3 Software Installation Unlike ISA bus computers, PCI bus computers usually have their resources assigned by the operating system. The PCI22-485X NIM requires one interrupt line and a 16 byte I/O range for the COM20022 ARCNET controller. Once the NIM is inserted and power applied to the computer, Windows will recognize the card and ask the user for the driver location. Point to the folder appropriate to the version of Windows being used. After loading is complete the driver will be active. The driver can be disabled from the Device Manager.

Contemporary Controls TD020200-0MA 8

3.4 Indicator Lights There are two LEDs located at the NIM’s backplate. The green LED indicates that the card is transmitting ARCNET traffic to the network. The yellow LED indicates that the card is being accessed from the host computer via its I/O address.

Figure 3 — PCI22-485X Indicator Lights and Node ID Switch

3.5 Node ID Switch Although not always needed, this NIM has a separate input port that reads an 8-bit DIP switch (SW1) located at the backplate. This switch is meant to serve as a Node ID switch, although it can serve as a general purpose switch if desired. The switch has no connection to the COM20022 controller chip. The most significant bit (MSB) is switch position 8, and the least significant bit (LSB) is switch position 1. A switch in the open position (off position or away from the printed circuit board) introduces a logic “1.” In the example below, the switch is set to hexadecimal address AF.

3.6 Fieldbus Connection The PCI22-485X NIM supports AC-coupled communication via its daughter board which has a fixed-bias network isolated by a pulse transformer. Unlike DC-coupled devices, bias adjustment is unneeded and wiring polarity is unimportant. Dual RJ-45 jacks and one three-position screw terminal connector are the options for attaching the field bus wiring. For convenience, a modular cable is provided for connecting the NIM to the ARC-EVB. Each end of the fieldbus wiring must have a proper value of termination resistance. The NIM provides two options to achieve proper termination: Onboard Termination: Install the E1 jumper on the daughter board to apply an onboard resistance across the twisted-pair. If the jumper is removed, no termination is applied. External Termination: If you wish to enable or disable termination without removing the NIM from the host computer, external termination can be used. In this case, remove jumper E1 and insert either the provided RJ-45 modular terminator in the unused RJ-45 jack or a 120 ohm 1/4 watt resistor across pins 1 and 2 on the screw terminal connector. NOTE: Terminating with a value less than 100 ohms will excessively load the EIA-485 transceivers—so you must only use one method of termination at a time. If more ARCNET devices are attached to the NIM and the ARC-EVB in a bus topology, only apply termination to the devices located at the ends of the bus.

Contemporary Controls TD020200-0MA 9

4 Source Code

The ARC-EVB is provided with Modbus-over-ARCNET example code for both server and client. When the server example code is executed on the ARC-EVB, it can receive one byte of output data and can transmit one byte of input data when polled by the Modbus client. The 8 LEDs on the ARC-EVB are used to indicate the received output data. The 8-bit DIP switch (S1) is used to provide ARC-EVB input data. The client software executes on a PC in which our PCI22-485X has been installed and requires the version of our Null Stack driver appropriate to the version of Windows being used. The Modbus client will continually request current Modbus data from the Modbus server (ARC-EVB) and will also update server output data when modified by the user. The ARCNET Control Panel is illustrated in Figure 4. The server application causes the current ARC-EVB input data to be displayed in the LED Status section of the panel and can change the ARC-EVB output data in the LED control section of the panel. The 8 output LEDs on the ARC- EVB are used to display its output state. Also included is a Keil monitor HEX file that (when copied to the ARC-EVB) allows the ARC- EVB to communicate with the Keil debugger. The HEX file for the Modbus-over-ARCNET server is also provided. This allows the user to switch between debugging with the Keil compiler and executing the Modbus-over-ARCNET server. Updated versions of Modbus-over-ARCNET client and server can be downloaded from www.ccontrols.com.

Contemporary Controls TD020200-0MA 10

5 Modbus-over-ARCNET Setup

Confirm that the PCI22-485X NIM has been properly installed in the host computer (as per Sections 3.2 and 3.3) and that the ARC-EVB EEPROM contains the Modbus hex file. The ARC-EVB has been factory programmed with the Modbus firmware—so loading this firmware will only be needed if it has been erased. (See Section 7 for firmware modification).

PCI22-485X NIM Setup:

• Set the NIM’s Node ID switch to the desired value (1–255, decimal) as per Section 3.5. Optionally, the Node ID can be set via the Windows Application below. • Make sure the NIM has proper cable termination applied as per Section 3.6.

ARC-EVB Setup:

NOTE: The ARC-EVB will initialize with Data Rate and Node ID values existing during power up. Changes to these parameters will have no effect unless power is recycled.

• Set the Data Rate jumpers (J8) to the desired data rate as per Table 4 — Data Rate (J8). • Set the Node ID DIP switch (S2) to a Node ID that differs from that set on the NIM. • Install jumper JP1 to invoke onboard fieldbus termination. Optionally, the provided RJ-11 modular terminator may be inserted in the unused RJ-11 jack. • Apply power.

Fieldbus Setup:

• Connect the NIM to the ARC-EVB with the provided modular cable. Optionally, any CAT-5 twisted-pair cable may be attached between the open-wire connectors.

Contemporary Controls TD020200-0MA 11

Windows Application Setup:

• Launching the application will display the Control Panel in Figure 4. Until the Settings Panel options have been entered, the Control Panel features will remain inactive.

Figure 4 — ARC-EVB Control Panel — Inactive

• Selecting the Settings menu item will display the Settings Panel in Figure 5.

Figure 5 — Application Settings

• In the Node ID box enter the ARCNET Node ID to be associated with the NIM (and its host computer). A zero value causes the Node ID to be read from the NIM’s DIP switch. • The Board Number field specifies how many ARCNET NIMS are installed in the host computer. The default value of “1” rarely needs changing. If more Contemporary Controls PCI-based NIMS are installed, enter that number. • In the Data Rate box select the data rate which matches that set on the ARC-EVB.

Contemporary Controls TD020200-0MA 12

After completing the settings, the Control Panel will appear as in Figure 6. Three fields are “dimmed” because they are read-only — Read Status, Control Status and Number of Recons.

Figure 6 — ARC-EVB Control Panel — Active

• Enter a hex value for the Destination Node ID which agrees with the DIP switch value set on the ARC-EVB. This value must differ from the ID value set for the NIM. • The application is now ready for operation.

Contemporary Controls TD020200-0MA 13

6 Modbus-over-ARCNET Operation

When the ARC-EVB and the Windows application have achieved proper communications, the Control Panel will affect operation as follows.

Reading LED Status from the ARC-EVB Clicking the Start Button, will initiate the transmission of Modbus Function 3H Query Messages (see Section 10.1). The application will continually read information from the Input DIP switch (S1) on the ARC-EVB. Each time the read action is successful, the message “RX OK!” will appear in the Read Status field. As long as the ARC- EVB is working, each change to the Input DIP switch will instantly appear in the LED Status area of the Control Panel. Turning a switch “On” lights its associated LED on the ARC-EVB and causes its associated LED icon in the Control Panel to glow red. In the example shown in Figure 7, switches 4-7 have been turned on. Figure 7 — LED Status While the Start Button is dim, changing the value in the Destination ID field will have no effect on the read action. Clicking the Stop Button concludes the read action, but the last data read continues to display. The next time the Start Button is clicked, the read function will use the current value in the Destination ID field — but the read action will not be successful unless this new value matches the Node ID value with which the ARC-EVB was initialized.

Controlling LEDs on the ARC-EVB Changes in LED Control will affect the Output LEDs on the ARC-EVB. LED Control has 8 checkboxes. Each time a checkbox is clicked, two things are determined — the Destination ID and the status of all 8 checkboxes. The checkbox data are transmitted via a Modbus Function 10H Query Message (see Section 10.1) to activate the corresponding LEDs on the ARC-EVB. But the transmission will fail unless the Destination ID matches the Node ID with which the ARC-EVB was initialized. Figure 8 — LED Control Figure 8 shows a query to activate LEDs 0 and 2 has been successfully sent to Node ID 1. The Control Status message “RX OK!” only means that a properly formatted query and response were exchanged. It does not confirm that the correct data arrived at the destination.

Number of Recons Network reconfigurations are counted in this field. The count can be reset to zero only by restarting the application. Contemporary Controls TD020200-0MA 14

7 Firmware Modification

The Atmel Flip application included on the CD-ROM is used to modify the ARC-EVB firmware. The application includes detailed online help, but a procedural overview is presented below.

Procedure: 1. Connect the ARC-EVB to a PC via the provided null-modem cable. 2. On the ARC-EVB, install the J1 jumper to enable firmware modification. 3. Apply power to the ARC-EVB. 4. Launch the Atmel Flip application.

Figure 9 — Atmel Flip Initial Screen

5. The screen of Figure 9 appears with a lower left corner message prompting you to … 6. Open the Device menu and select a device. Choose the T89C51RB2 and click OK.

Contemporary Controls TD020200-0MA 15

7. The screen changes to display the device-specific panel with appropriate fields for the T89C51RB2. As shown in Figure 10, these fields will remain read-only and the panel will remain “dimmed” until you specify the communication settings.

Figure 10 — Device-Specific Panel before Reading the T89C51RB2

8. Open the Settings > Communications menu option and choose RS232. The RS232 options depicted in Figure 11 will appear.

Figure 11 — RS232 Options

9. From the RS232 options, choose the Port appropriate to your computer and set the Baud value to 19200. Then click Connect.

Contemporary Controls TD020200-0MA 16

10. If the ARC-EVB is working and the signal path between it and the PC is proper, the device-specific panel will be updated with data read from the T89C51RB2 as shown in the example of Figure 12. (If communication between the Flip application and the ARC-EVB is improper, a Time Out Error will occur — check the ARC-EVB and the fieldbus cable.) Leave the upper portion of this panel alone, but make sure (as shown in Figure 12) that these adjustments are set in the lower portions of the panel:

• De-select X2 Mode

• Set Device SBV (Software Boot Vector) to FC

• Set the Device SSB (Software Security Byte) to FF

Figure 12 — Device-Specific Panel after Reading the T89C51RB2

11. To copy a new program to the ARC-EVB … • Select the menu item File > Load HEX … and open the desired file. The filename and size will be verified in the lower center area of the Flip window. • Under the Operations Flow panel on the left of the Flip window, check these boxes — Erase, Blank Check, Program and Verify • Click Run. The checked Operations Flow options should appear green, if successful.

When finished, close the Flip application, remove power from the ARC-EVB and remove jumper J1. The next time you power up the board, it should execute the new firmware.

Contemporary Controls TD020200-0MA 17

8 Keil Compiler/Debugger

The ARC-EVB has been designed to work with the Keil Compiler/Debugger. An evaluation version of the Keil Compiler/Debugger is included on the provided CD-ROM. This evaluation version is limited as follows:

• The compiler, assembler, linker, and debugger are limited to 2 Kbytes of object code— although source code may be of any size. Programs that generate more than 2 Kbytes of object code will not compile, assemble, or link. • The generated startup code includes LJMPs and will not work in single-chip devices which are limited to less than 2 Kbytes of program space. • The debugger supports files that are 2 Kbytes or smaller. • Programs begin at offset 0x0800 and cannot be programmed into single-chip devices. • No hardware support is available for multiple DPTR registers. • No support is available for user libraries or floating-point arithmetic.

The following components are present in the full version, but not in the Keil evaluation software:

• Code-Banking Linker/Locator • Library Manager • RTX-51 Tiny Real-Time Operating System

To obtain a full-featured version of the Keil software, use the contact information below:

Keil Software, Inc. Keil Elektronik GmbH 1501 10th Street, Suite 110 Bretonischer Ring 15 Plano, TX 75074 D-85630 Grasbrunn USA Germany

Toll Free: 800-348-8051 Phone: 972-312-1107 Phone: (49) (089) 45 60 40 0 Fax: 972-312-1159 Fax: (49) (089) 46 81 62

Sales: [email protected] Sales: [email protected]

Support: [email protected] Support: [email protected]

Contemporary Controls TD020200-0MA 18

The Modbus-over-ARCNET server can be debugged on the ARC-EVB using the Keil Debugger. Detailed built-in help screens are included with the Keil Compiler/Debugger, but a helpful general overview of using the Keil tools is presented below:

• Set the PC serial port to a baud rate of 19200. • Copy the entire Modbus-over-ARCNET server folder to your computer. * • Use Atmel Flip to copy the Keil monitor from the MON51 directory to the ARC-EVB. • Remove the J1 jumper from the ARC-EVB. • Recycle power to the ARC-EVB. • Start the Keil compiler. • Using the Project > Open Project menu option, open arc_eval.uv2.

• In the Select Target box, choose Debug Image.

• Use the Project > Rebuild all target files option to compile, link and build the project. • With the Debug > Start/Stop Debug Session option, load the target to the ARC-EVB.

• When the download is completed, enter $=0x8000 in the Command Line Window to set the program counter to 0x8000.

• Use the debugging options under the Debug menu to single step, set breakpoints or run the application. When the debugging is finished, terminate the debug activity with the menu option Debug > Start/Stop Debug Session. The final firmware to be written to the board is in target Flash Image. Use the Project > Rebuild all target files option to rebuild the flash image and generate a hex file called arc_flash.hex. Use the Atmel Flip application to copy the hex file to the ARC-EVB.

* NOTE: When copying files from CD-ROM to hard disk, they will be created as read-only files, but some of these files need to be updated. For such files to be used, this read-only property must be cleared.

Contemporary Controls TD020200-0MA 19

9 Service

9.1 Warranty Contemporary Controls (CC) warrants its product to the original purchaser for one year from the product’s shipping date. If a CC product fails to operate in compliance with its specification during this period, CC will, at its option, repair or replace the product at no charge. The customer is, however, responsible for shipping the product; CC assumes no responsibility for the product until it is received. This warranty does not cover repair of products that have been damaged by abuse, accident, disaster, misuse, or incorrect installation. CC’s limited warranty covers products only as delivered. User modification may void the warranty if the product is damaged during installation of the modifications, in which case this warranty does not cover repair or replacement. This warranty in no way warrants suitability of the product for any specific application. IN NO EVENT WILL CC BE LIABLE FOR ANY DAMAGES INCLUDING LOST PROFITS, LOST SAVINGS, OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PRODUCT EVEN IF CC HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY PARTY OTHER THAN THE PURCHASER. THE ABOVE WARRANTY IS IN LIEU OF ANY AND ALL OTHER WARRANTIES, EXPRESSED OR IMPLIED OR STATUTORY, INCLUDING THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSE OR USE, TITLE AND NONINFRINGEMENT. Repair or replacement as provided above shall be the purchaser's sole and exclusive remedy and CC's exclusive liability for any breach of warranty.

9.2 Technical Support Technical support is available each weekday (except holidays) during the office hours listed below. Outside these hours, voice-mail messages can be left in our mailbox after contacting the main phone number. Requests can also be submitted by fax or by e-mail to the numbers listed below, but please leave a detailed description of the problem. We will contact you the next business day by the method you request. If the problem cannot be resolved by technical support, the customer will be given an RMA number so that the product may be returned to CC for repair.

Contemporary Controls Contemporary Controls Ltd

(USA) (UK) Office Hours 8 a.m. – 5 p.m. Central time 8 a.m. – 5 p.m. UK time Voice +1-630-963-7070 +44 (0)24 7641 3786 Fax +1-630-963-0109 +44 (0)24 7641 3923 Email [email protected] [email protected] Web Site www.ccontrols.com www.ccontrols.co.uk

Contemporary Controls TD020200-0MA 20

9.3 Warranty Repair Products under warranty that were not subjected to misuse or abuse will be repaired at no charge to the customer. The customer, however, pays for shipping the product back to CC while CC pays for the return shipment to the customer. CC normally ships ground. International shipments may take longer. If the product has been determined to be misused or abused, CC will provide the customer with a quotation for repair. No work will be done without customer approval.

9.4 Non-Warranty Repair CC provides a repair service for all its products. Repair charges are based upon a fixed fee basis depending upon the complexity of the product. Therefore, Customer Service can provide a quotation on the repair cost at the time a Returned Material Authorization (RMA) is requested. Customers pay the cost of shipping the defective product to CC and will be invoiced for the return shipment to their facility. No repair will be performed without customer approval. If a product is determined to be unrepairable, the customer will be asked if the product can be replaced with a refurbished product (assuming one is available). Under no circumstances will CC replace a defective product without customer approval. Allow ten working days for repairs. 9.5 Returning Products for Repair To schedule service for a product, please call CC Customer Service support directly at +1-630- 963-7070 (U.S.) or +44 (0)24 7641 3786 (U.K.). Have the product model and serial number available, along with a description of the problem. A Customer Service representative will record the appropriate information and issue, via fax, an RMA number—a code number by which we track the product while it is being processed. Once you have received the RMA number, follow the instructions of the Customer Service support representative and return the product to us, freight prepaid, with the RMA number clearly marked on the exterior of the package. If possible, reuse the original shipping containers and packaging. In any event, be sure you follow good ESD-control practices when handling the product, and ensure that antistatic bags and packing materials with adequate padding and shock-absorbing properties are used. CC is not responsible for any damage incurred from improper packaging. Shipments should be insured for your protection. Ship the product, freight prepaid, to the location from which it was purchased:

Contemporary Control Systems, Inc. 2431 Curtiss Street Downers Grove, IL 60515 U.S.A.

Contemporary Controls Ltd Barclays Venture Centre University of Warwick Science Park Sir William Lyons Rd. Coventry CV4 7EZ U.K.

Contemporary Controls TD020200-0MA 21

10 Appendix

10.1 Modbus Message Format The Modbus protocol uses serial transmission. One Modbus transaction consists of a Query message and a Response message. A Modbus-over-ARCNET message consists of: • ARCNET Header • Modbus Message

The ARC-EVS supports the use of two Modbus functions:

• Function Read Holding Registers (3H) — which reads the status of the input LEDs on the AEB

• Function Preset Multiple Registers (10H) — which writes a value to the output LEDs on the AEB The formatting of these two functions is illustrated below:

Format of the Read Holding Registers Function (3H)

Query Message

Sequence Sequence Function Starting Starting Number of Number of System Slave Split Flag Number Number Number Address Address Points Points Code Address LSB MSB (3H) MSB LSB MSB LSB

Response Message

Sequence Sequence Function System Slave Byte Data Data Split Flag Number Number Number Code Address Count MSB LSB LSB MSB (3H) ARCNET Header Modbus Message

Input LED Status Data to Output LED Occupies LSB Occupies LSB

Format of the Preset Multiple Registers Function (10H)

Query Message

Sequence Sequence Function Starting Starting Register Register System Split Slave Byte Data Data Number Number Number Address Address Number Number Code Flag Address Count MSB LSB LSB MSB (10H) MSB LSB MSB LSB

Response Message

Sequence Sequence Function System Slave Byte Data Data Split Flag Number Number Number Code Address Count MSB LSB LSB MSB (10H) ARCNET Header Modbus Message

Contemporary Controls TD020200-0MA 22

10.2 ARC-EVB Component Layout

Figure 13 — Evaluation Board Layout

Contemporary Controls TD020200-0MA 23 1 2 3 4 5 6

D D

CPU, Memory, Logic, & UART ARCNET Controller & Transceiver Power Supply CPU.SCH ARC.SCH PWR.SCH AD[0..15] AD[0..15] AD[0..15] RD# RD# RD# WR# WR# WR# ALE ALE ALE CLOCK CLOCK CLOCK CS_ARC# CS_ARC# CS_ARC# INT_ARC# INT_ARC# INT_ARC# ARC_RES# ARC_RES# ARC_RES# CS_IO# CS_IO# CS_ARCID# CS_ARCID# CS_ARCDR# CS_ARCDR# MOSI MOSI C MISO C MISO SCK SCK P1_0 P1_0 P1_1 P1_1 P1_2 P1_2 P1_3 P1_3 P1_4 P1_4 RESET# Digital I/O RESET# IO.SCH AD[0..15] RD# WR#

CS_IO# CS_ARCID# CS_ARCDR#

MOSI MISO SCK P1_0 B P1_1 B P1_2 P1_3 P1_4

RESET#

CHASSIS

MP3 MP4

MP1 MP2 MTGPAD MTGPAD MTGPAD MTGPAD

Contemporary Control 2431 Curtiss Street A Systems, Inc. Downers Grove, IL 60515 A Title ARCNET Evaluation Board Size Number Revision B TD020200-0SA B Date: 23-Apr-2002 Sheet 1 of 6 File: Drawn By: RCW 1 2 3 4 5 6 1 2 3 4 5 6

VCC R2 MISO VCC VCC 10K U3 Socket U4 2 43 AD0 1 20 C20 P1_0 P1.0/T2 P0.0/AD0 GND OC VCC U1 R1 3 42 AD1 ALE 11 10 .1uF P1_1 P1.1/T2EX/SS P0.1/AD1 C GND GND 1 4 390 4 41 AD2 U5 OE VCC P1_2 P1.2/EC1 P0.2/AD2 D 5 40 AD3 AD0 3 2 BA0 20 21 AD0 D P1_3 P1.3/CEX0 P0.3/AD3 1D 1Q A0 D0 C17 2 3 CLOCK 6 39 AD4 AD1 4 5 BA1 19 22 AD1 GND OUT CLOCK P1_4 P1.4/CEX1 P0.4/AD4 2D 2Q A1 D1 .1uF MISO 7 38 AD5 AD2 7 6 BA2 18 23 AD2 MISO P1.5/CEX2/MISO P0.5/AD5 3D 3Q A2 D2 20MHz SCK 8 37 AD6 AD3 8 9 BA3 17 25 AD3 SCK P1.6/CEX3/SCK P0.6/AD6 4D 4Q A3 D3 MOSI 9 36 AD7 AD4 13 12 BA4 16 26 AD4 MOSI P1.7/CEX4/MOSI P0.7/AD7 5D 5Q A4 D4 GND AD5 14 15 BA5 15 27 AD5 6D 6Q A5 D5 RxD 11 24 AD8 AD6 17 16 BA6 14 28 AD6 P3.0/RxD P2.0/A8 7D 7Q A6 D6 VCC U2 TxD 13 25 AD9 AD7 18 19 BA7 13 29 AD7 P3.1/TxD P2.1/A9 8D 8Q A7 D7 1 8 RESET 14 26 AD10 AD8 3 MR RES INT_ARC# P3.2/INT0# P2.2/A10 A8 VCC 2 7 RESET# INT_UART# 15 27 AD11 MM74HC373 AD9 2 8 VCC RES RESET# P3.3/INT1# P2.3/A11 A9 VCC 3 RESET2# 16 28 AD12 AD10 31 C21 GND P3.4/T0 P2.4/A12 A10 C1 4 5 CS_UART# 17 29 AD13 AD11 1 24 .1uF PFI PFO P3.5/T1 P2.5/A13 A11 GND GND .1uF WR# 18 30 AD14 AD12 12 WR# P3.6/WR# P2.6/A14 A12 ADM708AR RD# 19 31 AD15 AD[0..15] AD13 4 30 CS_RAM# RD# P3.7/RD# P2.7/A15 AD[0..15] A13 CE1 AD14 11 6 VCC A14 CE2 GND RESET 10 33 ALE AD15 7 32 MRD# RESET ALE ALE A15 OE 32 PSEN# 10 5 WR# PSEN# A16 WE U20C 20 35 VCC XTAL2 EA# RESET 9 D21 GREEN GND RAM/128K/TSOP32 8 R18 44 VCC VCC VCC 10 680 CLOCK 21 22 POWER OK XTAL1 GND C22 GND MM74HC32 AT89C51RC2 .1uF GND C C

Chip Select & Boot Logic U6A PSEN# 1 BOOT PROCESS: LOGIC.Sch 3 MRD# AD[0..15] CS_RAM# VCC RD# 2 AD[0..15] CS_RAM# PSEN# Instal boot jumper to enable internal boot ROM on startup so PSEN# CS_ARC# CS_ARC# ALE MM74HC08 you can program flash memory. ALE CS_IO# CS_IO# CLOCK C2 CLOCK CS_ARCID# CS_ARCID# RESET .1uF U6B RESET CS_ARCDR# CS_ARCDR# PSEN# and ALE are sampled on falling edge of RESET to RESET# 4 determine boot mode. These signals must be released prior GND 6 BOOT_ROM ARC_RES# to the 24th clock cycle after the falling edge of RESET. RESET2# 5 J1 1 2 R3 MM74HC08 VCC GND 10K BOOT ROM

VCC

C4 J2 CHIP SELECT NOTES: B U9 B .1uF 1 16 C5 1 C1+ IVCC GND 3 15 .1uF 6 11 C1- IGND All I/O is memory mapped in a 1K memory region from F400H to F7FFH. C6 2 RAM is mapped in all other addresses. C3 4 2 V+ .1uF C7 7 C2+ V+ .1uF 5 6 V- .1uF 3 C2- V- 8 CPU UART Program can be loaded into RAM from 8000H to F3FFH. The PSEN# U8 TxD 11 14 4 signal is only active above 32K. This will allow 29,696 bytes for program T1_IN T1_OUT MOSI 1 15 10 7 9 10 DIN TX T2_IN T2_OUT storage during debugging. VCC MISO 2 14 5 DOUT RX TTL RS232 SCK 3 13 RxD 12 13 CHASSIS SCLK RTS R1_OUT R1_IN RAM can be accessed as XDATA anywhere except between CS_UART# 4 11 9 8 GND CS CTS R2_OUT R2_IN DB9 MALE U7 INT_UART# 6 F400H to F7FFH. The internal boot ROM is located between F800H and IRQ 1 4 7 MAX232 J3 FFFFH, so RAM will not be available in that region, either. OE VCC VCC SHDN VCC 1 C18 2 3 10 16 6 11 GND OUT X1 IVCC .1uF 2 1.8432MHz C8 7 9 8 .1uF 3 X2 IGND GND 8 SPI UART MAX3100/QSOP16 GND 4 9 10 5 CHASSIS 2431 Curtiss Street GND Contemporary Control A DB9 MALE Systems, Inc. Downers Grove, IL 60515 A Title CPU, Memory, Logic, & UART Size Number Revision B TD020200-0SA B Date: 23-Apr-2002 Sheet 2 of 6 File: Drawn By: RCW 1 2 3 4 5 6 1 2 3 4

U6C AD15 9 U14 8 AD8 1 15 A Y0 CS_ARC# AD14 10 U11A AD9 2 14 B Y1 CS_IO# 1 U11B 3 13 D C Y2 CS_ARCID# D MM74HC08 3 4 12 Y3 CS_ARCDR# U6D 2 6 6 11 G1 Y4 AD13 12 5 4 10 VCC G2A Y5 11 MM74HC08 5 9 G2B Y6 AD12 13 MM74HC08 7 Y7 GND C9 MM74HC08 VCC MM74HC138 .1uF U11C U12 AD11 2 4 9 GND 8 C11 HIGH: F400H - F7FFH HC14/SINGLE CS_RAM# AD10 10 .1uF

AD9 VCC MM74HC08 GND AD8 Chip Select Addresses C10 .1uF CS_RAM# 0000H - F3FFH C GND C AD[0..15] CS_ARC# F400H - F4FFH AD[0..15] CS_IO# F500H - F5FFH CS_ARCID# F600H - F6FFH CS_ARCBR# F700H - F7FFH

BOOT_ROM U15 1 VCC CLR 11 2 Q0 4 CLOCK CLK 1Q 5 Q1 2Q 3 6 Q2 5 6 RESET 1D 3Q GND PSEN# Q0 4 9 Q3 2D 4Q Q1 7 12 Q4 VCC 3D 5Q B Q2 8 15 Q5 1 B 4D 6Q U16B Q3 13 16 Q6 5D 7Q MM74HC126 Q4 14 19 2 3 C13 6D 8Q Q5 17 .1uF 7D Q6 18 R19 10 8D U16A 10K GND MM74HC273 9 8 MM74HC126 VCC ALE VCC GND U16C MM74HC126 C12 .1uF

GND Contemporary Control 2431 Curtiss Street Systems, Inc. Downers Grove, IL 60515 Title A Chip Select & Boot Logic A Size Number Revision A TD020200-0SA B Date: 23-Apr-2002 Sheet 3 of 6 File: Drawn By: RCW 1 2 3 4 1 2 3 4 5 6

TP3 TP4 TP5 TP6 TP7 PULSE1 RXIN TXEN RS485B RS485A

D D CHASSIS J6 1 U18 2 8 5 RX485AC_A PULSE_1 PH_A 3 CLOCK 7 4 RX485AC_B TXEN PH_B U17 AD0 1 21 3 C23 C24 J4 AD0 XTAL1 RXIN AD1 2 R4 R5 6 AD1 27pF, 1KV 27pF, 1KV AD2 4 2 5.6K, 1/2W 5.6K, 1/2W 5 AD2 VCC VCC AD[0..15] AD3 7 4 AD[0..15] D3 AD4 9 22 C32 C19 3 D4 XTAL2 AD5 10 10uF .1uF 6 1 2 S1 D5 GND Vref AD6 12 R6 R7 1 S2 D6 AD7 13 GND HYC4000 5.6K, 1/2W 5.6K, 1/2W D7 47 RJ11 D8 48 24 D9 PULSE1 3 J5 D10 5 25 CHASSIS CHASSIS 6 D11 PULSE2 14 5 D12 15 29 4 D13 TXEN 16 JP1 3 D14 17 28 2 1 R20 2 S1 C D15 RXIN C 100 1 S2 44 TERMINATION GND A0/MUX 45 RJ11 CHASSIS A1 46 ALE A2/ALE 8 VCC 37 20 WR# WR VCC 39 32 VCC GREEN RD# RD VCC U13 36 43 U19A CS_ARC# CS VCC 2 4 1 13 D1 A Q 42 C40 C25 C26 C27 2 4 R8 IOCS16 B Q VCC 26 6 .1uF .1uF .1uF .1uF VCC 3 BUSTMG GND HC14/SINGLE VCC CLR 470 DATA 11 14 16 GND Cext VCC VCC 33 18 GND R10 15 8 DREQ GND VCC Rext/Cext GND 35 23 C15 + C16 VCC DACK GND 150K 38 30 .1uF C33 MM74HC423A .1uF TC GND 41 100pF GND 40 GND GND REFEX 34 19 GND INT_ARC# INT NC 31 27 ARC_RES# RESET NC U11D YELLOW COM20022/TQFP48 12 U19B 11 9 5 D2 A Q 13 10 12 R9 B Q VCC U20A 11 B VCC CLR 470 ACCESS B 1 MM74HC08 6 Cext 3 R11 7 VCC Rext/Cext 2 VCC 150K + C34 MM74HC423A MM74HC32 .1uF U20B C14 4 .1uF GND 6 5 GND

MM74HC32

Contemporary Control 2431 Curtiss Street A Systems, Inc. Downers Grove, IL 60515 A Title ARCNET Controller & Transceiver Size Number Revision B TD020200-0SA B Date: 23-Apr-2002 Sheet 4 of 6 File: S3_ARC.SCH Drawn By: RCW 1 2 3 4 5 6 1 2 3 4 5 6

Prototype Area Header AD[0..15] J7 AD[0..15] Outputs INP7 1 2 INP6 D3 INP5 3 4 INP4 RESET# RED D INP3 5 6 INP2 D U21A U23 D4 INP1 7 8 INP0 RED 1 1 RP1 OUT7 9 10 OUT6 CS_IO# CLR 3 11 2 OUT0 1 16 D5 OUT5 11 12 OUT4 CLK 1Q RED 2 5 OUT1 2 15 OUT3 13 14 OUT2 WR# 2Q AD0 3 6 OUT2 3 14 D6 OUT1 15 16 OUT0 1D 3Q RED MM74HC32 AD1 4 9 OUT3 4 13 XIN3 17 18 XIN2 2D 4Q AD2 7 12 OUT4 5 12 D7 XIN1 19 20 XIN0 3D 5Q RED AD3 8 15 OUT5 6 11 21 22 4D 6Q MOSI P1_0 AD4 13 16 OUT6 7 10 D8 23 24 5D 7Q RED MISO P1_1 AD5 14 19 OUT7 8 9 25 26 6D 8Q SCK P1_2 AD6 17 D9 27 28 7D RED P1_4 P1_3 AD7 18 29 30 GND 8D 330 F1 U21B D10 RED VCC 4 MM74HC273 PROTOTYPE HEADER 6 RESETTABLE 5 GND RD# U24 D11 MM74HC32 1 INP0 OC AD0 19 11 D12 1Q C RED AD1 18 S1 RP2 INP1 RP3 2Q AD2 17 2 INP0 1 16 1 16 D13 16 1 3Q 1D RED AD3 16 3 INP1 2 15 2 15 INP2 15 2 4Q 2D AD4 15 4 INP2 3 14 3 14 D14 14 3 5Q 3D RED C AD5 14 5 INP3 4 13 4 13 INP3 13 4 C 6Q 4D AD6 13 6 INP4 5 12 Inputs 5 12 D15 12 5 7Q 5D RED AD7 12 7 INP5 6 11 6 11 INP4 11 6 8Q 6D 8 INP6 7 10 7 10 D16 10 7 7D RED 9 INP7 8 9 8 9 INP5 9 8 8D VCC GND GND D17 RED MM74HC573 SW-DIP8 330 INP6 10K D18 RED U21C INP7 9 CS_ARCID# RED 8 10 U25 MM74HC32 1 OC AD0 19 11 1Q C AD1 18 S2 RP4 2Q AD2 17 2 ARCID0 1 16 ARCID0 1 16 3Q 1D VCC AD3 16 3 ARCID1 2 15 ARCID1 2 15 4Q 2D AD4 15 4 ARCID2 3 14 ARCID2 3 14 5Q 3D AD5 14 5 ARCID3 4 13 ARCID3 4 13 6Q 4D AD6 13 6 ARCID4 5 12 ARCNET ID ARCID4 5 12 7Q 5D AD7 12 7 ARCID5 6 11 ARCID5 6 11 8Q 6D 8 ARCID6 7 10 ARCID6 7 10 7D B 9 ARCID7 8 9 ARCID7 8 9 B U21D 8D GND 12 MM74HC573 ARCNET NODE ID CS_ARCDR# 10K 11 13 U26 MM74HC32 1 OC AD0 19 11 1Q C AD1 18 J8 RP5 2Q AD2 17 2 BAUD0 1 2 BAUD0 1 16 3Q 1D VCC AD3 16 3 BAUD1 3 4 BAUD1 2 15 4Q 2D AD4 15 4 BAUD2 5 6 BAUD2 3 14 5Q 3D AD5 14 5 XIN0 XIN0 4 13 6Q 4D GND AD6 13 6 XIN1 DATARATE ARCNET Datarate XIN1 5 12 7Q 5D AD7 12 7 XIN2 XIN2 6 11 8Q 6D 8 XIN3 XIN3 7 10 7D 9 XIN4 VCC XIN4 8 9 8D MM74HC573 10K VCC TP2 F2 VCC GND VCCP C41 C42 C43 C44 VCC FUSE2 .1uF .1uF .1uF .1uF .1uF PROTOTYPE POWER TP1 2431 Curtiss Street A VCC Contemporary Control A GNDC45 Systems, Inc. Downers Grove, IL 60515 Title GND Digital I/O Size Number Revision B TD020200-0SA B Date: 23-Apr-2002 Sheet 5 of 6 File: Drawn By: RCW 1 2 3 4 5 6 1 2 3 4 5 6

D D 4 3 L1

J9 D19 U27 CTX100-4 VCC R12 5 4 1 VIN VSW 1 2 2 10 OHM, 1% 1N4004 R15 2 D20 R16 3 R13 VC 2.8K, 1% MBRS340T3 2.80K, 1% PWR JACK 10 OHM, 1% 3 1

GND GND FB C + + + + + C C28 R14 C35 C29 C30 C31 LT1076 C36 C37 C38 C39 .1uF 2200uF .1uF .1uF .1uF R17 220uF 220uF 220uF 220uF 10 OHM, 1% 6 2.21K, 1%

GND

B B

13 U20D 12 12 11 11 13 GND U16D GND MM74HC32 MM74HC126 Spare Gates

Contemporary Control 2431 Curtiss Street A Systems, Inc. Downers Grove, IL 60515 A Title Power Supply Size Number Revision B TD020200-0SA B Date: 23-Apr-2002 Sheet 6 of 6 File: PWR_SUPPLY.SCH Drawn By: RCW 1 2 3 4 5 6