單片機英文文獻_第1頁
單片機英文文獻_第2頁
單片機英文文獻_第3頁
單片機英文文獻_第4頁
單片機英文文獻_第5頁
已閱讀5頁,還剩7頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領

文檔簡介

單片機英文文獻

IntroductionofProgrammablecontrollers

Fromasimpleheritage,theseremarkablesystemshaveevolvedtonotonlyreplaceelectromechanicaldevices,buttosolveanever-increasingarrayofcontrolproblemsinbothprocessandnonprocessindustries.Byallindications,thesemicroprocessorpoweredgiantswillcontinuetobreaknewgroundintheautomatedfactoryintothe1990s.

HISTORY

Inthe1960s,electromechanicaldevicesweretheorderofthedayassfarascontrolwasconcerned.Thesedevices,commonlyknownasrelays,werebeingusedbythethousandstocontrolmanysequential-typemanufacturingprocessesandstand-alongmachines.Manyoftheserelayswereinuseinthetransportationindustry,morespecifically,theautomotiveindustry.Theserelaysusedhundredsofwiresandtheirinterconnectionstoeffectacontrolsolution.Theperformanceofarelaywasbasicallyreliable-atleastasasingledevice.Butthecommonapplicationsforrelaypanelscalledfor300to500ormorerelays,andthereliabilityandmaintenanceissuesassociatedwithsupportingthesepanelsbecameaverygreatchallenge.Costbecameanotherissue,forinspiteofthelowcostoftherelayitself,theinstalledcostofthepanelcouldbequitehigh.Thetotalcostincludingpurchasedparts,wiring,andinstallationlabor,couldrangefrom$30~$50perrelay.Tomakemattersworse,theconstantlychangingneedsofaprocesscalledforrecurringmodificationsofacontrolpanel.

Withrelays,thiswasacostlyprospect,asitwasaccomplishedbyamajorrewiringeffortonthepanel.Inadditionthesechangesweresometimespoorlydocumented,causingasecond-shiftmaintenancenightmaremonthslater.Inlightofthis,itwasnotuncommontodiscardanentirecontrolpanelinfavorofanewonewiththeappropriatecomponentswiredinamannersuitedforthenewprocess.Addtothistheunpredictable,andpotentiallyhigh,costofmaintainingthesesystemsasonhigh-volumemotorvehicleproductionlines,anditbecameclearthatsomethingwasneededtoimprovethecontrolprocess一tomakeitmorereliable,easierto

troubleshoot,andmoreadaptabletochangingcontrolneeds.

Thatsomething,inthelate1960s,wasthefirstprogrammablecontroller.Thisfirst‘revolutionary’systemwandevelopedasaspecificresponsetotheneedsofthemajorautomotivemanufacturersintheUnitedStates.Theseearlycontrollers,orprogrammablelogiccontrollers(PLC),representedthefirstsystemsthat1couldbeusedonthefactoryfloor,2couldhavethere‘logic’

changedwithoutextensiverewiringorcomponentchanges,and3wereeasytodiagnoseandrepairwhenproblemsoccurred.

Itisinterestingtoobservetheprogressthathasbeenmadeinthepast15yearsintheprogrammablecontrollerarea.Thepioneerproductsofthelate1960smusthavebeenconfusingandfrighteningtoagreatnumberofpeople.Forexample,whathappenedtothehardwiredand

electromechanicaldevicesthatmaintenancepersonnelwereusedtorepairingwithhandtools?Theywerereplacedwith‘computers’disguisedaselectronicsdesignedtoreplace

relays.Eventheprogrammingtoolsweredesignedtoappearasrelayequivalentpresentations.Wehavetheopportunitynowtoexaminethepromise,inretrospect,thattheprogrammablecontrollerbroughttomanufacturing.

AllprogrammablecontrollersconsistofthebasicfunctionalblocksshowninFig.10.1.We’llexamineeachblocktounderstandtherelationshiptothecontrolsystem.Firstwelookatthecenter,asitistheheart(oratleastthebrain)ofthesystem.Itconsistsofamicroprocessor,logicmemoryforthestorageoftheactualcontrollogic,storageorvariablememoryforusewithdatathatwillordinarilychangeasafunctionpowerfortheprocessorandmemory.NextcomestheI/Oblock.ThisfunctiontakesthecontrollevelsignalsfortheCPUandconvertsthemtovoltageandcurrentlevelssuitableforconnectionwithfactorygradesensorsandactuators.TheI/Otypecanrangefromdigital(discreteoron/off),analog(continuouslyvariable),oravarietyofspecialpurpose‘smart’I/Owhicharededicatedtoacertainapplicationtask.Theprogrammerisshownhere,butitisnormallyusedonlytoinitiallyconfigureandprogramasystemandisnotrequiredforthesystemtooperate.Itisalsousedintroubleshootingasystem,andcanprovetobeavaluabletoolinpinpointingtheexactcauseofaproblem.ThefielddevicesshownhererepresentthevarioussensorsandactuatorsconnectedtotheI/O.Thesearethearms,legs,eyes,andearsofthesystem,includingpushbuttons,limitswitches,proximityswitches,photosensors,thermocouples,RTDS,positionsensingdevices,andbarcodereaderasinput;andpilotlights,displaydevices,motorstarters,DCandACdrives,solenoids,andprintersasoutputs.Nosingleattemptcouldcoveritsrapidlychangingscope,butthreebasiccharacteristicscanbeexaminedtogiveclassifyanindustrialcontroldeviceasaprogrammablecontroller.

Itsbasicinternaloperationistosolvelogicfromthebeginningofmemorytosomespecifiedpoint,suchasendofmemoryorendofprogram.Oncetheendisreached,theoperationbeginsagainatthebeginningofmemory.Thisscanningprocesscontinuesfromthetimepowerissuppliedtothetimeititremoved.

Theprogramminglogicisaformofarelayladderdiagram.

Normallyopen,normallyclosedcontacts,andrelaycoilsareusedwithinaformatutilizingaleftandarightverticalrail.Powerflow(symbolicpositiveelectronflow)isusedtodeterminewhichcoiloroutputsareenergizedordeenergized.

Themachineisdesignedfortheindustrialenvironmentfromitsbasicconcept;thisprotectionisnotaddedatalaterdate.TheindustrialenvironmentincludesunreliableACpower,hightemperatures(0to60degreeCelsius),extremesofhumidity,vibrations,RFnoise,andothersimilarparameters.Generalapplicationareas

PinDescription

Description

Theprogrammablecontrollerisusedinawidevarietyofcontrolapplicationstoday,manyofwhichwerenoteconomicallypossiblejustafewyearsago.Thisistruefortwogeneralreasons:1therecosteffectiveness(thatis,thecost

perI/Opoint)hasimproveddramaticallywiththefallingpricesofmicroprocessorsandrelatedcomponents,and2theabilityofthecontrollertosolvecomplexcomputationandcommunicationtaskshasmadeitpossibletouseitwhereadedicatedcomputerwaspreviouslyused.

Applicationsforprogrammablecontrollerscanbecategorizedinanumberofdifferentways,includinggeneralandindustrialapplicationcategories.Butitisimportanttounderstandtheframeworkinwhichcontrollersarepresentlyunderstoodandusedsothatthefullscopeofpresentandfutureevolutioncanbeexamined.Itisthroughthepowerofapplicationsthatcontrollerscanbeseenintheirfulllight.Industrialapplicationsincludemanyinbothdiscretemanufacturingandprocessindustries.Automotiveindustryapplications,thegenesisoftheprogrammablecontroller,continuetoprovidethelargestbaseofopportunity.Otherindustries,suchasfoodprocessingandutilities,providecurrentdevelopmentopportunities.

Therearefivegeneralapplicationareasinwhichprogrammablecontrollersareused.Atypicalinstallationwilluseoneormoreoftheseintegratedtothecontrolsystemproblem.Thefivegeneralareasareexplainedbrieflybelow.

TheAT89C51isalow-power,high-performanceCMOS8-bitmicrocomputerwith4KbytesofFlashprogrammableanderasablereadonlymemory(PEROM).ThedeviceismanufacturedusingAtmel’shigh-densitynonvolatile

memorytechnologyandiscompatiblewiththeindustry-standardMCS-51instructionsetandpinout.Theon-chipFlashallowstheprogrammemorytobereprogrammedin-systemorbyaconventionalnonvolatilememory

programmer.Bycombiningaversatile8-bitCPUwithFlashonamonolithicchip,theAtmelAT89C51isapowerfulmicrocomputerwhichprovidesahighly-flexibleandcost-effectivesolutiontomanyembeddedcontrolapplications.

Functioncharacteristic

TheAT89C51providesthefollowingstandardfeatures:4KbytesofFlash,128bytesofRAM,32I/Olines,two16-bittimer/counters,afivevectortwo-levelinterruptarchitecture,afullduplexserialport,on-chiposcillatorandclockcircuitry.Inaddition,theAT89C51isdesignedwithstaticlogicforoperationdowntozerofrequencyandsupportstwosoftwareselectablepowersavingmodes.TheIdleModestopstheCPUwhileallowingtheRAM,timer/counters,serialportandinterruptsystemtocontinuefunctioning.ThePower-downModesavestheRAMcontentsbutfreezestheoscillatordisablingallotherchipfunctionsuntilthenexthardwarereset.

VCC:Supplyvoltage.

GND:Ground.

Port0:

Port0isan8-bitopen-drainbi-directionalI/Oport.Asanoutputport,eachpincansinkeightTTLinputs.When1sarewrittentoport0pins,thepinscanbeusedashighimpedanceinputs.Port0mayalsobeconfiguredtobethemultiplexedloworderaddress/databusduringaccessestoexternalprogramanddatamemory.InthismodeP0hasinternalpullups.Port0alsoreceivesthecodebytesduringFlashprogramming,andoutputsthecodebytesduringprogramverification.Externalpullupsarerequiredduringprogramverification.

Port1

Port1isan8-bitbi-directionalI/Oportwithinternalpullups.ThePort1outputbufferscansink/sourcefourTTLinputs.When1sarewrittentoPort1pinstheyarepulledhighbytheinternalpullupsandcanbeusedasinputs.Asinputs,Port1pinsthatareexternallybeingpulledlowwillsourcecurrent(IIL)becauseoftheinternalpullups.Port1alsoreceivesthelow-orderaddressbytesduringFlashprogrammingandverification.

Port2

Port2isan8-bitbi-directionalI/Oportwithinternalpullups.ThePort2outputbufferscansink/sourcefourTTLinputs.When1sarewrittentoPort2pinstheyarepulledhighbytheinternalpullupsandcanbeusedasinputs.Asinputs,Port2pinsthatareexternallybeingpulledlowwillsourcecurrent,becauseoftheinternalpullups.Port2emitsthehigh-orderaddressbyteduringfetchesfromexternalprogrammemoryandduringaccessestoexternaldatamemorythatuse16-bitaddresses.Inthisapplication,itusesstronginternalpullupswhenemitting1s.Duringaccessestoexternaldatamemorythatuse8-bitaddresses,Port2emitsthecontentsoftheP2SpecialFunctionRegister.Port2alsoreceivesthehigh-orderaddressbitsandsomecontrolsignalsduringFlashprogrammingandverification.

Port3

Port3isan8-bitbi-directionalI/Oportwithinternalpullups.ThePort3outputbufferscansink/sourcefourTTLinputs.When1sarewrittentoPort3pinstheyarepulledhighbytheinternalpullupsandcanbeusedasinputs.Asinputs,Port3pinsthatareexternallybeingpulledlowwillsourcecurrent(IIL)becauseofthepullups.Port3alsoservesthefunctionsofvariousspecialfeaturesoftheAT89C51aslistedbelow:

Port3alsoreceivessomecontrolsignalsforFlashprogrammingandverification.

RST

Resetinput.Ahighonthispinfortwomachinecycleswhiletheoscillatorisrunningresetsthedevice.

ALE/PROG

AddressLatchEnableoutputpulseforlatchingthelowbyteoftheaddress

duringaccessestoexternalmemory.Thispinisalsotheprogrampulseinput(PROG)duringFlashprogramming.InnormaloperationALEisemittedataconstantrateof1/6theoscillatorfrequency,andmaybeusedforexternaltimingorclockingpurposes.Note,however,thatoneALEpulseisskippedduringeachaccesstoexternalDataMemory.

Ifdesired,ALEoperationcanbedisabledbysettingbit0ofSFRlocation8EH.Withthebitset,ALEisactiveonlyduringaMOVXorMOVCinstruction.Otherwise,thepinisweaklypulledhigh.SettingtheALEdisablebithasnoeffectifthemicrocontrollerisinexternalexecutionmode.

PSEN

ProgramStoreEnableisthereadstrobetoexternalprogrammemory.WhentheAT89C51isexecutingcodefromexternalprogrammemory,PSENisactivatedtwiceeachmachinecycle,exceptthattwoPSENactivationsareskippedduringeachaccesstoexternaldatamemory.

EA/VPP

ExternalAccessEnable.EAmustbestrappedtoGNDinordertoenablethedevicetofetchcodefromexternalprogrammemorylocationsstartingat0000HuptoFFFFH.Note,however,thatiflockbit1isprogrammed,EAwillbeinternallylatchedonreset.EAshouldbestrappedtoVCCforinternalprogramexecutions.Thispinalsoreceivesthe12-voltprogrammingenablevoltage(VPP)duringFlashprogramming,forpartsthatrequire12-voltVPP.

XTAL1

Inputtotheinvertingoscillatoramplifierandinputtotheinternalclockoperatingcircuit.

XTAL2

Outputfromtheinvertingoscillatoramplifier.

OscillatorCharacteristics

XTAL1andXTAL2aretheinputandoutput,respectively,ofaninvertingamplifierwhichcanbeconfiguredforuseasanon-chiposcillator,asshowninFigure1.Eitheraquartzcrystalorceramicresonatormaybeused.Todrivethedevicefromanexternalclocksource,XTAL2shouldbeleftunconnectedwhileXTAL1isdrivenasshowninFigure2.Therearenorequirementsonthedutycycleoftheexternalclocksignal,sincetheinputtotheinternalclockingcircuitryisthroughadivide-by-twoflip-flop,butminimumandmaximumvoltagehighandlowtimespecificationsmustbeobserved.

Figure1.OscillatorConnectionsFigure2.ExternalClockDriveConfiguration

IdleMode

Inidlemode,theCPUputsitselftosleepwhilealltheonchipperipheralsremainactive.Themodeisinvokedbysoftware.Thecontentoftheon-chip

RAMandallthespecialfunctionsregistersremainunchangedduringthismode.Theidlemodecanbeterminatedbyanyenabledinterruptorbyahardwarereset.Itshouldbenotedthatwhenidleisterminatedbyahardwarereset,thedevice

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論