Kaskod CANPC527D User manual

CANPC527D Isolated 1 Mb/s
Full CAN Interface Board
User,s Manual
KASKOD
1999
Sankt-Peteterburg

189625, S-Petrsburg, Pavlovsk,
Filtrovskoy road, 3
tel.: (812) 466-5784, 476-0795
Fax: (812) 465-3519
http://www.kaskod.ru

ÊÀÑÊÎÄ
3
CANPC527D
INTRODUCTION 2
CANbuscontroller 2
Physicalinterface 2
Mechanicaldescription 2
Connectordescription 2
Terminalresistors 3
Whatcomeswithyourboard 3
Boardaccessories 3
CHAPTER 1 - BOARD SETTINGS 4
Baseaddressjumpers 5
Interruptrequestnumber 5
CHAPTER 2 - BOARD INSTALLATION 6
Boardinstallation 6
CHAPTER 3 - HARDWARE DESCRIPTION 7
CANPC527DCAN bus controller 7
GalvanicisolationoftheCANbus 8
CHAPTER 4 - BOARD OPERATION AND PROGRAMMING 9
Definingthememorymap 9
Interrupts 9
Whatisaninterrupt 9
Interruptrequestlines 9
8259Programmableinterruptcontroller 9
Interruptmask register (IMR) 9
End-Of-Interrupt(EOI) Command 10
Whatexactly happens when aninterruptoccurs? 10
Usinginterruptinyourprogram 10
Writinganinterruptserviceroutine(ISR) 10
Savingthe startup IMR andinterruptvector 12
CommonInterruptmistakes 12
APPENDIX A - CANPC527D Specification 14
APPENDIX B. What is CAN Interface? 15
APPENDIX C. Architectural Overlview 26
Table of Contents Page

ÊÀÑÊÎÄ 4
CANPC527D
Thisuser‘smanualdescribes the operation of the CANPC527DCan-businterfaceboard.
Someof the key properties ofthe CANPC527D include:
l1Mb/s maximum datarate (fullyprogrammable)
lFullCAN-functionally2.0B
lIntel 82527 CAN-bus controller
lGalvanicallyisolated physicalinterfacewithCAN transceiver
l+5V only operation
The following paragraphs briefly describe the major features of the CANPC527D. A more de-
tailed discussion is included in Chapter 3 (Hardware description) and in Chapter 4(Boad opera-
tion and programming). The boad set-up is described in Chapter 1 (Board Setting). A full descrip-
tion of the Intel 82527 CAN-controller is included in Chapter 4.
CAN-bus controller
The CANPC527D CAN-bus interface is implemented using the Intel 82527 chip. This controller
supports CAN Specification 2.0B. This versatile chip supports standard and extended Data and
remote frames as follows: A Programmable Global Message Identifier Mask; 15 message objects of
8-byteData Length and aProgrammableBitRate.Thisfully integrated chip supportsallthefunctinality
of the CAN-bus protocol.
Physical Interface
Industrialenvironmentsrequiregalvanicisolationandbusfilteringtoprovidereliabledata
communication and safety. CANPC527D has option for the physical interface.
Thegalvanicallyisolatedphysicalinterfaceis implementedusinghighspeedoptocouplersanda
DC/DCconverter. To protect the inputfromradiatedbusnoisea special balanced bus filter is
used.This filterisdesignedto meetEMIrequirements.
Mechanical description
TheCANPC527D is designed ona ISA form factor. An easymechanical interface to bothPC/104 and
EUROCARDsystems canbeachieved.PUTyour CANPC527Ddirectlyona ISA compatiblecomputer
usingtheonboardmountingholes.
Connector description
Fortheswitching ontwo identical connectors are used P1(channel1)and P2 (channel 2).
Pinoutisasfollows:
TABLE 1-1
contact signal
1nc
2 BUS_L
3 GND
4nc
5nc
6nc
7 BUS_H
8nc
9 VCC
INTRODUCTION

ÊÀÑÊÎÄ
5
CANPC527D
Explanation:
nc – notconnected (maybeused anyhow)
BUS_L – busactive low ( relatevelyGND)
BUS_H – busactivehigh(relatevelyGND)
GND – maybenot used
VCC – powersupply voltage +5V (inthisversionisnotused)
Terminal Resistors
CAN Standard implies terminal resistors at the end-nodes of the net. If in your specific configuration
channel1istheend-node,then setting of J2 is needed, if itischannel2thenJ3.
What commes with your board
Youwillreceivethe followingitemsinyoue CANPC527Dpackage:
lCANPC527DCAN-bus interface module
lSoftwarediskette with C sourcecode for CAN businterfacing for DOS
lUser‘smanual
Board accessories
Inaddition to the itemsincludedinyourCANPC527Ddelivery, severalsoftwareandhardwareaccesso-
riesareavailable.Callyour distributorformoreinformationontheseaccessories andforhelp inchoosing
thebestitemstosupportyourdistributedcontrolsystem.
lApplicationsoftware
Thirdpartyhighlevelprotocoldrivers
WIN 95/98 and WIN NT drivers and driver source code

ÊÀÑÊÎÄ 6
CANPC527D
The CANPC527D CAN bus interface board has jumper settings which can be changed to
suit your applicacation and host computer memory configuration. The factory setting are
listed and shown in the diagram in the beginning of this chapter.
Fig.1
CANPC527D contains 2 identical optoisolated CAN 2.0B specification channels. First chan-
nel registers begin from base address, the second - base address+100h. Each channel can
generate its interrupt request with its interrupt vector, or both channels can use one vector.
In this case interrupt request program must process both chanels simultaneously.
CHAPTER 1 - BOARD SETTING

ÊÀÑÊÎÄ
7
CANPC527D
Base Address Jumpers
Forbase address settingJ2is used.
J2consistsof11sections, and each section is associated with itsaddressline.
Note: Section0 (connectors 1-2) isreserved for S version.
Sectionsarearrangedasfollowing:
TABLE 1-2
Section 0 (connectors 1-2) reserved
Section 1 (connectors 3-4) A9
Section 2 (connectors 5-6 A10
Section 3 (connectors 7-8 A11
Section 4 (connectors 9-10) A12
Section 5 (connectors 11-12) A13
Section 6 (connectors 13-14) A14
Section 7 (connectors 15-16) A15
Section 8 (connectors 17-18) A16
Section 9 (connectors 19-20) A17
Section 10 (connectors 21-22) A18
Thusbaseaddresspossiblerangesettingis:080000h-0FFE00h.
Explanation: BoardstartsworkingwhenaddresslinesignalA19issethigh.Connectioncorresponds
tohighlevel.
Examples:
To set base address 0C8000h - connect 21 and 22 in Section10, 15 and 16 in Section 7
(FACTORY SETTING).
To set base address 0D1E00h -
connect21 and 22 in Section 10, 17 and 18 in Section 8
connect 1 and 2 in Section 1 3 and 4 in Section 2
connect 5 and 6 in Section 3, 7 and 8 in Section 4
Interrupt request number setting
J4,J5 is usedfortheselection of interrupt request.
J4,J5 consists of 11 sections.
Followininterruptsareavailable
Channel number J4 J5
resistorinsert 1-2 1-2
15 3-4 3-4
14 5-6 5-6
12 7-8 7-8
11 9-10 9-10
10 11-12 11-12
7 13-14 13-14
6 15-16 15-16
5 17-18 17-18
4 19-20 19-20
3 21-22 21-22
Othersetting ofjumpersswitchoffthe interruptrequests.

ÊÀÑÊÎÄ 8
CANPC527D
BoardInstallation
Keepyourboardinitsantistatic baguntilyouarereadytoinstallittoyoursystem!When removingitfrom
thebag, hold the board at the edges anddo not touch the components or connectors. Pleasehandle the
boardinanantistaticenvironmentandusearoundedworkbenchfortestingandhandlingofyourhardware.
Before installing the board in your computer, check the jumper setting. Chapter 1 reviews the
factory settings and how to change them. If you need to change any setting, refer to the appropri-
ate instructions in Chapter 1. Note that incompatible jumper settings can result in unpredictable
board operation and erratic response.
Generalinstallationguidelines:
1.Turn OFFthe power to your computer and all devicesconnected to CANPC527D
2.Touch thegroundedmetalhousingof your computertodischargeanyantistaticbuildupand
thenremovethe board from its antistatic bag.
3.Holdtheboard by the edge and installitinan enclosure or place it onthetableon an antistatic
surface.
4.Connectthe board to theCAN fieldbus interface header connectors.Make sure the polarity of
thecableis correct. Both connectorsare identical, one of theseheaders may be used tobring the
CANbustotheonechannel; the other connector interfaces for second channel.
CHAPTER 2 - BOARD INSTALLATION

ÊÀÑÊÎÄ
9
CANPC527D
Chapter 3 - Hardware discription describes the major features of the CANPC527D: the Intel 82527
CANbus controller, Galvanic isolationoftheCAN-bus.
Figure 3-1 shows the general block diagram of the CANPC527D. This chapteer describes the major
featuresoftheCANPC527D: the Intel 82527 CAN-bus controller,Galvanicisolationof the CAN-bus,
theFiberoptic interface, theOnboardconfigurationEEPROM,and Digital I/O.
Fig. 3-1. CANPC527D Block diagram
82527 CAN bus controller
Reference note:
(Intelpublication CAN ArchitecturalOverview, AutomotiveProductsDatabook)
The 82527 CAN controller consists of six functional block. The CPU interface logic manages the
communicationtothe host computer. The CAN controller interfacetotheCANbusandimplementsthe
protocol rules of the CAN protocol for the transmission and reception of messages. The RAM is the
physicalinterfacelayerbetween the host CPU and theCANbus.One eight bit I/O port provideslow
speedI/Ocapabilities.
The82527 RAM providesstorage for 15message objects of8 byte length.Each message objecthas a
uniqueidentifier and canbe configuredtoeithertransmitof to receiveexceptforthelast message object.
Thelastmessage object is areceive-only buffer with a specialmask design to allow selectedgroups of
differentmessageidentifierstobereceived.
Eachmessage identifiercontainscontrolandstatus bits.Amessageobject with adirectionsetfor receive
willsendaremoteframebyrequestingamessagetransmission.Amessagesetastransmitwillbeconfigured
toautomaticallysendadataframewheneveraremoteframewithamatchingidentifierisreceivedoverthe
CANbus.Allmessageobjectshaveseparatetransmitandreceiveinterrupt and status bits, allowing the
CPUfull flexibilityindetectingwhen aremoteframehas beensentorreceived.
CHAPTER 3 - HARDWARE DESCRIPTION

ÊÀÑÊÎÄ 10
CANPC527D
The82527alsoimplementsa globalmaskingfeatureforacceptancefiltering.This featureallowsthe user
togloballymask,or “don`tcare”,anyidentifierbitsof theincomingmessage.Thismaskisprogrammable
toallowtheusertodesignanapplicationspecificmessageidentificationstrategy.Thereareseparateglobal
maskforstandardandextendedframes.
Theincomingmessagefirstpassesthroughtheglobalmaskandismatchedtotheidentifiersinthemessage
objects1-14. If there isno identifier match thenthe message passes throughthe local mask inmessage
object 15. the local mask allows a large number of infrequent messages to be received by the 82527.
Message object15 is also bufferedto allow theCPU time to servicea message received.
Galvanic isolation of the CAN-bus
Thegalvanicisolationof theCANPC527Disimplementedusing
1)Optocouplersfor data transmission and
2)aDC/DCconverter to supply power to theCANbusand the physical interface circuitry.
The high speed optocouplers are directly connected to the 82527. the optocouplers drive CAN bus
transceiver. A special balancedCAN bus choke is usednot only toimprove immunity to busnoise, but
alsotoprotectthebustransceiver. This filter assists in conforming to the EN5502 Radiated Emision test
requirements.

ÊÀÑÊÎÄ
11
CANPC527D
This chapter shows you how to program and use your CANPC527D. It provides a complete detailed
description ofthe memory map anda detailed discussion ofprogramming operations toaid you inpro-
gramming.ThefullfunctionalityoftheCANPC527DisdescribedinthedatasheetreprintfromIntelonthe
82527CANcontroller chip.
Defining the Memory Map
ThememorymapoftheCANPC527Doccupies512bytesofhostPClowmemoryspace.Thiswindow
is freely selectableby the user as described inChapter 1 (table 1-2). Aftersetting the base address you
have access to the internal resources of the 82527 CAN controller chip, as is described in the next
sectionsreprinted from theIntel82527manual.
Interrupts
- What is an interrupt?
Aninterrupt is an eventthatcausestheprocessorin your computer totemporerilyhaltitscurrentprocess
andexecuteanotherroutine.Uponcompletionofthenewroutine,controlisreturnedtotheoriginalroutine
atthe point where itsexecutionwas interrupted.
Interruptsareaveryflexiblewayofdealingwithasynchronousevents.Keyboardactivityisgoodexample;
yourcomputer cannotpredictwhenyou mightpressakey anditwouldbe awasteofprocessor timetodo
nothing while waiting for a keystroke to occur. Thus the interrupt scheme is used and the processor
proceedswithothertasks.When a keystroke occurs, the keyboard“interrupt”theprocessor,theproces-
sorthengets the keyboard data which is then placed into the memory. It then returns towhatitwasdoing
beforethe interruptoccurred.Othercommon devicesthatuseinterrupts areNetworkboards,A/D boards,
serialportsetc.
YourCANPC527D can interrupt the main processor whenamessageisreceivedortransmittedifinter-
ruptsareenabledon the CANPC527D board. By usinginterruptsyoucan write powerful code to inter-
faceto your CANnetwork.
- Interrupt request lines
To allow different peripheral devices to generate interrupts on the same computer, the PC AT bus has
interruptrequestchannels(IRQ‘s).Arisingedgetransitionon one of these lines will be latchedintothe
interruptcontroller. Theinterruptcontrollerchecks to see if the interruptsaretobe acknowledged from
that IRQ and,if another interruptis being processed, itdecides if the newrequest should supercede the
one in progressor if it has towait until the one in progressis done. The priority levelof the interrupt is
determined by the number of the IRQ; IRQ0 has the highest priority IRQ15 the lowest. Many of the
IRQ‘s are used by the standard system resources. IRQ0 is dedicated for the internal timer, IRQ1 is
dedicated to the keyboard input, IRQ3 for serial port COM2 and IRQ4 for serial port COM1. Often
interrupt5 and 7 arefree for the user.
- 8259 Programmable Interrupt Controller
ThechipresponsibleforhandlinginterruptrequestsinPCisthe 8259 Interrupt Controller. Touseinter-
rupts you will needto know how to read andset the 8259‘s internal interrupt maskregister (IMR) and
howtosendtheend-interrupt(EOI)commandtoacknowledgethe8259interruptcontroller.
CHAPTER 4 - BOARD OPERATION AND PROGRAMMING

ÊÀÑÊÎÄ 12
CANPC527D
-InterruptMaskRegister(IMR)
Eachbitin the interrupt maskregister (IMR) contains the maskstatus of the interrupt line.If a bit isset
(equalto 1), then the correspondingIRQismasked,and it willnotgenerateaninterrupt. If abitiscleared
(equalto 0), thenthecorrespondingIRQis not masked,anditcanthen generate aninterrupt.theinterrupt
maskregister isprogrammedthroughport21h.
-End-of-Interrupt(EOI)Command
Afteran interrupt service routine is complete, the8259 Interrupt Controller must be acknowledged by
writingthevalue 20htoport 20h.
- What exactly happens when an interrupt occurs?
Understanding the sequence of events when an interrupt is triggered is necessary to correctly write
interrupt handlers. When an interrupt request line is driven high by a peripheral device (such as the
CANPC527D), the interrupt controller checks to see if interrupts are enabled for that IRQ, and then
checks to see if other interrupts are active or requested and determines which interrupt has priority.
The interrupt controller then interrupts the processor. The current code segment (CS), instruction
pointer (IP), and flags are pushed onto the system stack., and a new set of CS and IP are loaded
from the lowest 1024 bytes of memory.
Thistableisreferredtoastheinterruptvectortableandeachentrytothistableiscalledaninterruptvector.
Oncethe new CS andIP are loaded fromthe interrupt vector table,the processor starts toexecute code
fromthenewCodeSegment (CS)andfromthenewInstructionPointer (IP).Whenthe interruptroutineis
completed the old CS and IP are popped from the system stack and the program execution continues
fromthe point itwasinterrupted.
- Using Interrupt in your Program
Addinginterruptsupportto yourprogramisnotasdifficultasit mayseem,especiallywhenprogramming
underDOS. The following discussion will coverprogrammingunderDOS.Note,thateventhe smallest
mistakein your interruptprogrammaycausethe computer tohangupandwill only restartafterareboot.
Thiscanbefrustratingandtime-consuming.
- Writing an Interrupt Service Routine (ISR)
The first step in adding interrupts to your software is to write an interrupt service routine (ISR). This
is the routine that will be executed automatically each time an interrupt request occurs for the speci-
fied IRQ. An ISR is different from other subroutines or procedures. First, on entrance the processor
registers must be pushed onto the stack before anything else! Second, just before exiting the routine,
you must clear the interrupt on the CANPC527D by writinf to the 82527 CAN controller, and write
the EOI command to the interrupt controller. Finally, when exiting the interrupt routine the processor
registersmust be popped from the system stack andyou must execute the IRET assembly instruction.
This instruction pops the CS, IP and processor flags from the system stack. These were pushed onto
the stack when entering the ISR.
Most compilers allow you to identify a function as an interrupt type and will automatically add these
instructionsto your ISRwithoneexception:most compilers donotautomaticallyaddthe EOI command
tothe function, you mustdo it yourself. Otherthan this and afew exceptions discussed below, you can
writeyourISRasanycoderoutine.Itcancallotherfunctionsandproceduresinyourprogramanditcan
accessglobaldata.Ifyouare writtingyourfirstISR,werecommendyousticktothebasics;just something
thatenables you toveifyyouhaveentered the ISRandexecuteditsuccessfully. Forexample:setaflag in
yourISR and inyourmain program check for the flag.
Note: IfyouchoosetowriteyourISRinin-lineAssembly,youmustpushandpopregisters
correctly,andexittheroutinewiththeIRETinstructioninsteadoftheRETinstruction.

ÊÀÑÊÎÄ
13
CANPC527D
Thereareafewprecautions youmustconsiderwhenwritingISR`s.The mostimportantis, donotuseany
DOSfunctionsorfunctionsthatcallDOSfunctionsfromaninterruptroutine.DOSisnotreentrant;that is,
aDOSfunctioncannot callitself.Intypicalprogramming,thiswillnot happenbecauseofthewayDOSis
written.Butwhataboutusinginterrupts?Then,youcouldhavethesituationnsuchasthisinyourprogram.
IfDOSfunctionXis beingexecutedwhenaninterruptoccursand theinterruptroutine makesacallto the
DOSfunctionX,thenfunctionXisessentiallybeingcalledwhileactive.Suchcaseswillcausethecomputer
tocrash.DOSdoesnotsupport such opperation. A general rule is, thatdonotcallanyfunctions that use
thescreen,read keyboard input and anyfileI/O routines should not beusedin ISR‘s.
Thesame problem of reentrancyexists for many floatingpoint emulators as well,meaning you should
avoidfloatingpointmathematicalopperations inyourISR.
Note,that the problemofreentrancyexists,nomatter what programming languageyouuse.
Even,ifyouare writingyourISRinAssemblylanguage,DOSand manyfloatingpointemulators
arenotreentrant.Ofcouse,therearewaytoavoidthis problem, such asthosewhichinvolve
checkingif anyDOSfunctionsarecurrently activewhenyourISR is called,butsuchsolutions are
beyondthe scope of thismanual.
ThesecondmajorconcernwhenwritingISR‘sistomakethemasshortaspossibleintermofexecution
time. Spendinglong times in interrupt serviceroutines may meanthat other importantinterrupt are not
serviced.Also, ifyouspendtoolong inyourISR,it maybecalled againbeforeyouhave exited. Thiswill
leadto your computer hanging up andwillrequireareboot.
YourISRshouldhavethefollowingstructure:
lPushanyprocesorregistersusedinyourISR.MostCcompilerdothisautomatically
lPutthebody of your routine here
lReadinterrupt status register of the 82527 chipon your CANPC527D board
lCleartheinterruptbitbywriting to the 82527 CAN controller
lIssuethe EOI commandto the 8259by writing 20hto address 20h
lPopall registers. Most C compilers dothisautomatically
Thefollowing Cexampleshowswhat theshellofyour ISRshouldbelike:
/*-----------------------------------------------------------------------------------
| Function: new_IRQ_handler
| Inputs: Nothing
| Returns: Nothing _Sets the interrupt flag for the EVENT.
\-------------------------------------------------------------------------------------*/
void interrupt far new_IRQ_handler(void)
{
IRQ_flag = 1 // Indicate to main process interrupt has occurred
{
//Yourprogramcodeshouldbehere
}
//Readinterruptstatusregisters
//Clearinterrupt
outp(0x20,0x20); /*Acknowledgetheinterruptcontroller.*/
}

ÊÀÑÊÎÄ 14
CANPC527D
- Saving the Startup Interrupt Mask Register (IMR) and interrupt vector
The next step after writing the ISR is to save the startup state of the interrupt mask regis-
ter (IMR) and the original interrupt vector you are using. The IMR is located in address
21h. The interrupt vector you will be using is located in the interrupt vector table which is
an array of 4-byte pointers (addresses) and it is locate in the first 1024 bytes of the memory
(Segment 0 offset 0). You can read this value directly, but it is a better practice to use DOS
function 35h (get interrupt vector) to do this. Most C compilers have a special function
available for doing this. The vectors for the hardware interrupts on the XT-bus are vec-
tors 8-15., where IRQ0 uses vector 8 and IRQ7 uses vector 15. Thus if your CANPC527D
is using IRQ5 it corresponds to vector number 13.
Before you install your ISR, temporerily mask out the IRQ you will be using. This
prevents the IRQ from requesting an interrupt while you are installing and initializing
your ISR. To mask the IRQ, read the current IMR at I/O port 21h, and set the bit that
corresponds to tout IRQ. the IMR is arranged so that bit 0 is for IRQ0 and bit 7 for
IRQ7. See the paragraph entitled Interrupt Mask Register (IMR) earlier in this dis-
cussion for help in determining your IRQ‘s bit. After setting the bit, write the new
value to I/O port 21h.
with the startup IMR saved and the interrupts temporarily disabled, you can assing the interrupt
vector to point to your ISR. Again you can overwrite the appropriate entry in the vector table with
a direct memory write, but this is not recommended. Instead use the DOS function 25h (Set Inter-
rupt Vector) or, if your compiler provides it, the library routine for setting up interrupt vectors.
Remember, that interrupt vector 8 corresponds to IRQ0, vector 9 for IRQ1 etc.
Ifyou need to programthesourceofyourinterrupts, do that next.Forexample,ifyouare using transmit-
tedor received messages asan interrupt source, programit to do that.
Finally,clearthemask bit for your IRQ intheIMR.ThiswillenableyourIRQ.
- Common Interrupt mistakes
lRemember,hardware interrupt are from8-15, XT IRQ‘sare numbered 0-7

ÊÀÑÊÎÄ
15
CANPC527D
lForgettingtoclear the IRQ mask bitinthe IMR
lForgettingtosendtheEOIcommandafterISRcode.Disablesfurther interrupts.
Example on Interrupt vector table setup in C-code:
void far_interrupt new_IRQ1_handler(void); /* ISR function prototype */
#define IRQ1_VECTOR 3 /* Name for IRQ */
void (interrupt far*old_IRQ1_dispatcher)
(es,ds,di,si,bp,sp,bx,dx,cx,ax,ip,cs,flags); /* Variable to store old IRQ_Vecotr */
void far_interrupt new_IRQ1_handler(void);
/*-----------------------------------------------------------------------------------
| Function: init_irq_handlers
| Inputs: Nothing
| Returns: Nothing
| Purpose: Set the pointers in the interrupt table to point to
\ our functions ie. setup for ISR`s.
\-------------------------------------------------------------------------------------*/
void init_irq_handlers(void)
{
_disable();
old_IRQ1_handler = _dos_getvect(IRQ1_VECTOR + 8);
_dos_setvect(IRQ1_VECTOR + 8, new_IRQ1_handler);
Gi_old_mask = inp(0x21);
outp(0x21,Gi_old_mask & ~(1 << IRQ1_VECTOR));
_enable();
}
/*-----------------------------------------------------------------------------------
| Function: restore do this before exiting program
| Inputs: Nothing
| Returns: Nothing
| Purpose: Restore interrupt vector table
\-------------------------------------------------------------------------------------*/
void restore(void)
{
/* Restore the old vector */
_disable();
_dos_setvect(IRQ1_VECTOR + 8, new_IRQ1_handler);
outp(0x21,Gi_old_mask);
_enable();
}

ÊÀÑÊÎÄ 16
CANPC527D
APPENDIX A. CANPC527D Specifications
HostInterface
Memorymappedintolowmemory,occupies512bytes
Jumper-selectablebaseaddress, 11 jumpers
8-bit data bus, 16 bit ISA bus connector
CANInterface
– Galvanicallyisolated transceiverwith1Mb/s datarate
– Timingparametersandspeed ofbusprogrammable
– BalancedCAN-buschokeforlowEMIemissions
– Jumperselectable 120 Ohm onboard termination resistor
Connectors
GalvanicallyisolatedCANbus ISO111898compliant
Electrical
Operatingtemperature range -40oC to +70oC (option)
Supplyvoltage +5Vonly
Powerconsuption 125 mA

ÊÀÑÊÎÄ
17
CANPC527D
APPENDIX B. WHAT IS CAN INTERFACE?
Overview
TheControllerAreaNetwork(theCANbus)isaserialdatacommunicationsbusforreal-timeapplications.
CANoperates at data rates of upto1Megabitspersecondandhas excellent error detection and confine-
mentcapabilities.
CAN was originally developed by the German company Robert Bosch for use in the car industry to
providea cost-effective communicationsbusforin-carelectronics and asasalternativetoexpensive and
cumbersomewiringlooms.
Now,becauseofitsprovenreliabilityandrobustness,CANisbeingusedinmanyotherautomationand
industrialapplications.
CANis nowaninternationalstandard andisdocumentedin ISO11898(forhigh-speed applications)and
ISO11519(for lower-speed applications).
[IntheUK-Ifyouwanttobuycopiesof the ISO standards - contact the British Standards Organisation
on 0181 996-7000, or on 01908 221166.]
Low-costCANcontrollers and interface devices areavailableas off-the-shelf parts from severalofthe
leadingsemiconductormanufacturers.Custombuiltdevicesandpopularmicrocontrollerswithembedded
CANcontrollersare also available.
TherearemanyCAN-relatedsystemdevelopmentpackages.Hardwareinterfacecardsand easy-to-use
softwarepackagesprovidesystemdesigners,buildersandmaintainerswithawiderangeofdesign,moni-
toring,analysis, and testtools.
CAN in Cars
TheNeed
Tosatisfythecustomer’swishesforgreatersafety,comfort,andconvenience,andtocomplywithincreas-
inglystringentgovernmentrequirementsforimprovedpollutioncontrolandreducedfuelconsumption,the
carindustryhasdeveloped many electronic systems. Anti lockBrakingSystems,Engine Management
Systems,TractionControl,AirConditioningControl,central door locking, andpoweredseatandmirror
controlsare just some examples.
Thecomplexityofthesecontrolsystems,andtheneedtoexchange data between them meant that more
andmore hard-wired,dedicatedsignallines hadtobeprovided. Sensorshadtobe duplicatedifmeasured
parameters were needed by different controllers. Apart from the cost of the wiring looms needed to
connectallthesecomponentstogether,thephysicalsizeofthewiringloomssometimesmadeitimpossible
tothreadthemaroundthevehicle(tocontrolpanelsinthe doors, for example).
Inaddition to the cost,theincreasednumberofconnections posed serious reliability, faultdiagnosis,and
repairproblems duringbothmanufactureand inservice.
Anewsolutionwasneeded.

ÊÀÑÊÎÄ 18
CANPC527D
The Solution
TheRobertBoschcompany(ahighly regardedsupplierofcomponentsandsubsystemstotheautomotive
industry)providedtheanswerinthemid1980sbyspecifyingtheControllerAreaNetwork(CAN).
Boschdefined the protocol(subsequentlystandardisedinternationallyas ISO11898andISO11519)and
alsolicensedanumberofcompaniestoallowthedesignand manufacture of CAN-compliant semicon-
ductorcontrollersand other devices.
UsingtheCANprotocol,suchcontrollers,sensors,andactuatorscommunicatewith each other,inreal-
time,at speeds ofup to 1Megabitper second, overa two wireserial data bus.
Inaddition, CAN networks:
lArecosteffectivetodesignandimplement
l Will continue tooperateinharshenvironments
l Areeasytoconfigureandmodify
lAutomaticallydetect data transmission errors
lProvide an environment that enables the centralised diagnosis of faults – during design,
or in-service
Industrial Applications of CAN
CANcontrollersand interface chips arephysically small. They are availableas low-cost, off-the-shelf
components.They will operateathigh,real-timespeeds, and inharshenvironments.Allthese properties
haveledtoCANbeingusedinawiderangeof applications other than the car industry.
Thebenefitsofreducedcostand improved reliability that the car industry gainsbyusingCANarenow
availableto manufacturers of awiderangeofproducts.
Forexample:
Marinecontrolandnavigationsystems
Elevatorcontrolsystems
Agriculturalmachinery
Productionlinecontrolsystems
Machinetools
Largeoptical telescopes
Photocopiers
Medicalsystems
Papermakingandprocessing machinery
Packagingmachinery
Textileproductionmachinery
andeven toysforchildren
UsingCANtonetworkcontrollers,actuators, sensors, and transducers, manufacturers of all theabove-
mentionedcomputercontrolledproductshavebenefitedfrom:
Reduced designtime(readilyavailable, multisourcedcomponents,and tools)
Lower connectioncosts(lighter,smaller cables)
Improvedreliability(fewerconnections.)

ÊÀÑÊÎÄ
19
CANPC527D
Safety
Thesafety-relatedaspectsofusingCANincarsattractedtheattentionofmanufacturersofmedicalsys-
tems.Becauseofthe inherentreliabilityofthedatatransmissionandthe stringentsafetyrequirementsthat
needto be builtinto medical equipmentsuch as X-raymachines, CAN isnow used ina range ofthese
systems.
User Groups
Tocater for the growth in the use of CAN and to providea forum for discussion, several User Groups
have been formed. One of the first to be formed was the CAN Textile Users Group, but the principal
internationalUsers GroupisCANinAutomation (CiA).
CANisnowbeingusedinanincreasingnumberofapplicationsintheautomotiveworldandinmanyother
industrialapplications.Thesimplicity,robustness,anderrordetectioncapabilitiesofCANmakeitanideal
communicationstechnology forsystemswherereliability, lowcost,andeaseof designandconfiguration
arerequired.
Standardisationthrough ISO 11898providestrue“plug‘nplay”usage.
Implementations of CAN
Communicationis identical for allimplementationsofCAN.However,therearetwoprincipal hardware
implementations.
Thetwoimplementationareknownas Basic CAN and Full CAN.
The terms Basic CAN and Full CAN must not be confused with the terms Standard CAN (the 11 bit
identifier, or Version 2.0A data format) and Extended CAN(the 29 bit identifier, or Version 2.0B data
format).Suitably configured, each implementation(Basic or Full CAN)can handle both Standardand
Extendeddata formats.
Basic CAN
In Basic CAN configurations there is a tight link between the CAN controller and the associated
microcontroller.Themicrocontroller,whichwillhaveothersystemrelatedfunctionsto administer,willbe
interruptedtodealwitheveryCANmessage.
Full CAN
FullCAN devicescontainadditionalhardwareto provideamessage“server” that automaticallyreceives
andtransmitsCANmessageswithoutinterruptingtheassociatedmicrocontroller.FullCANdevicescarry
outextensiveacceptancefilteringonincomingmessages,servicesimultaneousrequests,and generally
reducethe load on themicrocontroller.
Network Sizes
Thenumber of nodes that can exist ona single network is, theoretically, limited only by the numberof
availableidentifiers.However,thedrivecapabilities ofcurrentlyavailabledevicesimposesgreaterrestric-
tions. Depending on the device types, up to 32 or 64 nodes per network is normal, but at least one
manufacturernow provides devices thatwillallownetworksof110nodes.

ÊÀÑÊÎÄ 20
CANPC527D
Data Rate vs Bus Length
Therate ofdatatransmissiondependson thetotaloveralllength of thebusandthe delays associatedwith
thetransceivers. ForallISO11898compliantdevices runningat1Mbit/secspeed, themaximumpossible
buslengthis specified as 40 Metres,Forlonger bus lengths it isnecessaryto reduce the bit rate.Togive
someindicationofthisthefollowingnumbersarefromtheDeviceNetfeatureslist:
500 K bits per second at 100 metres (328 ft)
250 K bits per second at 200 metres (656 ft)
125 K bits per second at 500 metres (1640 ft)
How CAN works
Principle
Datamessagestransmitted from any node on a CAN bus do not contain addressesofeitherthetransmit-
tingnode, or of anyintendedreceivingnode.
Instead, the content of the message (e.g. Revolutions Per Minute, Hopper Full, X-ray Dosage, etc.) is
labelledby anidentifierthatis uniquethroughoutthenetwork. Allothernodeson thenetworkreceivethe
messageandeachperformsanacceptance test on the identifier to determine ifthemessage,andthusits
content,isrelevant to that particular node.
Ifthe message is relevant, it willbeprocessed;otherwiseitisignored.
Identifiers
Theuniqueidentifier also determines thepriority of the message. Thelower the numerical value ofthe
identifier,thehigherthepriority.
Thehigherprioritymessageisguaranteedtogainbusaccessasifitweretheonlymessagebeingtransmit-
ted.Lowerprioritymessagesareautomaticallyre-transmittedinthenextbuscycle,orinasubsequentbus
cycleif therearestillother,higher prioritymessageswaitingto be sent.
Bit encoding
CANusesNonReturntoZero(NRZ)encoding(withbit-stuffing)fordatacommunicationonadifferential
twowirebus.TheuseofNRZencodingensurescompactmessageswithaminimumnumberoftransitions
andhighresilienceto externaldisturbance.
The physical bus
Thetwo wire busis usually twistedpair (shielded orunshielded). Flat pair(telephone type) cablealso
performswellbut generates more noise itself, and may be more susceptible to externalsourcesofnoise.
Robustness
CANwill operateinextremelyharshenvironments andtheextensiveerror checking mechanismsensure
thatanytransmissionerrors are detected. See the theErrorssectionfor more details.
Table of contents
Popular Computer Hardware manuals by other brands

Grundig
Grundig WiFi USB DONGLE user guide

MICRO-EPSILON
MICRO-EPSILON capaNCDT 6200 operating instructions

Texas Instruments
Texas Instruments TAS5707EVM user guide

AcSiP
AcSiP EK-AI7933CLD user guide

NXP Semiconductors
NXP Semiconductors Motorola DSP56602 user manual

Silicon Laboratories
Silicon Laboratories EFR32MG1 user guide

Mouser Electronics
Mouser Electronics MCQ37AI Quick reference guide

Advantech
Advantech PCE-5B06V-04A1E Startup manual

SilverStone
SilverStone Krypton Series manual

Gigabyte
Gigabyte AORUS LIQUID COOLER Series Quick installation guide

Synology
Synology NAS DS3622xs+ Hardware installation guide

BELL LABS INNOVATIONS
BELL LABS INNOVATIONS Lucent Technologies INTUITY MAP/5 Installation