(完整版)基于51單片機的無線數(shù)據(jù)收發(fā)系統(tǒng)設計(帶電路圖和代碼)_第1頁
(完整版)基于51單片機的無線數(shù)據(jù)收發(fā)系統(tǒng)設計(帶電路圖和代碼)_第2頁
(完整版)基于51單片機的無線數(shù)據(jù)收發(fā)系統(tǒng)設計(帶電路圖和代碼)_第3頁
(完整版)基于51單片機的無線數(shù)據(jù)收發(fā)系統(tǒng)設計(帶電路圖和代碼)_第4頁
(完整版)基于51單片機的無線數(shù)據(jù)收發(fā)系統(tǒng)設計(帶電路圖和代碼)_第5頁
已閱讀5頁,還剩61頁未讀, 繼續(xù)免費閱讀

下載本文檔

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

文檔簡介

英文資料及中文翻譯

CommunicatingwithDatalDatasignalsaretransmittedovervarioustypesoftelephonecircuits.Theytravelonwirefromtelephonepoletotelephonepole,throughundergroundcables,frommountaintoptomountaintopovermicrowavefacilities,ontheoceanfloorinsubmarinecables,andviacommunicationssatellitesfromcontinenttocontinent.Sometypeofdataconversionequipmentisrequiredtochangethedigitalmachinesignalstoaformsuitablefortransmissionoverthesefacilities.Thedatamachinewhichprovidesaninputtothetransmitsectionoftheconversionequipment,ormodulator,canbeakeyboard,printer,cardreader,papertapeterminalcomputerormagnetictapeterminal.Theoutputfromthereceivesectionoftheconverter,ordemodulator,canbeappliedtoatapepunch,printer,cardpunch,magnetictapeunit,computer,orvisualdisplayterminal.Typically,boththemodulatoranddemodulatorsectionsoftheconverterarecombinedintoatwo-waydatatransmitter-receiver,commonlycalledadatamodemordataset.Thetypicalfull-duplexdatatransmissionsystemincludingtheoriginatingdataprocessingequipmentandtheinterfaceassemblywhichconsistsofbufferandcontrolunits.Theinterfaceassemblyatthetransmitteracceptsdataattheratedeterminedbytheoperatingspeedofthedataprocessor.storesthedatatemporarily,andregeneratesitataratecompatiblewiththatofthedatamodem.Atthereceivingterminaltheinterfaceassemblyacceptsthereceiveddata,storesit,thenfeedsittothedataprocessorattheappropriaterate.Timingsignalsfromtheinterfaceassemblyatthetransmitterareappliedtothedatamodemtosynchronizethecomputerandthedataset.Atthereceiver,synchronizationpulsesarederivedfromthedatastreamtosynchronizethecomputer.Whenmorethanonedatasetfeedsintoacomputer,thecapacityoftheinterfaceequipmentisofmajorconcernsinceitmustdeterminethetimeslotallocationforeachline.Varioustypesofinterfaceassembliesareemployed,suchasmagneticcorememories,shiftregisters,anddelaylines.Notalldatacommunicationsterminalsemployaninterfacebetweenthedataprocessorandthedatamodem.Withoutaninterface,theinput,datatransmission,andoutputfunctionsproceedsimultaneouslyandatthesamerateofspeed.Sincedatasignalsarerarelyinsuitableformfortransmissionoverthevarioustypesoftransmissionfacilities,asignalcodingprocessisnormallyperformed.Ideally,thetransmissionmediumshouldhavelinearattenuationanddelaycharacteristics,butthisisneversoinpractice,andtransmissionimpairmentsarealwayspresenttodisturbthedatasignals.Asacomparison,invoicecommunicationsahighdegreeoftransmissionirregularitiescanbetolerated.Ifavoicecircuithasaheavylossorisnoisy,thespeakerscompensateautomaticallybyincreasingtheintensityoftheirvoices.Ifwordsaremissedbecauseoftransmissiondifficulties,theyareoftenunderstoodanywaybecauseoftheredundantnatureofspeech.Incontrast,thereisnoinherentredundancyindatasignalsunlesspurposelyinsertedand,therefore,transmissionvariationscaronlybecompensatedforoveraverysmallrange.Inaddition,datasignalsaresensitivetoothertransmissionimpairmentswhichhavelittleeffectonspeech.Codingisundertakentoalleviatetransmissionirregularities,toincreasetheinformationcapacityofthesystem,toenableerrordetection,andtoprovidemessagesecurity.Thecodingprocessinthedatatransmittersimplyrearrangestheapplieddatamachinesignalsintosomeotherformat.Atthereceivingendthereverseprocessingisperformedtorecovertheoriginalmachinesignals.Thediagramsshowthetwotypesofinformationsignalsthatareappliedindigitalformtoadatamodem.ShowninAisabinarynon-returntozerosignal.InBthesamesignalisshowninthereturntozeroformat.ThedifferencebetweenAandBisthatinAsuccessivemarksorspacesfollowoneanother,whereasinBtheremustbeareturntothespacelevelbetweensuccessivemarks.Thevoltagevaluesofmarksandspacesarearbitraryandmaybepositive,negative,orboth.Ofprimaryconcernwhenconsideringthetransmissionofdatafromonedevicetoanotheriswiring.Andofprimaryconcernwhenconsideringthewiringisthedatastream.Dowesendonebitatatime,ordowegroupbitsintolargergroupsand.ifso,how?Thetransmissionofbinarydataacrossalinkcanbeaccomplishedeitherinparallelmodeorserialmode.Inparallelmode,multiplebitsaresentwitheachclockpulse.Inserialmode,onebitissentwitheachclockpulse.Whilethereisonlyone-waytosendparalleldata,therearetwosubclassesofserialtransmission:synchronousandasynchronous.Asynchronoustransmissionissonamedbecausethetimingofasignalisunimportant.Instead,informationisreceivedandtranslatedbyagreed-uponpatterns.Aslongasthosepatternsarefollowed,thereceivingdevicecanretrievetheinformationwithoutregardtotherhythminwhichitissent.Patternsarebasedongroupingthebitstreamintobytes.Eachgroup,usuallyeightbits,issentalongthelinkasaunit.Thesendingsystemhandleseachgroupindependently,relayingittothelinkwheneverready,withoutregardtoatimer.Withoutasynchronizingpulse,thereceivercannotusetimingtopredictwhenthenextgroupwillarrive.Toalertthereceivertothearrivalofanewgroup,therefore,anextrabitisaddedtothebeginningofeachbyte.Thisbit,usuallya0,iscalledthestartbit.Toletthereceiverknowthatthebyteisfinished,oneormoreadditionalbitsareappendedtotheendofthebyte.Thesebits,usually1s,arecalledstopbits.Bythismethod,eachbyteisincreasedinsizetoatleast10bits,ofwhich8areinformationand2ormorearesignalstothereceiver.Inaddition,thetransmissionofeachbytemaythenbefollowedbyagapofvaryingduration.Thisgapcanberepresentedeitherbyanidlechannelorbyastreamofadditionalstopbits.Thestartandstopbitsandthegapalertthereceivertothebeginningandendofeachbyteandallowittosynchronizewiththedatastream.Thismechanismiscalledasynchronousbecause,atthebytelevel,senderandreceiverdonothavetobesynchronized.Butwithineachbyte,thereceivermuststillbesynchronizedwiththeincomingbitstream.Thatis,somesynchronizationisrequired,butonlyforthedurationofasinglebyte.Thereceivingdeviceresynchronizesattheonsetofeachnewbyte.Whenthereceiverdetectsastartbit,itsetsatimerandbeginscountingbitsastheycomein.Afternbitsthereceiverlooksforastopbit.Assoonasitdetectsthestopbit,itignoresanyreceivedpulsesuntilitdetectsthenextstartbit.Theadditionofstopandstartbitsandtheinsertionofgapsintothebitstreammakeasynchronoustransmissionslowerthanformsoftransmissionthatcanoperatewithouttheadditionofcontrolinformation.Butitischeapandeffective,twoadvantagesthatmakeitanattractivechoiceforsituationslikelow-speedcommunication.Forexample,theconnectionofaterminaltoacomputerisana1uralapplicationforasynchronoustransmission.AusertypesonJyonecharacteratatime,typesextremelyslowlyindataprocessingterms,andleavesunpredictablegapsoftimebetweeneachcharacter.Insynchronoustransmission,thebitstreamiscombinedintolonger"frames",whichmaycontainmultiplebytes.Eachbyte,however,isintroducedontothetransmissionlinkwithoutagapbetweenitandthenextone.Itislefttothereceivertoseparatethebitstreamintobytesfordecodingpurposes.Inotherwords,dataaretransmittedasanunbrokenstringof1sand0s,andthereceiverseparatesthatstringintothebytes,orcharacters,itneedstoreconstructtheinformation.Itgivesaschematicillustrationofsynchronoustransmission.Wehavedrawninthedivisionsbetweenbytes.Inreality,thosedivisionsdonotexist;thesenderputsasdataontothelineasonelongstring.Ifthesenderwishestosenddatainseparatebursts,thegapsbetweenburstsmustbefilledwithaspecialsequenceof0sand1sthatmeansidle.Thereceivercountsthebitsastheyarriveandgroupsthemineight-bitunits.Withoutgapsandstart/stopbits,thereisnobuilt-inmechanismtohelpthereceivingdeviceadjustitsbitsynchronizationinmidstream.Timingbecomesveryimportant,therefore,becausetheaccuracyofthereceivedinformationiscompletelydependentontheabilityofthereceivingdevicetokeepanaccuratecountofthebitsastheycomein.Theadvantageofsynchronoustransmissionisspeed.Withnoextrabitsorgapstointroduceatthesendingendandremoveatthereceivingendand,byextension,withfewerbitstomoveacrossthelink,synchronoustransmissionisfasterthanasynchronoustransmission.Forthisreason,itismoreusefulforhigh-speedapplicationslikethetransmissionofdatafromonecomputertoanother.Bytesynchronizationisaccomplishedinthedatalinklayer.ByfarthemostpopularserialinterfacebetweenacomputeranditsCRTterminalistheasynchronousserialinterface.Thisinterfaceissocalledbecausethetransmitteddataandthereceiveddataarenotsynchronizedoveranyextendedperiodandthereforenospecialmeansofsynchronizingtheclocksatthetransmitterandreceiverisnecessary.Infact,theasynchronousserialdatalinkisaveryoldformofdatatransmissionsystemandhasitsoriginintheeraofteleprinter.Serialdatatransmissionsystemshavebeenaroundforalongtimeandarefoundinthetelephone(humanspeech),Morsecode,semaphore,andeventhesmokesignalsonceusedbynativeAmericans.Thefundamentalproblemencounteredbyallserialdatatransmissionsystemsishowtosplittheincomingdatastreamintoindividualunits(i.e.,bits)andhowtogrouptheseunitsintocharacters.Forexample,inMorsecodethedotsanddashesofacharacterareseparatedbyanintersymbolspace,whiletheindividualcharactersareseparatedbyanintercharacterspace,whichisthreetimesthedurationofanintersymbolspace.Firstweexaminehowthedatastreamisdividedintoindividualbitsandthebitsgroupedintocharactersinanasynchronousserialdatalink.Thekeytotheoperationofthistypeoffinkisbothsimpleandingenious.Anasynchronousserialdatalinkissaidtobecharacteroriented,asinformationistransmittedintheformofgroupsofbitscalledcharacters.Thesecharactersareinvariableunitscomprising7or8bitsof"information"plus2to4controlbitsandfrequentlycorrespondtoASCII-encodedcharacters.Initially,whennoinformationisbeingtransmitted,thelineisinanidlestate.Traditionally,theidlestateisreferredtoasthemarklevel.Byconventionthiscorrespondstoalogical1level.Whenthetransmitterwishestosenddata,itfirstplacesthelineinaspacelevel(i.e.,thecomplementofamark)foroneelementperiod.ThiselementiscalledthestartbitandhasadurationofTseconds.Thetransmitterthensendsthecharacter,1bitatatime,byplacingeachsuccessivebitonthefineforadurationofTseconds,untilallbitshavebeentransmitted.Thenasingleparitybitiscalculatedbythetransmitterandsentafterthedatabits.Finally,thetransmittersendsastopbitatamarklevel(i.e.,thesamelevelastheidlestate)foroneortwobitperiods.Nowthetransmittermaysendanothercharacterwheneveritwishes.Atthereceivingendofanasynchronousserialdatalink,thereceivercontinuallymonitorsthelinelookingforastartbit.Oncethestartbithasbeendetected,thereceiverwaitsuntiltheendofthestartbitandthensamplesthenextNbitsattheircenters,usingaclockgeneratedlocallybythereceiver.Aseachincomingbitissampled,itisusedtoconstructanewcharacter.Whenthereceivedcharacterhasbeenassembled,itsparityiscalculatedandcomparedwiththereceivedparitybitfollowingthecharacter.Iftheyarenotequal,aparityerrorflagissettoindicateatransmissionerror.Themostcriticalaspectofthesystemisthereceivertiming.Thefallingedgeofthestartbittriggersthereceiver'slocalclock,whichsampleseachincoinmailngbitatitcenter.SupposethereceiverclockwaitsT/2secondsfromthefallingedgeofthestartbitandsamplestheincomingdataeveryTsecondsthereafteruntilthestopbithasbeensampled.Asthereceiver'sclockisnotsynchronizedwiththetransmitterclock,thesamplingisnotexact.Themostobviousdisadvantageofasynchronousdatatransmissionistheneedforastart,parity,andstopbitforeachtransmittedcharacter.If7bitcharactersareused,theoverallefficiencyisonly70%.Alessobviousdisadvantageisduetothecharacter-orientednatureofthedatalink.WheneverthedatalinkconnectsaCRTterminaltoacomputer,fewproblemsarise,astheterminalisitselfcharacteroriented.However,ifthedatalinkisbeingusedto,say,dumpbinarydatatoamagnetictape,problemsarise.yk/.t|—t、工數(shù)據(jù)通信數(shù)據(jù)信號在各種各樣的話路上傳輸:它們通過導線從一根電桿傳到另一根電桿;它們經(jīng)過地下電纜傳送;它們通過微波設備從一個山頭傳到另一個山頭;它們通過海底電纜,通過通信衛(wèi)星,從一個洲傳到另一個洲。為了把數(shù)字化機器信號變換為適合在這些設備中傳輸?shù)男盘栃问?需要使用某種類型的數(shù)據(jù)變換設備。向變換設備發(fā)送部分(即調(diào)制器)提供輸入的數(shù)據(jù)設備可以是鍵盤、打印機、卡片閱讀器、紙帶終端計算機或磁帶終端機。變換器接收部分(即解調(diào)器)的輸出可以適用于紙帶鑿孔機、打印機、卡片鑿孔機、磁帶機、計算機或視頻顯示終端。一般地說,變換器的調(diào)制部分和解調(diào)部分合并成為一個雙向數(shù)據(jù)發(fā)送接收機,通常稱之為數(shù)據(jù)調(diào)制解調(diào)器或數(shù)據(jù)傳輸機。典型的全雙工數(shù)據(jù)傳輸系統(tǒng),包括始發(fā)端數(shù)據(jù)處理設備和由緩沖器和控制單元組成的接口部件。發(fā)端的接口部件以數(shù)據(jù)處理機的處理速度所確定的速率接收數(shù)據(jù),將它們暫時存儲起來,并以與數(shù)據(jù)調(diào)制解調(diào)器兼容的速率予以轉發(fā)。在接收端,接口部件接受所收到的數(shù)據(jù),將它們存儲起來,再以適當?shù)乃俾仕偷綌?shù)據(jù)處理機中去。來自發(fā)端接口部件的定時信號被加到數(shù)據(jù)調(diào)制解調(diào)器上,以使計算機與數(shù)傳機同步。在接收端,從數(shù)據(jù)流中取出同步脈沖使計算機同步。當有一臺以上數(shù)傳機接至一臺計算機時,接口設備的容量是主要問題,因為它必須確定分配給每條線路的時隙。有各種類型的接口部件可以使用,如磁芯存儲器、移位寄存器和時延線。然而并不是所有的數(shù)據(jù)通信終端在數(shù)據(jù)處理機和數(shù)據(jù)調(diào)制解調(diào)器之間都使用接口。如果沒有接口,那么輸入、數(shù)據(jù)傳輸和輸出這三個操作過程同時進行,而且速率相同。由于數(shù)據(jù)信號的形式一般不適宜在各種傳輸設備上傳送,通常對信號要進行編碼。在理想情況下,傳輸媒介應當具有線性衰減和線性時延的特性。但實際情況根本不是這樣,傳輸損傷總是存在,干擾了數(shù)據(jù)信號。相比之下,語聲通信可以容忍極不規(guī)則的傳輸情況。如果電話電路的衰耗嚴重或噪聲大,說話人就會提高嗓音,自動予以彌補。如果講的某些單詞因傳輸困難而沒聽見,雙方往往仍可聽懂,因為語言有冗余度。數(shù)據(jù)信號則與之相反,除非有意加入,它本身沒有冗余度,所以傳輸質(zhì)量的不穩(wěn)定只能得到非常有限的補償。另外,數(shù)據(jù)信號對基本上不影響話音的其他傳輸質(zhì)量下降很敏感。為了減少不正常的傳輸情況,增加系統(tǒng)的信息容量,實現(xiàn)差錯檢測和消息保密,就要采用編碼手段。數(shù)據(jù)發(fā)送端的編碼僅僅是將所輸入的數(shù)據(jù)信號重新排列成其他形式。在接收端則進行相反的過程(譯碼),恢復原來的數(shù)據(jù)信號。所給的波形表示以數(shù)字形式輸入到數(shù)據(jù)調(diào)制解調(diào)器的兩類信息信號。波形A是二進制不歸零(NRZ)信號,波形B是同一信號的歸零(RZ)形式。波形A與波形B的區(qū)別是:波形A中傳號或空號連續(xù)不新地出現(xiàn),而波形B中脈沖幅度必須在兩個連續(xù)信號之間回到空號電平上來。傳號和空號的電壓值是任意的,可以是正值或負值,也可以是正負值兼而有之。當研究數(shù)據(jù)從一個設備向另一個設備傳輸時,我們關心的主要問題之一是連線。而考慮連線時,數(shù)據(jù)流又是我們所關心的問題。我們是一次發(fā)送一個比特呢,或者是成組發(fā)送它們呢?如果要成組發(fā)送,又如何做到這一點呢?通過鏈路來發(fā)送二進制數(shù)據(jù)的方法可以這樣實現(xiàn):要么采用并行方式,要么使用串行的模式。在并行模式中,在每一個時鐘脈沖到來時,可同時發(fā)送多個比特。而在串行方式里,伴隨每個時鐘只發(fā)送一個比特。雖然只有一種并行發(fā)送數(shù)據(jù)的方法,但串行傳輸卻有兩類:同步傳輸和異步傳輸。異步傳輸被如此稱呼,是因為信號的定時并不重要。不同的是,信息是按事先約定的方式來接收和翻譯的。只要遵照這些約定,接收器件就能夠恢復信息,而不理會它們在發(fā)送時的節(jié)拍。約定的基礎是將比特流組合成字節(jié)。每一個組合通常含有8個比特,它被作為一個單元在鏈路上發(fā)送。發(fā)送系統(tǒng)單獨處理每個組合,當將組合準備停當就將它放到鏈路上,且與定時器沒有關系。沒有了同步脈沖,接收機就不能利用定時信號去預測下一個組合什么時候到達。因此,為了通知接收機有新的組合到達,就得在每個字節(jié)的開始加上一個額外的比特。這個比特通常為0,并被稱為起始位。為了讓接收機知道字節(jié)的結束,在字節(jié)的尾部又另加了一個或多個比特。這些比特通常為1,被人們稱為停止住。運用這種方法,每一個字節(jié)的長度至少增加到10個比特,其中有8個比特的信息,以及2個或更多的比特,作為向接收機打"招呼"的信號。此外,在每個字節(jié)傳送之后,可能會有一段變化的間隙。這個時隙可用空閑信道或另加停止位來表示。起始位、停止位和時隙告訴接收機每一個字節(jié)的開始和結束,并讓接收機按照數(shù)據(jù)流進行同步。這種機制被稱為是異步的,因為在字節(jié)級上,發(fā)送器和接收器不需要同步。但是在每個字節(jié)內(nèi)部,接收器仍需與流入的比特流同步。這就是說,某種同步還是需要的,但僅限于在一個字節(jié)持續(xù)的期間內(nèi)。在每一個新的字節(jié)開始時,接收機又重新進行同步。當接收機檢測到一個起始位,它就將定時器置位,并在比特流入時開始記數(shù)。在接收了n比特之后,接收器就尋找停止住。一旦它檢測到停止住,它就忽略以后收到的脈沖,直到檢測到下一個起始位為止。比起不添加控制信息就能運行的傳輸形式,異步傳輸由于增加了停止住、起始位和在比特流中插入時隙而顯得慢一些。但由于具有便宜和高效兩大優(yōu)點,這使得它在如低速通信的一些場合成為一項誘人的選擇。例如,終端與計算機的連接就是異步傳輸方式很自然的應用。用戶每次只能敲一個字符,這在數(shù)據(jù)處理領域里是極慢的,而且在每個字符闊的間隙長短也難以預測。在同步傳輸中,比特流合并成較長的“幀”,而幀可能含有多個字節(jié)。然而當字節(jié)被引入到傳輸鏈路的時候,在字節(jié)之間卻沒有間隙。將比特流分成字節(jié)的任務是由接收器在解碼過程中完成的。換句話說,數(shù)據(jù)是以1和0組成的無間斷碼串來傳輸?shù)?,而接受器將這個碼串分離成字節(jié)或字符,它需要將信息重新恢復。對同步傳輸做了簡要的說明。在字節(jié)之間我們畫上了分隔線。事實上,這些分隔線并不存在,而發(fā)送器是將一長串的數(shù)據(jù)放到線路上的。如果發(fā)送器想以分離突發(fā)的形式發(fā)送數(shù)據(jù),則突發(fā)數(shù)據(jù)群之間的間隙就必須用一種由0和

溫馨提示

  • 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

提交評論