Home
AT -CAN-MINI User Manual
Contents
1. The soft and hardware designations used are mostly registered and are subject to copy right We are thankful for hints of possible errors and may ask around for an information We will go all the way to verify such hints fastest Copyright 2002 port GmbH Regensburger Stra e 7c D 06132 Halle Tel 49 345 777 55 0 Fax 49 345 777 55 20 E Mail service port de Internet http www port de Page 2 of 13 AT CAN MINI User Manual Version 1 2 Status Rel pert Table of Contents 1 Technical Data 2 Hardware 2 1 Addressing 2 2 CAN Controller 2 3 Address data multiplexor 2 4 Connection to the Bus 2 5 Optical isolation 2 6 CAN driver 2 7 Interrupt 3 Software 3 1 Introduction 3 1 1 Data types and structures 3 2 Content of disk 4 Appendix 4 1 Example canrec c 4 2 Example cansend c YVO o O0 I N AO an Ff e e e e Fe e S N D AT CAN MINI User Manual Version 1 2 Status Rel Page 3 of 13 pert 1 Technical Data AT CAN MINI provides a CAN network interface for PC AT compatible computers It is designed as a short PC slot card with dimensions 100mm x 150mm PC interface is a ISA direct connector The CAN network connection is made by an SUB D 9male and SUB D 9female connector physically it is designed according to ISO DIS 11898 and the recommendations of CiA CAN in Automation e V After plug in the card into the PC slot the CAN connectors a
2. e and allocates one byte in memory Page 10 of 13 AT CAN MINI User Manual Version 1 2 Status Rel pert telegramm is a structure containing all necessary informations for a CAN message message is the CAN identifier from or to other CAN nodes 11 Bit in a bit field rtr identifier for an Remote Transmit Request RTR 1 Bit in a bit field count number of bytes to send or received 4 Bit in a bit field daten With CAN up to 8 bytes can be transfered The message data are stored in an 8 byte array of unsigned char 3 2 Content of disk With the provided disk are the following files File Description can_util h Header file for CAN functions can_util lib library file canrec c example 1 cansend c example 2 readme notes for using examples Table 6 content of supplied disk AT CAN MINI User Manual Version 1 2 Status Rel Page 11 of 13 pert 4 Appendix 4 1 Example canrec c The example waits for an incoming CAN message and displays the contents of the mes sage It runs until the user hits one key More notes to the example are in the file readme include lt stdio h gt include lt dos h gt include lt bios h gt include can_util h define OFF 0 define ON 1 define MODI 1 Modul Nr 1 define MOD2 2 Modul Nr 2 BYTE busO 0x89 Bustiming Register 0 BYTE busl OxEB Bustiming Register 1 BYTE mask OxFF Maskenregister BYTE acc OxFF
3. 0 BYTE busl OxEB Bustiming Register 1 BYTE mask OxFF Maskregister BYTE acc OxFF Acceptanzregister int port_adr 0x280 Adresse I O Port int modul MOD1 Modulnummer main int argc char argv can_telegramm tx int zi int schalter OFF Sendestruktur beschreiben _ tx message atoi argv 1 tx count atoi argv 2 strcpy tx daten argv 3 CAN Controller initialisieren _ _ 7 CAN_PortInit port_adr modul bus0 bus1l CAN_PortMask port_adr modul mask acc periodisch senden nnn nnn nnn nnn nnn nn nnn nnn 7 while schalter OFF while CAN_PortTx port_adr modul amp tx amp amp schalter OFF delay 1 z if z gt 5000 printf warte0 z 0 if bioskey 1 schalter ON AT CAN MINI User Manual Version 1 2 Status Rel Page 13 of 13
4. Akzeptanzregister int port_adr 0x280 Adresse I O Port int modul MOD1 Modulnummer main can_telegramm rx Empfangsstruktur int z Durchlaufz hler int i Zahlvariable int schalter OFF CAN Controller initialisieren Re rf CAN_PortInit port_adr MOD1 bus0 busl CAN_PortMask port_adr MOD1 mask acc periodisch empfangen while schalter OFF while CAN_PortRx port_adr modul amp rx amp amp schalter OFF delay 1 z if z gt 5000 print f warte0 z 0 if bioskey 1 schalter ON if schalter OFF printf Message d0 rx message printf Count d0 rx count for i 0 i lt rx count i t printf Daten hex x0 rx daten i printf Daten char c0 rx daten i printf Daten dezimal d0 rx daten i Page 12 of 13 AT CAN MINI User Manual Version 1 2 Status Rel pert 4 2 Example cansend c The programm periodically sends a message Message data are entered over the com mand line It runs until the user hits one key More notes to the example are in the file readme include lt stdio h gt include lt dos h gt include lt bios h gt include lt stdlib h gt include lt string h gt include can_util h define OFF 0 define ON define MOD1 1 Modul Nr 1 define MOD2 2 Modul Nr 2 BYTE busO 0x89 Bustiming Register
5. A4 of the PC are used These lines must be multi plexed with data lines DO D7 Address data multiplexor is built by the circuit U6 unidirection address and US bidirec tional data Control signals DEN and AEN as also the correct timing are created by the PAL U8 AT CAN MINI User Manual Version 1 2 Status Rel Page 7 of 13 pert 2 4 Connection to the Bus The physical connection to the CAN bus is realized by two parallel connected SUB D 9 connectors according to DIN 41652 Pin Signal Description 1 reserved 2 CAN_L CAN_L dominant low 3 GND ground 4 reserved 5 reserved 6 GND ground optional 7 CAN_H CAN_H dominant high 8 reserved error line 9 V external power supply 7V 13V optional Table 3 pin assignment for the SUB D 9 CAN The two connectors make it possible to grind the bus through the AT CAN MINI 2 5 Optical isolation Optical isolation is provided by the coupler U2 for transmitting and U1 for receiving Galvanical isolation between the 5 V Power Supply and the CAN driver circuit with opto coupler U2 is done with the DC DC converter W1 If this is not necessary following changes has to be made components U1 U2 and W1 do not mount soldering bridges BR1 BR2 BR3 and BR4 close If the board is already assigned with U1 U2 and W1 then the soldering bridges BR2 BR3 and BR4 are not accessible in order to protect the components If a gal
6. Address Data Interrupt Decode K Driver K Logic AT ISA 8 Bus Figure 2 AT CAN MINI schematic 2 1 Addressing AT CAN MINI uses an 32 byte address window in the I O address space of the PC In this area the controllers register are mapped Begin address of this I O area is located between 200h and 3E0h With jumper JP3 it can be freely assigned in steps of 32 byte 20h Page 6 of 13 AT CAN MINI User Manual Version 1 2 Status Rel pert 1 2 54 a a 7 o0 Adresse 200h 220h 240h 260h 280h 2A0h 2COh 2E0h 300h 320h 340h 360h I I 380h I 3A0h I 3COh 3E0h eme EE EE Table 2 I O address jumpering with JP3 Legend I jumper applied 2 2 CAN Controller As CAN controller the Philips Basic CAN SJA1000 clocked with 16 MHz is used The clock is generated at board Together with the CAN driver circuit SJA1000 bit rates up to 1 MBaud are possible The controller is used in the Intel Mode Signals are driven from a PAL 22V10 By using a CAN controller which handles all layer 2 protocol the user only has to provide data in the transmit buffer The controller then transmits the message automatically Also receiving is done automatically Received messages must only be read from the registers 2 3 Address data multiplexor The used CAN controller SJA1000 has an shared data address bus To use the 32 regis ters of the SJA1000 address lines AO
7. ntion Only one jumper must be applied AT CAN MINI User Manual Version 1 2 Status Rel Page 9 of 13 pert 3 Software 3 1 Introduction The CAN controller with the AT CAN MINT is driven in I O mode That means that com municating with the board is done by 32 addresses in the PC s I O address range Port GmbH provides with the C library can_util lib some functions to easy access the CAN controller Following functions are delivered Function Short description CAN_PortInitQ initialization of the CAN controller CAN_PortMask programming acceptance and mask registers CAN_PortStatus read controller status CAN_PortTxRdy check transmit readiness CAN_PortRxRdy check receive readiness CAN_PortTx send message CAN_PortRx read message CAN_PortIRQ_EQ enable interrupts CAN_PortIRQ_DQO disable interrupts CAN_PortIRQRead read interrupt register Module number To be able to use the library also with boards with more then one CAN controller a mod ule number is provided with all calls to functions Because AT CAN MINI has only one controller Module number is always 1 Following conventions are used TRUE 1 FALSE 0 The provided examples only should show how to use the library functions Therefore no sanity checks are within it 3 1 1 Data types and structures Some of the functions get or deliver data types BYTE It is declared as typedef unsigned char BYTE
8. pert AT CAN MINI User Manual TETTE ATTA La CELLES LIA r WIE DA sl La Le C LLIELTLNE port GmbH Halle 31 07 1999 pert Disclaimer All rights reserved The programs boards and documentations supplied by port GmbH are created with due diligence checked carefully and tested on several applications Nevertheless port GmbH can not take over no guarantee and no assume del credere lia bility that the program the hardware board and the documentation are error free respec tive are suitable to serve the special purpose In particular performance characteristics and technical data given in this document may not be constituted to be guaranteed product features in any legal sense For consequential damages which are emerged on the strength of use the program and the hardware boards therefore every legal responsibility or liability is excluded port has the right to modify the products described or their documentation at any time without prior warning as long as these changes are made for reasons of reliability or technical improvement All rights of this documentation lie with port The transfer of rights to third parties or duplication of this document in any form whole or in part is subject to written approval by port Copies of this document may however be made exclusively for the use of the user and his engineers The user is thereby responsible that third parties do not obtain access to these copies
9. re available at the PC s backboard The CAN interface is optically isolated against the PC voltage level AT CAN MINI occupies 32 addresses in the PC s I O address space The starting address is selectable by jumpers The CAN controller can generate interrupts at the PC bus The interrupt number is also selectable by jumpers As CAN controller the BASIC CAN SJA1000 by Philips is used Port GmbH provides C library functions for simple functions to program the controller The library is foreseen and tested with the following compilers BORLAND C 2 0 and BORLAND TURBO C 2 01 PC Interface ISA direct board connector CAN Interface 2 x SUB D 9 according ISO DIS 11898 and CiA rec ommendation CAN Controller SJA1000 CAN driver SJA1000 or S19200 address area 32 byte between 200h 3E0h Interrupts IRQ3 IRQ7 selected by jumper Dimension 100mm x 150mm Table 1 technical data overview Page 4 of 13 AT CAN MINI User Manual Version 1 2 Status Rel BRI Wi nn porns BR2 1 an 1 7 U4 120 Ohm BR4 an BR3 an ns ADR INT 1 35 7 m 1 3la s s 7 E E 2 2 P3 D 2468 2 BR5 N CIE D SE a Figure 1 jumpers and soldering bridges AT CAN MINI User Manual Version 1 2 Status Rel Page 5 of 13 pert 2 Hardware Following is an overview schematic of the board CANbus Opto Barrier and Driver Basic CAN
10. vanic connection is desired and the components already mounted the soldering bridge BR1 must be closed The slot plate with mounted DSUB connectors is normally connected with ground of the PC by bridge BRS Within industrial PC s with no connection between housing and pro cessor ground the bridge must be disrupted 2 6 CAN driver As a CAN driver the PCA82C250T or SI9200 can electively be used Both are pin com patible Driver and opto coupler build a CAN interface according to ISO DIS 11898 If the SI9200 is used the resistor R2 reducing the steepness of signal edges with PCA82C250T is not necessary Steepness is proportional to the used resistor Page 8 of 13 AT CAN MINI User Manual Version 1 2 Status Rel pert Following relations are valid value R2 result 0 PIN 8 at GND highest steepness open standby modus 10kOhm 100kOhm slope control Table 4 influence of steepness Formula calculation of edge steepness tome 3 1077 36 Vins slope Standard resistor with 10 KOhm yields in a steepness of 30V us 2 7 Interrupt To achieve the capability to generate interrupts from the CAN channel one of the inter rupt lines must selected with the INT jumper JP1 It can be selected from the lines IRQ3 to IRQ7 IRQS is preferred 1 2 3 4 5 6 7 8 9 10 IRQ I IRQ3 I IRQ4 I IRQS I IRQ6 I IRQ7 Table 5 interrupt jumpering with JP1 I jumper applied Atte
Download Pdf Manuals
Related Search
Related Contents
Emerson 396R Stud Sensor User Manual Bedienungsanleitung PeakTech_2005 Canon SD1100 Use and Restrictions Infotainment Navigazione Amundsen Istruzioni per l`uso Copyright © All rights reserved.
Failed to retrieve file