Eurotech AIM104-CAN Owner's manual

Type
Owner's manual
AIM104-CAN (SJA1000)
Opto-isolated CANbus
interface
Technical Manual
AIM104-CAN Technical Manual
ISO 9001
FM12961
Disclaimer
The information in this manual has been carefully checked and is believed to be accurate. Eurotech Ltd assumes no
responsibility for any infringements of patents or other rights of third parties, which may result from its use.
Eurotech Ltd assumes no responsibility for any inaccuracies that may be contained in this document. Eurotech Ltd makes
no commitment to update or keep current the information contained in this manual.
Eurotech Ltd reserves the right to make improvements to this document and/or product at any time and without notice.
Warranty
This product is supplied with a 3 year limited warranty. The product warranty covers failure of any Eurotech Ltd
manufactured product caused by manufacturing defects. The warranty on all third party manufactured products utilised by
Eurotech Ltd is limited to 1 year. Eurotech Ltd will make all reasonable effort to repair the product or replace it with an
identical variant. Eurotech Ltd reserves the right to replace the returned product with an alternative variant or an equivalent
fit, form and functional product. Delivery charges will apply to all returned products. Please check
www.eurotech-ltd.co.uk for
information about Product Return Forms.
Trademarks
Windows NT, Windows 2000, and Windows XP are registered trademarks of the Microsoft Corporation.
All other trademarks recognised.
Revision History
Manual PCB Date Comments
Issue A V1.1 March 24th, 1997 First full release of manual.
Issue B V1.2 June 9th, 1997 [ECO2518]
Issue C V1.2 October 7th, 1998 [ECR333]
Issue D V2.1 September 25th, 2006 Revised format and content.
Issue E V2.1 December 21st, 2007 Revised format and content.
© 2007 Eurotech Ltd.
For contact details, see page
17.
AIM104-CAN Technical Manual Contents
© 2007 Eurotech Ltd Issue E 3
Contents
Introduction........................................................................................................................................4
Handling your board safely....................................................................................................5
About this manual..............................................................................................................................6
Conventions...........................................................................................................................6
What items are provided?..................................................................................................................7
Getting started ...................................................................................................................................7
Unpacking and connecting up................................................................................................7
Description.........................................................................................................................................8
Connection of bi-colour LEDs............................................................................................................9
I/O map............................................................................................................................................10
LED register.........................................................................................................................11
E
2
PROM register .................................................................................................................11
E
2
PROM contents................................................................................................................11
Links.................................................................................................................................................13
LK1 - Address link................................................................................................................14
LK2 - Interrupt link ...............................................................................................................14
LK3 - Controlled slew rate link.............................................................................................14
LK4 and LK5 - Line termination links...................................................................................14
Connector pin (PL2) assignments....................................................................................................15
Isolated CAN transceiver.................................................................................................................16
Appendix A – Contacting Eurotech Ltd ............................................................................................17
Appendix B – Software library..........................................................................................................18
Installing the software..........................................................................................................18
Full documentation...............................................................................................................18
ArCan library functions.........................................................................................................19
Index................................................................................................................................................22
AIM104-CAN Technical Manual Introduction
© 2007 Eurotech Ltd Issue E 4
Introduction
The AIM104-CAN is an 8-bit PC/104 module providing a single channel, optically
isolated, Controller Area Network (CAN) interface. In addition, the board is fitted with
an E²PROM for configuration information and an output port for driving three bi-colour
LEDs.
Features
Single channel, opto-isolated CAN (ISO11898) interface utilising Philips 82C200
Standalone CAN Controller.
Up to 1MB/s baud rate.
Supports the following CAN standards:
- CAN 1.1 - full support for CAN with standard 11-bit identifiers.
- CAN 2.0a - error passive to extended 29-bit identifiers.
On-board link-selectable CAN termination network (124R).
Link-selectable slew rate control for CAN line drivers.
Fieldbus power ground signal fault protection.
Diagnostic LEDs:
- Module access LED.
- CAN bus activity indicator LED.
- CAN bus transmit indicator LED.
On-board serial E²PROM (128 bytes) for parameter storage.
6-bit output port to drive three bi-colour indicator LEDs (24mA source/sink).
8-bit PC/104 (IEEE996) interface.
Link selectable base address (on 32 byte boundary).
Link selectable interrupt (IRQ2,3,4,5,6,7).
EMC guard plane.
Operating temperature range: -20°C to +70°C.
Power requirements: PC/104 interface: +5V at 180mA typical.
Isolated CAN: +9V to +27V at 50mA max.
MTBF: 552,900 hours (using generic failure rates from MIL-HDBK-217F at ground
benign).
AIM104-CAN Technical Manual Introduction
© 2007 Eurotech Ltd Issue E 5
Handling your board safely
Anti-static handling
This board contains CMOS devices. These could be damaged in the event of static
electricity being discharged through them. Observe anti-static precautions at all times
when handling circuit boards. This includes storing boards in appropriate anti-static
packaging and wearing a wrist strap when handling them.
Electromagnetic Compatibility (EMC)
The AIM104-CAN is classified as a ‘component’ with regard to the European
Community EMC regulations and it is the user’s responsibility to ensure that systems
using the board are compliant with the appropriate EMC standards.
The opto-isolation provides a good barrier for noise emissions generated by the high
frequency host PC/104 system. The AIM104-CAN includes additional filter components
on-board to minimise the emissions of high frequency noise. Because of this, the earth
tab supplied with the module must be connected to the chassis of the system by a
good earth wire.
If the electronic system requires input protection against high voltage transients (to
meet CE requirements), it is recommended that an external interface board is located
at the point where the external wiring enters the electronic system enclosure:
Packaging
Should a board need to be returned to Eurotech Ltd, please ensure that it is
adequately packed, preferably in the original packing material.
AIM104-CAN Technical Manual About this manual
© 2007 Eurotech Ltd Issue E 6
About this manual
This manual describes the operation and use of the AIM104-CAN PC/104 module. It is
both a reference and user manual and includes information about all aspects of the
module.
Conventions
Symbols
The following symbols are used in this guide:
Symbol Explanation
Note - information that requires your attention.
Caution – proceeding with a course of action may damage your
equipment or result in loss of data.
AIM104-CAN Technical Manual What items are provided?
© 2007 Eurotech Ltd Issue E 7
What items are provided?
The AIM104-CAN is supplied with the following items:
The AIM104-CAN board.
Mounting kit.
Getting started
Unpacking and connecting up
To begin using the AIM104-CAN board, follow these steps:
1 Power down your computer.
2 Install the board in a spare PCI slot.
3 Power up your computer and install the appropriate driver available from our
website:
23H4H5Hwww.eurotech-ltd.co.uk/en/downloads.
AIM104-CAN Technical Manual Description
© 2007 Eurotech Ltd Issue E 8
Description
The AIM104-CAN uses the Philips 82C200 device to handle all aspects of the CAN
communications protocol.
The 32 registers of the 82C200 are mapped directly into the I/O space of the module
and are accessed by standard input and output operations from the host CPU board.
An interrupt can be generated by the 82C200 upon certain conditions occurring
(transmit, receive, and error conditions), which is routed to IRQ2,3,4,5,6, or 7 by a link.
The AIM104-CAN does not support PC/104 interrupt sharing.
In addition to the registers of the 82C200, the AIM104-CAN implements two other
registers. One register is used to access the on-board E²PROM and the other for
accessing the off-board indicator LEDs (nominally three bi-colour LEDs).
Full software support for the CAN driver device, the E²PROM, and the indicator LEDs
is provided in the AIM104-CAN software library (see Appendix B – Software library
,
page 18
, for further details). In addition, higher-level protocol support may be
purchased from Eurotech Ltd. Contact Eurotech Ltd sales (see page 17
for further
details).
AIM104-CAN Technical Manual Connection of bi-colour LEDs
© 2007 Eurotech Ltd Issue E 9
Connection of bi-colour LEDs
The AIM104-CAN has a 6-bit output port that is designed to drive three bi-colour
indicator LEDs. Use the following circuit to connect these LEDs:
AIM104-CAN Technical Manual I/O map
© 2007 Eurotech Ltd Issue E 10
I/O map
Address Device
1
Reg name Access Function
Base +0x00 82C200 CR R/W Control register
Base +0x01 82C200 CMR Write only Command register
Base +0x02 82C200 SR Read only Status register
Base +0x03 82C200 IR Read only Interrupt register
Base +0x04 82C200 AC R/W
2
Acceptance code register
Base +0x05 82C200 AM R/W
2
Acceptance mask register
Base +0x06 82C200 BTR0 R/W
2
Bus timing register 0
Base +0x07 82C200 BTR1 R/W
2
Bus timing register 1
Base +0x08 82C200 OCR R/W
2
Output control register
Base +0x09 82C200 TR - Test register (used for Philips
Production Test only)
Base +0x0A 82C200 TB R/W
2
Transmit buffer (2 descriptor bytes +
8 data bytes)
Base +0x14 82C200 RB0/RB1 Read only Receive buffers (2 descriptor bytes
+ 8 data bytes each)
Base +0x1F 82C200 CDR R/W Clock divisor register
Base +0x20 Module LED Write only Output register for bi-colour LEDs
Base +0x21 Module E
2
PROM R/W I/O register for accessing the
EEPROM
1
For full information about the 82C200, refer to the appropriate data sheet available from a Philips distributor.
2
Access to these registers may be restricted depending on the operating mode or conditions within the 82C200.
AIM104-CAN Technical Manual I/O map
© 2007 Eurotech Ltd Issue E 11
LED register
The LED register is used to light three external bi-colour LEDs. All bits are write only:
7 6 5 4 3 2 1 0
Reserved LED2.1 LED2.0 LED1.1 LED1.0 LED0.1 LED0.0
Writing a logic 1 to any bit position causes the corresponding output to go low (active).
After reset all bits are logic 0. You should write reserved bits as logic 0.
E
2
PROM register
The E
2
PROM register directly accesses the serial lines on a 93C46 serial E²PROM, as
shown in the register below. All implemented bits are read/write except the DO bit,
which is read only:
7 6 5 4 3 2 1 0
Reserved SCK CS DI DO
Writing a logic 1 to a bit causes the corresponding signal on the E
2
PROM to go high; a
logic zero makes the signal low. After reset, all bits in this register are logic 0. You
should write all reserved bits as logic 0 for future software compatibility.
E
2
PROM contents
The E
2
PROM on the AIM104-CAN is shipped from the factory with a default
programming. This information is divided into two records. Both records are readable
using the supplied software, but only the second record is writeable.
Data is organised in 16-bit words and, for larger data units, the byte order is as follows:
First data word Second word
Object type
Most sig byte Least sig byte Most sig byte Least sig byte
Byte arrays (strings) 2nd byte 1st byte 4th byte 3rd byte
32-bit number Least significant word Most significant word
The default contents of the data is shown in the following tables.
AIM104-CAN Technical Manual I/O map
© 2007 Eurotech Ltd Issue E 12
Product data record
Offset (word) Size (words) Description Value
0x00 1 DeviceNet vendor ID (Eurotech
Ltd’s)
126
0x01 1 SDS partner number (Eurotech
Ltd’s)
0xFFFF
0x02 2 Unique 32 bit serial number -
0x04 1 Encoded Eurotech Ltd product
number
10552
1
0x05 1 Encoded Eurotech Ltd version
control code
10100
1
0x06 11 Manufacturer string Eurotech Ltd Control
Systems
0x11 9 Stock number string 6040-00552-001101
1
0x1A 12 Product description string AIM104-CAN
0x26 2 Date code string mmYY 0397
1
0x28 1 16 bit CRC check mode -
Application data record
Offset (word) Size (words) Description Value
0x29 1 Encoded baud rate 500
0x2A 1 Network address 0xFFFF
0x2B 4 User data array {0,0,0,0}
0x2F 16 User tag area -
0x3F 1 Encoded Eurotech Ltd version
control code
-
1
This information may vary to reflect the build of the product that is shipped.
AIM104-CAN Technical Manual Links
© 2007 Eurotech Ltd Issue E 13
Links
The following diagrams illustrate the link positions:
Link position diagram (address is 180h)
AIM104-CAN Technical Manual Links
© 2007 Eurotech Ltd Issue E 14
LK1 - Address link
LK1 is the address decode link, on which the desired board base address is set.
The base address can be set on any 32 byte boundary and 34 bytes are
decoded. A successful decode to any of these 34 locations will cause the
red module access LED to light momentarily.
LK2 - Interrupt link
LK2 is the interrupt select link. This can be set for IRQ2 through to IRQ7.
IRQ2 maps onto IRQ9 in an AT type PC host CPU.
This module does not support PC/104 interrupt sharing.
Certain PC/104 host boards may not be able to use all of the possible link options. Use
the following table as a guide:
Link position
PC compatible
1
Target386EX Target188EB
IRQ2
9
IRQ3
9
9
IRQ4
9
9
IRQ5
9 9 9
IRQ6
9
IRQ7
9 9 9
LK3 - Controlled slew rate link
LK3 is the slew rate control link. You can remove it at baud rates below 250Kbaud for a
slower slew on the CAN signals. This may reduce EMC emissions on unscreened
twisted pair wiring.
LK4 and LK5 - Line termination links
LK4 and LK5 are used to attach the CAN termination network. If the AIM104-CAN is at
an end of the CAN bus, you should attach terminations. To attach the termination both
links should be fitted. If no termination is required both links should be removed.
1
Consult your PC AT manual to see if these IRQs are committed to other devices.
AIM104-CAN Technical Manual Connector pin (PL2) assignments
© 2007 Eurotech Ltd Issue E 15
Connector pin (PL2) assignments
The pin assignments are shown in the table below:
Pin no Function Pin no Function
1 GND 2 /LED0.0
3 /LED0.1 4 /LED1.0
5 /LED1.1 6 /LED2.0
7 /LED2.1 8 +5V
9 n/c 10 n/c
11 n/c 12 SCRN
13 CAN_L 14 CAN_H
15 V 16 n/c
17 n/c 18 V+
19 n/c 20 n/c
PL2 is used for both the isolated CAN line drivers and the non-isolated
indicator LEDs. Care should be taken to separate the appropriate signals.
The power for the LEDs is not protected in any way and should not be
used for driving any apparatus other than the indicator LEDs.
The ribbon cable can be split to form a standard CiA 9-way D-sub CAN connection:
Alternatively, Eurotech Ltd can supply panel mountable breakout boards with mounted
bi-colour LEDs for D-sub and screw terminal (DeviceNet) cabling. Please contact
Eurotech Ltd sales (see page 17
) and enquire about SERTDNET.
AIM104-CAN Technical Manual Isolated CAN transceiver
© 2007 Eurotech Ltd Issue E 16
Isolated CAN transceiver
The CAN transceiver on the AIM104-CAN is optically isolated from the PC/104
interface and requires external powering in order to function. A regulator on the isolated
side of the circuit allows a wide range of voltage input (on the V+/V-) from 9V to 27V.
The V- signal is the nominal ground reference for the line driver. A protection circuit
prevents damage to the line drivers should this signal become disconnected and all the
other signals remain connected.
The optical isolation is designed to prevent ground loops and voltage drop causing
problems on a distributed CAN bus system. Although the isolation voltage is in excess
on 48V, the isolation must not be used as a safety feature.
AIM104-CAN Technical Manual Appendix A – Contacting Eurotech Ltd
© 2007 Eurotech Ltd Issue E 17
Appendix A – Contacting Eurotech Ltd
Eurotech Ltd sales
Eurotech Ltd’s sales team is always available to assist you in choosing the board that
best meets your requirements.
Eurotech Ltd
3 Clifton Court
Cambridge
CB1 7BN
UK
Tel: +44 (0)1223 403410
Fax: +44 (0)1223 410457
Email:
Comprehensive information about our products is also available at our web site:
7Hwww.eurotech-ltd.co.uk.
While Eurotech Ltd’s sales team can assist you in making your decision, the
final choice of boards or systems is solely and wholly the responsibility of the
buyer. Eurotech Ltd’s entire liability in respect of the boards or systems is as set
out in Eurotech Ltd’s standard terms and conditions of sale. If you intend to
write your own low level software, you can start with the source code on the
disk supplied. This is example code only to illustrate use on Eurotech Ltd’s
products. It has not been commercially tested. No warranty is made in respect
of this code and Eurotech Ltd shall incur no liability whatsoever or howsoever
arising from any use made of the code.
Eurotech Ltd technical support
Eurotech Ltd has a team of dedicated technical support engineers available to provide
a quick response to your technical queries.
Tel: +44 (0)1223 412428
Fax: +44 (0)1223 410457
Email:
Eurotech Group
Eurotech Ltd is a subsidiary of Eurotech Group. For further details see
9Hwww.eurotech.com
AIM104-CAN Technical Manual Appendix B – Software library
© 2007 Eurotech Ltd Issue E 18
Appendix B – Software library
The AIM104-CAN is a more specialised module than the other modules in the range,
and the software structure is slightly different to accommodate this.
Installing the software
The system requirements for the AIM104-CAN software are the same as for the
general AIM104 libraries. The setup program installs the following directory
organisation for the CAN software:
In order to correctly access the header files and libraries, you will need to either move
them to your development directories or configure your compiler/linker so that the
necessary files can be ‘seen’. Refer to your compiler documentation for information
about how to do this.
Full documentation
An electronic copy of this AIM104-CAN Technical Manual is provided in the ‘DOC’
folder of the above directory structure. You can view the manual on screen or print off a
copy for reference.
AIM104-CAN Technical Manual Appendix B – Software library
© 2007 Eurotech Ltd Issue E 19
ArCan library functions
Data types
The ArCan software uses a number of elemental data types as follows:
Data type Description
UINT8 Unsigned 8-bit integer.
UINT16 Unsigned 16-bit integer.
UINT 32 Unsigned 32-bit integer.
SINT8 Signed 8-bit integer.
SINT16 Signed 16-bit integer.
SINT32 Signed 32-bit integer.
CAN A data structure used as a ‘handle’ once CAN communications
are initialised.
CAN_MSG A data structure that embodies both the CAN identifier, message
size, and data.
Initialisation routines
Before the CAN hardware can be used you need to initialise the module and obtain a
handle to the channel.
To Initialise a CAN channel and return a handle, use:
CAN far *can_open(UINT16 ioaddr, SINT16 irqnum, UINT16 bufsiz, UINT32 baud)
To clear the CAN hardware and free all resources, use:
void can_close(CAN far *can)
Communication routines
Use the communication routines to effect communications on the CAN bus.
To transmit a message on the bus through the ring buffers, use:
SINT16 can_send(CAN far *can, CAN_MSG far *msg)
To get a message from the receive ring buffer, use:
SINT16 can_fetch(CAN far *can, CAN_MSG far *msg)
AIM104-CAN Technical Manual Appendix B – Software library
© 2007 Eurotech Ltd Issue E 20
Status routines
Use the status routines to determine the operating status of the CAN channel.
To determine if the transmit buffer is able to accept a message, use:
SINT16 can_tx_ready(CAN far *CAN)
To determine whether or not the receive buffer contains a message, use:
SINT16 can_rx_ready(CAN far *can)
To check the error status on the CAN channel, use:
SINT16 can_error(CAN far *can)
Error recovery
Use the error recovery routines to detect and process error conditions on the CAN
interface.
To clear the error flags on the CAN channel, use:
void can_clear_errors(CAN far *can)
To abort the current transmission on the CAN controller, use:
void can_txabort(CAN far *can)
Message identifier filtering
Use the message identifier filtering routine to configure the hardware and software
acceptance filters and user supplied function. To do this, use:
void can_set_filter(CAN far *CAN, UINT16 uFnum, UINT16 uAcceptCode,
UINT16 uAcceptMask, SINT16 (far *FilterFn)(CAN far *, UINT16))
ISR hooks
You can use a number of other hooks into the Interrupt Service Routine.
To install a user function that is called upon successful transmission of a message,
use:
void can_set_txcallback(CAN far *can, void (far *TxCallBackFn)(CAN far *,
UINT16))
To install a user function that is called when received messages are placed in the
buffer, use:
void can_set_rxinform(CAN far *can, void (far *RxInformFn)(CAN far *,
UINT16))
To install a user function to handle changes in the error state, use:
void_can_set_error(CAN far *can, void (far *ErrorFn) (CAN far *, UINT16))
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23

Eurotech AIM104-CAN Owner's manual

Type
Owner's manual

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI