CAN总线外文文献及译稿文档格式.docx

上传人:b****3 文档编号:7774734 上传时间:2023-05-09 格式:DOCX 页数:10 大小:23.97KB
下载 相关 举报
CAN总线外文文献及译稿文档格式.docx_第1页
第1页 / 共10页
CAN总线外文文献及译稿文档格式.docx_第2页
第2页 / 共10页
CAN总线外文文献及译稿文档格式.docx_第3页
第3页 / 共10页
CAN总线外文文献及译稿文档格式.docx_第4页
第4页 / 共10页
CAN总线外文文献及译稿文档格式.docx_第5页
第5页 / 共10页
CAN总线外文文献及译稿文档格式.docx_第6页
第6页 / 共10页
CAN总线外文文献及译稿文档格式.docx_第7页
第7页 / 共10页
CAN总线外文文献及译稿文档格式.docx_第8页
第8页 / 共10页
CAN总线外文文献及译稿文档格式.docx_第9页
第9页 / 共10页
CAN总线外文文献及译稿文档格式.docx_第10页
第10页 / 共10页
亲,该文档总共10页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

CAN总线外文文献及译稿文档格式.docx

《CAN总线外文文献及译稿文档格式.docx》由会员分享,可在线阅读,更多相关《CAN总线外文文献及译稿文档格式.docx(10页珍藏版)》请在冰点文库上搜索。

CAN总线外文文献及译稿文档格式.docx

Introduction

ControllerAreaNetwork(CAN)wasinitiallycreatedbyGermanautomotivesystemsupplierRobertBoschinthemid-1980sforautomotiveapplicationsasamethodforenablingrobustserialcommunication.Thegoalwastomakeautomobilesmorereliable,safeandfuel-efficientwhiledecreasingwiringharnessweightandcomplexity.Sinceitsinception,theCANprotocolhasgainedwidespreadpopularityinindustrialautomationandautomotive/truckapplications.Othermarketswherenetworkedsolutionscanbringattractivebenefitslikemedicalequipment,testequipmentandmobilemachinesarealsostartingtoutilizethebenefitsofCAN.ThegoalofthisapplicationnoteistoexplainsomeofthebasicsofCANandshowthebenefitsofchoosingCANforembeddedsystemsnetworkedapplications.

CANOverview

Mostnetworkapplicationsfollowalayeredapproachtosystemimplementation.Thissystemeticapproachenablessinteroperabilitybetweenproductsfromdifferentmanufacturers.AstandardwascreatedbytheInternationalStandardsOrganization(ISO)asatemplatetofollowforthislayeredapproach.ItiscalledtheISOOpenSystemsInterconnection(OSI)NetworkLayeringReferenceModel.TheCANprotocolitselfimplementsmostofthelowertwolayersofthisreferencemodel.ThecommunicationmediumportionofthemodelwaspurposelyleftoutoftheBoschCANspecificationtoenablesystemdesignerstoadaptandoptimizethecommunicationprotocolonmultiplemediaformaximumflexibility(twistedpair,singlewire,opticallyisolated,RF,IR,etc.).Withthisflexibility,however,comesthepossibilityofinteroperabilityconcerns.Toeasesomeoftheseconcerns,theInternationalStandardsOrganizationandSocietyofAutomotiveEngineers(SAE)havedefinedsomeprotocolsbasedonCANthatincludetheMediaDependentsInterfacedefinitionsuchthatallofthelowertwolayersarespecified.

ISO11898isastandardforhigh-speedapplications,ISO11519isastandardforlow-speedapplications,andJ1939(fromSAE)istargetedfortruckandbusapplications.Allthreeoftheseprotocolsspecifya5Vdifferentialelectricalbusasthephysicalinterface.TherestofthelayersoftheISO/OSIprotocolstackarelefttobeimplementedbythesystemsoftwaredeveloper.HigherLayerProtocols(HLPs)aregenerallyusedtoimplementtheupperfivelayersoftheOSIReferenceModel.

HLPsareusedto:

1)Standardizestartupproceduresincludingbitratesused,

2)Distributeaddressesamongparticipatingnodesortypesofmessages,

3)Determinethestructureofthemessages,and

4)Providesystem-levelerrorhandlingroutines.ThisisbynomeansafulllistofthefunctionsHLPsperform;

howeveritdoesdescribesomeoftheirbasicfunctionality.

CANProtocolBasics

CarrierSenseMultipleAccesswithCollisionDetection(CSMA/CD)

TheCANcommunicationprotocolisaCSMA/CDprotocol.TheCSMAstandsforCarrierSenseMultipleAccess.Whatthismeansisthateverynodeonthenetworkmustmonitorthebusforaperiodofnoactivitybeforetryingtosendamessageonthebus(CarrierSense).Also,oncethisperiodofnoactivityoccurs,everynodeonthebushasanequalopportunitytotransmitamessage(MultipleAccess).TheCDstandsforCollisionDetection.Iftwonodesonthenetworkstarttransmittingatthesametime,thenodeswilldetectthe‘collision’andtaketheappropriateaction.InCANprotocol,anondestructivebitwisearbitrationmethodisutilized.Thismeansthatmessagesremainintactafterarbitrationiscompletedevenifcollisionsaredetected.Allofthisarbitrationtakesplacewithoutcorruptionordelayofthehigherprioritymessage.

Thereareacoupleofthingsthatarerequiredtosupportnon-destructivebitwisearbitration.First,logicstatesneedtobedefinedasdominantorrecessive.Second,thetransmittingnodemustmonitorthestateofthebustoseeifthelogicstateitistryingtosendactuallyappearsonthebus.CANdefinealogicbit0asadominantbitandalogicbit1asarecessivebit.

Adominantbitstatewillalwayswinarbitrationoverarecessivebitstate,thereforethelowerthevalueintheMessageIdentifier(thefieldusedinthemessagearbitrationprocess),thehigherthepriorityofthemessage.Asanexample,supposetwonodesaretryingtotransmitamessageatthesametime.Eachnodewillmonitorthebustomakesurethebitthatitistryingtosendactuallyappearsonthebus.Thelowerprioritymessagewillatsomepointtrytosendarecessivebitandthemonitoredstateonthebuswillbeadominant.Atthatpointthisnodelosesarbitrationandimmediatelystopstransmitting.Thehigherprioritymessagewillcontinueuntilcompletionandthenodethatlostarbitrationwillwaitforthenextperiodofnoactivityonthebusandtrytotransmititsmessageagain.

Message-BasedCommunication

CANprotocolisamessage-basedprotocol,notanaddressbasedprotocol.Thismeansthatmessagesarenottransmittedfromonenodetoanothernodebasedonaddresses.EmbeddedintheCANmessageitselfisthepriorityandthecontentsofthedatabeingtransmitted.Allnodesinthesystemreceiveeverymessagetransmittedonthebus(andwillacknowledgeifthemessagewasproperlyreceived).Itisuptoeachnodeinthesystemtodecidewhetherthemessagereceivedshouldbeimmediatelydiscardedorkepttobeprocessed.Asinglemessagecanbedestinedforoneparticularnodetoreceive,ormanynodesbasedonthewaythenetworkandsystemaredesigned.Forexample,anautomotiveairbagsensorcanbeconnectedviaCANtoasafetysystemrouternodeonly.Thisrouternodetakesinothersafetysysteminformationandroutesittoallothernodesonthesafetysystemnetwork.Thenalltheothernodesonthesafetysystemnetworkcanreceivethelatestairbagsensorinformationfromtherouteratthesametime,acknowledgeifthemessagewasreceivedproperly,anddecidewhethertoutilizethisinformationordiscardit.

AnotherusefulfeaturebuiltintotheCANprotocolistheabilityforanodetorequestinformationfromothernodes.ThisiscalledaRemoteTransmitRequest(RTR).Thisisdifferentfromtheexampleinthepreviousparagraphbecauseinsteadofwaitingforinformationtobesentbyaparticularnode,thisnodespecificallyrequestsdatatobesenttoit.

Oneadditionalbenefitofthismessage-basedprotocolisthatadditionalnodescanbeaddedtothesystemwithoutthenecessitytoreprogramallothernodestorecognizethisaddition.Thisnewnodewillstartreceivingmessagesfromthenetworkand,basedonthemessageID,decidewhethertoprocessordiscardthereceivedinformation.

CANMessageFrameDescription

CANprotocoldefinefourdifferenttypesofmessages(orFrames).ThefirstandmostcommontypeofframeisaDataFrame.Thisisusedwhenanodetransmitsinformationtoanyorallothernodesinthesystem.SecondisaRemoteFrame,whichisbasicallyaDataFramewiththeRTRbitsettosignifyitisaRemoteTransmitRequest.Theothertwoframetypesareforhandlingerrors.OneiscalledanErrorFrameandoneiscalledanOverloadFrame.ErrorFramesaregeneratedbynodesthatdetectanyoneofthemanyprotocolerrorsdefinedbyCAN.Overloaderrorsaregeneratedbynodesthatrequiremoretimetoprocessmessagesalreadyreceived.

DataFramesconsistoffieldsthatprovideadditionalinformationaboutthemessageasdefinedbytheCANspecification.EmbeddedintheDataFramesareArbitrationFields,ControlFields,DataFields,CRCFields,a2-bitAcknowledgeFieldandanEndofFrame.

TheArbitrationFieldisusedtoprioritizemessagesonthebus.SincetheCANprotocoldefinesalogical0asthedominantstate,thelowerthenumberinthearbitrationfield,thehigherprioritythemessagehasonthebus.Thearbitrationfieldconsistsof12-bits(11identifierbitsandoneRTRbit)or32-bits(29identifierbits,1-bittodefinethemessageasanextendeddataframe,anSRRbitwhichisunused,andanRTRbit),dependingonwhetherStandardFramesorExtendedFramesarebeingutilized.ThecurrentversionoftheCANspecification,version2.0B,defines29-bitidentifiersandcallsthemExtendedFrames.PreviousversionsoftheCANspecificationdefined11-bitidentifierswhicharecalledStandardFrames.

Asdescribedintheprecedingsection,theRemoteTransmitRequest(RTR)isusedbyanodewhenitrequiresinformationtobesenttoitfromanothernode.ToaccomplishanRTR,aRemoteFrameissentwiththeidentifieroftherequiredDataFrame.TheRTRbitintheArbitrationFieldisutilizedtodifferentiatebetweenaRemoteFrameandaDataFrame.IftheRTRbitisrecessive,thenthemessageisaRemoteFrame.IftheRTRbitisdominant,themessageisaDataFrame.

TheControlFieldconsistsofsixbits.TheMSBistheIDEbit(signifiesExtendedFrame)whichshouldbedominantforStandardDataFrames.ThisbitdeterminesifthemessageisaStandardorExtendedFrame.InExtendedFrames,thisbitisRB1anditisreserved.ThenextbitisRB0anditisalsoreserved.ThefourLSBsaretheDataLengthCode(DLC)bits.TheDataLengthCodebitsdeterminehowmanydatabytesareincludedinthemessage.ItshouldbenotedthataRemoteFramehasnodatafield,regardlessofthevalueoftheDLCbits.TheDataFieldconsistsofthenumberofdatabytesdescribedintheDataLengthCodeoftheControlField.TheCRCFieldconsistsofa15-bitCRCfieldandaCRCdelimiter,andisusedbyreceivingnodestodetermineiftransmissionerrorshaveoccurred.

TheAcknowledgeFieldisutilizedtoindicateifthemessagewasreceivedcorrectly.Anynodethathascorrectlyreceivedthemessage,regardlessofwhetherthenodeprocessesordiscardsthedata,putsadomi

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > PPT模板 > 商务科技

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2