數(shù)字電子技術(shù)(Floyd第十版)課件Chapter2_第1頁
數(shù)字電子技術(shù)(Floyd第十版)課件Chapter2_第2頁
數(shù)字電子技術(shù)(Floyd第十版)課件Chapter2_第3頁
數(shù)字電子技術(shù)(Floyd第十版)課件Chapter2_第4頁
數(shù)字電子技術(shù)(Floyd第十版)課件Chapter2_第5頁
已閱讀5頁,還剩67頁未讀, 繼續(xù)免費閱讀

下載本文檔

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

文檔簡介

DigitalFundamentalsTenthEditionFloydChapter9?2008PearsonEducationDigitalFundamentalsChapter9?Ashiftregisterisanarrangementofflip-flopswithimportantapplicationsinstorageandmovementofdata.Somebasicdatamovementsareillustratedhere.SummaryBasicShiftRegisterOperationsDatainDatainDatainDatainDatainDataoutDataoutDataoutDataoutDataoutSerialin/shiftright/serialoutSerialin/shiftleft/serialoutParallelin/serialoutParallelin/paralleloutSerialin/paralleloutRotaterightRotateleftAshiftregisterisanarrangeSummarySerial-in/SerialoutShiftRegisterShiftregistersareavailableinICformorcanbeconstructedfromdiscreteflip-flopsasisshownherewithafive-bitserial-inserial-outregister.Eachclockpulsewillmoveaninputbittothenextflip-flop.Forexample,a1isshownasitmovesacross.111111CLKCLKCLKCLKCLKSummarySerial-in/SerialoutShSummaryABasicApplicationAnapplicationofshiftregistersisconversionofserialdatatoparallelform.Forexample,assumethebinarynumber1011isloadedsequentially,onebitateachclockpulse.CLKCLKCLKCLKAfter4clockpulses,thedataisavailableattheparalleloutput.SummaryABasicApplicationAnaSummaryThe74HC164AShiftRegisterThe74HC164AisaCMOS8-bitserialin/paralleloutshiftregister.VCCcanbefrom+2.0Vto+6.0V.OneofthetwoserialdatainputsmaybeusedasanactiveHIGHenabletogatetheotherinput.Ifnoenableisneeded,theotherserialinputcanbeconnectedtoVCC.The74HC164AhasanactiveLOWasynchronousclear.Dataisenteredontheleading-edgeoftheclock.CLKQ0Q1Q2Q3CLRQ4Q5Q6Q7SerialinputsABSummaryThe74HC164AShiftRegiSummaryWaveformsforthe74HC164ASamplewaveformsforthe74HC164Aareshown.NoticethatBactsasanactiveHIGHenableforthedataonAasdiscussed.CLKQ0Q1Q2Q3CLRQ4Q5Q6Q7SerialinputsABOutputsClearClearAswithCMOSdevices,unusedinputsshouldalwaysbeconnectedtoalogiclevel;unusedoutputsshouldbeleftopen.SummaryWaveformsforthe74HC1SummaryParallelin/SerialoutShiftRegisterShiftregisterscanbeusedtoconvertparalleldatatoserialform.Alogicdiagramforthistypeofregisterisshown:D0D1D2D3Q0Q1Q2Q3SHIFT/LOADCLKSerialdataoutSummaryParallelin/SerialoutSummaryThe74HC165ShiftRegisterThe74HC165isaCMOS8-bitparallelin/serialoutshiftregister.Thelogicsymbolisshown:D0D1D2D3D4D5D6D7Q7Q7SH/LDCLKSERCLKINHTheclock(CLK)andclockinhibit(CLKINH)linesareconnectedtoacommonORgate,soeitheroftheseinputscanbeusedasanactive-LOWclockenablewiththeotherastheclockinput.DataisloadedasynchronouslywhenSH/LDisLOWandmovedthroughtheregistersynchronouslywhenSH/LDisHIGHandarisingclockpulseoccurs.SummaryThe74HC165ShiftRegisSummaryThe74HC165ShiftRegisterAMultisimsimulationofthe74165Aisshown.Thewordgeneratorisusedasasourceforthepatternshowninthegreenprobes.MSBPatternisloadedwhenJ1isLOWQ7islabeledQHinMultisimSummaryThe74HC165ShiftRegisSummaryThe74HC165ShiftRegisterHerethescopeisopenedandyoucanobservethepattern.TheMSBisHIGHandisontheQ7outputassoonasLOADisLOW.LoadQ7ClkMSBSummaryThe74HC165ShiftRegisSummaryBidirectionalShiftRegisterBidirectionalshiftregisterscanshiftthedataineitherdirectionusingaRIGHT/LEFTinput.ThelogicanalyzersimulationshowsabidirectionalshiftregistersuchastheoneshowninFigure9-19ofthetext.NoticetheHIGHlevelfromtheSerialdatainisshiftedatfirstfromQ3towardQ0.CLKRIGHT/LEFTSerialdatainQ0Q1Q2Q3Shiftright

ShiftleftSummaryBidirectionalShiftRegSummaryBidirectionalShiftRegisterCLKRIGHT/LEFTSerialdatainQ0Q1Q2Q3Shiftright

ShiftleftQuestionHowwillthepatternchangeiftheRIGHT/LEFTcontrolsignalisinverted?AnswerSeedisplayShiftright

ShiftleftSummaryBidirectionalShiftRegSummaryUniversalShiftRegisterAuniversalshiftregisterhasbothserialandparallelinputandoutputcapability.The74HC194isanexampleofa4-bitbidirectionaluniversalshiftregister.D0D1D2D3CLKSLSERQ0Q1Q2Q3SRSERS1S0CLRSamplewaveformsareonthefollowingslide…SummaryUniversalShiftRegisteSummaryUniversalShiftRegisterSummaryUniversalShiftRegisteSummaryShiftRegisterCountersShiftregisterscanformusefulcountersbyrecirculatingapatternof0’sand1’s.TwoimportantshiftregistercountersaretheJohnsoncounterandtheringcounter.TheJohnsoncountercanbemadewithaseriesofDflip-flops…orwithaseriesofJ-Kflipflops.HereQ3andQ3arefedbacktotheJandKinputswitha“twist”.SummaryShiftRegisterCountersSummaryJohnsonCounter“twist”RedrawingthesameJohnsoncounter(withouttheclockshown)illustrateswhyitissometimescalledasa“twisted-ring”counter.SummaryJohnsonCounter“twist”RSummaryJohnsonCounterTheJohnsoncounterisusefulwhenyouneedasequencethatchangesbyonlyonebitatatimebutithasalimitednumberofstates(2n,wheren=numberofstages).Thefirstfivecountsfora4-bitJohnsoncounterthatisinitiallyclearedare: CLK Q0

Q1

Q2

Q300001 00011001110111101110011000101234567Whataretheremaining3states?QuestionSummaryJohnsonCounterTheJohnSummaryRingCounterTheringcountercanalsobeimplementedwitheitherDflip-flopsorJ-Kflip-flops.Hereisa4-bitringcounterconstructedfromaseriesofDflip-flops.Noticethefeedback.LiketheJohnsoncounter,itcanalsobeimplementedwithJ-Kflipflops.SummaryRingCounterTheringcoSummaryRingCounterRedrawingtheRingcounter(withouttheclockshown)showswhyitisa“ring”.Thedisadvantagetothiscounteristhatitmustbepreloadedwiththedesiredpattern(usuallyasingle0or1)andithasevenfewerstatesthanaJohnsoncounter(n,wheren=numberofflip-flops.Ontheotherhand,ithastheadvantageofbeingself-decodingwithauniqueoutputforeachstate.SummaryRingCounterRedrawingtSummaryRingCounterAcommonpatternforaringcounteristoloaditwithasingle1orasingle0.Thewaveformsshownhereareforan8-bitringcounterwithasingle1.SummaryRingCounterAcommonpaSummaryShiftRegisterApplicationsShiftregisterscanbeusedtodelayadigitalsignalbyapredeterminedamount.ExampleAn8-bitserialin/serialoutshiftregisterhasa40MHzclock.Whatisthetotaldelaythroughtheregister?SolutionThedelayforeachclockis1/40MHz=25nsThetotaldelayis8x25ns=200ns25ns=200nsSummaryShiftRegisterApplicatSummaryShiftRegisterApplicationsAUART(UniversalAsynchronousReceiverTransmitter)isaserial-to-parallelconverterandaparalleltoserialconverter.UARTsarecommonlyusedinsmallsystemswhereonedevicemustcommunicatewithanother.Paralleldataisconvertedtoasynchronousserialformandtransmitted.Theserialdataformatis:StartBit(0)StopBits(1)DatabusSerialdatainSerialdataoutCLKCLKSummaryShiftRegisterApplicatSummaryKeyboardEncoderThekeyboardencoderisanexampleofwherearingcounterisusedinasmallsystemtoencodeakeypress.Two74HC195shiftregistersareconnectedasan8-bitringcounterpreloadedwithasingle0.Asthe0circulateintheringcounter,it“scans”thekeyboardlookingforanyrowthathasakeyclosure.Whenoneisfound,acorrespondingcolumnlineisconnectedtothatrowline.Thecombinationoftheuniquecolumnandrowlinesidentifiesthekey.Theschematicisshownonthefollowingslide…SummaryKeyboardEncoderThekey?2008PearsonEducation?2008PearsonEducationKeyTerms

RegisterStageShiftLoadBidirectionalOneormoreflip-flopsusedtostoreandshiftdata.Onestorageelementinaregister.Tomovebinarydatafromstagetostagewithinashiftregisterorotherstoragedeviceortomovebinarydataintooroutofthedevice.Toenterdatainashiftregister.Havingtwodirections.Inabidirectionalshiftregister,thestoreddatacanbeshiftedrightorleft.KeyTermsRegisterOneormor1.Theshiftregisterthatwouldbeusedtodelayserialdataby4clockperiodsis a. c. b. d.?2008PearsonEducationQuiz1.Theshiftregisterthatwo?2008PearsonEducationQuiz2. Thecircuitshownisa a.serial-in/serial-outshiftregister

b.serial-in/parallel-outshiftregister c.parallel-in/serial-outshiftregister d.parallel-in/parallel-outshiftregister?2008PearsonEducationQuiz2.Quiz3. IftheSHIFT/LOADlineisHIGH,data a.isloadedfromD0,D1,D2andD3immediately b.isloadedfromD0,D1,D2andD3onthenextCLK c.shiftedfromlefttorightonthenextCLK

d.shiftedfromrighttoleftonthenextCLK?2008PearsonEducationQuiz3. IftheSHIFT/LOADline?2008PearsonEducationQuiz4. A4-bitparallel-in/parallel-outshiftregisterwillstoredatafor a.1clockperiod b.2clockperiods c.3clockperiods

d.4clockperiods?2008PearsonEducationQuiz4.5.The74HC164(shown)hastwoserialinputs.IfdataisplacedontheAinput,theBinput a.couldserveasanactiveLOWenable b.couldserveasanactiveHIGHenable c.shouldbeconnectedtoground d.shouldbeleftopen?2008PearsonEducationQuizCLKQ0Q1Q2Q3CLRQ4Q5Q6Q7SerialinputsAB5.The74HC164(shown)hastwoQuiz6. AnadvantageofaringcounteroveraJohnsoncounteristhattheringcounter a.hasmorepossiblestatesforagivennumberofflip-flops b.isclearedaftereachcycle c.allowsonlyonebittochangeatatime

d.isself-decoding

Quiz6. AnadvantageofaringQuiz7. Apossiblesequencefora4-bitringcounteris a.…1111,1110,1101…

b.…0000,0001,0010… c.…0001,0011,0111…

d.…1000,0100,0010…Quiz7. ApossiblesequenceforQuiz8. Thecircuitshownisa a.serial-in/parallel-outshiftregister b.serial-in/serial-outshiftregister c.ringcounter

d.JohnsoncounterQuiz8. Thecircuitshownisa9.Assumeserialdataisappliedtothe8-bitshiftregistershown.Theclockfrequencyis20MHz.Thefirstdatabitwillshowupattheoutputin a.50ns b.200ns c.400ns d.800ns?2008PearsonEducationQuiz9.Assumeserialdataisappli10.Fortransmission,datafromaUARTissentin a.asynchronousserialform b.synchronousparallelform c.canbeeitheroftheabove d.noneoftheabove?2008PearsonEducationQuiz10.Fortransmission,datafroAnswers:1.a2.c3.c4.a5.b6.d7.d8.d9.c10.aQuizAnswers:6.dQuizDigitalFundamentalsTenthEditionFloydChapter9?2008PearsonEducationDigitalFundamentalsChapter9?Ashiftregisterisanarrangementofflip-flopswithimportantapplicationsinstorageandmovementofdata.Somebasicdatamovementsareillustratedhere.SummaryBasicShiftRegisterOperationsDatainDatainDatainDatainDatainDataoutDataoutDataoutDataoutDataoutSerialin/shiftright/serialoutSerialin/shiftleft/serialoutParallelin/serialoutParallelin/paralleloutSerialin/paralleloutRotaterightRotateleftAshiftregisterisanarrangeSummarySerial-in/SerialoutShiftRegisterShiftregistersareavailableinICformorcanbeconstructedfromdiscreteflip-flopsasisshownherewithafive-bitserial-inserial-outregister.Eachclockpulsewillmoveaninputbittothenextflip-flop.Forexample,a1isshownasitmovesacross.111111CLKCLKCLKCLKCLKSummarySerial-in/SerialoutShSummaryABasicApplicationAnapplicationofshiftregistersisconversionofserialdatatoparallelform.Forexample,assumethebinarynumber1011isloadedsequentially,onebitateachclockpulse.CLKCLKCLKCLKAfter4clockpulses,thedataisavailableattheparalleloutput.SummaryABasicApplicationAnaSummaryThe74HC164AShiftRegisterThe74HC164AisaCMOS8-bitserialin/paralleloutshiftregister.VCCcanbefrom+2.0Vto+6.0V.OneofthetwoserialdatainputsmaybeusedasanactiveHIGHenabletogatetheotherinput.Ifnoenableisneeded,theotherserialinputcanbeconnectedtoVCC.The74HC164AhasanactiveLOWasynchronousclear.Dataisenteredontheleading-edgeoftheclock.CLKQ0Q1Q2Q3CLRQ4Q5Q6Q7SerialinputsABSummaryThe74HC164AShiftRegiSummaryWaveformsforthe74HC164ASamplewaveformsforthe74HC164Aareshown.NoticethatBactsasanactiveHIGHenableforthedataonAasdiscussed.CLKQ0Q1Q2Q3CLRQ4Q5Q6Q7SerialinputsABOutputsClearClearAswithCMOSdevices,unusedinputsshouldalwaysbeconnectedtoalogiclevel;unusedoutputsshouldbeleftopen.SummaryWaveformsforthe74HC1SummaryParallelin/SerialoutShiftRegisterShiftregisterscanbeusedtoconvertparalleldatatoserialform.Alogicdiagramforthistypeofregisterisshown:D0D1D2D3Q0Q1Q2Q3SHIFT/LOADCLKSerialdataoutSummaryParallelin/SerialoutSummaryThe74HC165ShiftRegisterThe74HC165isaCMOS8-bitparallelin/serialoutshiftregister.Thelogicsymbolisshown:D0D1D2D3D4D5D6D7Q7Q7SH/LDCLKSERCLKINHTheclock(CLK)andclockinhibit(CLKINH)linesareconnectedtoacommonORgate,soeitheroftheseinputscanbeusedasanactive-LOWclockenablewiththeotherastheclockinput.DataisloadedasynchronouslywhenSH/LDisLOWandmovedthroughtheregistersynchronouslywhenSH/LDisHIGHandarisingclockpulseoccurs.SummaryThe74HC165ShiftRegisSummaryThe74HC165ShiftRegisterAMultisimsimulationofthe74165Aisshown.Thewordgeneratorisusedasasourceforthepatternshowninthegreenprobes.MSBPatternisloadedwhenJ1isLOWQ7islabeledQHinMultisimSummaryThe74HC165ShiftRegisSummaryThe74HC165ShiftRegisterHerethescopeisopenedandyoucanobservethepattern.TheMSBisHIGHandisontheQ7outputassoonasLOADisLOW.LoadQ7ClkMSBSummaryThe74HC165ShiftRegisSummaryBidirectionalShiftRegisterBidirectionalshiftregisterscanshiftthedataineitherdirectionusingaRIGHT/LEFTinput.ThelogicanalyzersimulationshowsabidirectionalshiftregistersuchastheoneshowninFigure9-19ofthetext.NoticetheHIGHlevelfromtheSerialdatainisshiftedatfirstfromQ3towardQ0.CLKRIGHT/LEFTSerialdatainQ0Q1Q2Q3Shiftright

ShiftleftSummaryBidirectionalShiftRegSummaryBidirectionalShiftRegisterCLKRIGHT/LEFTSerialdatainQ0Q1Q2Q3Shiftright

ShiftleftQuestionHowwillthepatternchangeiftheRIGHT/LEFTcontrolsignalisinverted?AnswerSeedisplayShiftright

ShiftleftSummaryBidirectionalShiftRegSummaryUniversalShiftRegisterAuniversalshiftregisterhasbothserialandparallelinputandoutputcapability.The74HC194isanexampleofa4-bitbidirectionaluniversalshiftregister.D0D1D2D3CLKSLSERQ0Q1Q2Q3SRSERS1S0CLRSamplewaveformsareonthefollowingslide…SummaryUniversalShiftRegisteSummaryUniversalShiftRegisterSummaryUniversalShiftRegisteSummaryShiftRegisterCountersShiftregisterscanformusefulcountersbyrecirculatingapatternof0’sand1’s.TwoimportantshiftregistercountersaretheJohnsoncounterandtheringcounter.TheJohnsoncountercanbemadewithaseriesofDflip-flops…orwithaseriesofJ-Kflipflops.HereQ3andQ3arefedbacktotheJandKinputswitha“twist”.SummaryShiftRegisterCountersSummaryJohnsonCounter“twist”RedrawingthesameJohnsoncounter(withouttheclockshown)illustrateswhyitissometimescalledasa“twisted-ring”counter.SummaryJohnsonCounter“twist”RSummaryJohnsonCounterTheJohnsoncounterisusefulwhenyouneedasequencethatchangesbyonlyonebitatatimebutithasalimitednumberofstates(2n,wheren=numberofstages).Thefirstfivecountsfora4-bitJohnsoncounterthatisinitiallyclearedare: CLK Q0

Q1

Q2

Q300001 00011001110111101110011000101234567Whataretheremaining3states?QuestionSummaryJohnsonCounterTheJohnSummaryRingCounterTheringcountercanalsobeimplementedwitheitherDflip-flopsorJ-Kflip-flops.Hereisa4-bitringcounterconstructedfromaseriesofDflip-flops.Noticethefeedback.LiketheJohnsoncounter,itcanalsobeimplementedwithJ-Kflipflops.SummaryRingCounterTheringcoSummaryRingCounterRedrawingtheRingcounter(withouttheclockshown)showswhyitisa“ring”.Thedisadvantagetothiscounteristhatitmustbepreloadedwiththedesiredpattern(usuallyasingle0or1)andithasevenfewerstatesthanaJohnsoncounter(n,wheren=numberofflip-flops.Ontheotherhand,ithastheadvantageofbeingself-decodingwithauniqueoutputforeachstate.SummaryRingCounterRedrawingtSummaryRingCounterAcommonpatternforaringcounteristoloaditwithasingle1orasingle0.Thewaveformsshownhereareforan8-bitringcounterwithasingle1.SummaryRingCounterAcommonpaSummaryShiftRegisterApplicationsShiftregisterscanbeusedtodelayadigitalsignalbyapredeterminedamount.ExampleAn8-bitserialin/serialoutshiftregisterhasa40MHzclock.Whatisthetotaldelaythroughtheregister?SolutionThedelayforeachclockis1/40MHz=25nsThetotaldelayis8x25ns=200ns25ns=200nsSummaryShiftRegisterApplicatSummaryShiftRegisterApplicationsAUART(UniversalAsynchronousReceiverTransmitter)isaserial-to-parallelconverterandaparalleltoserialconverter.UARTsarecommonlyusedinsmallsystemswhereonedevicemustcommunicatewithanother.Paralleldataisconvertedtoasynchronousserialformandtransmitted.Theserialdataformatis:StartBit(0)StopBits(1)DatabusSerialdatainSerialdataoutCLKCLKSummaryShiftRegisterApplicatSummaryKeyboardEncoderThekeyboardencoderisanexampleofwherearingcounterisusedinasmallsystemtoencodeakeypress.Two74HC195shiftregistersareconnectedasan8-bitringcounterpreloadedwithasingle0.Asthe0circulateintheringcounter,it“scans”thekeyboardlookingforanyrowthathasakeyclosure.Whenoneisfound,acorrespondingcolumnlineisconnectedtothatrowline.Thecombinationoftheuniquecolumnandrowlinesidentifiesthekey.Theschematicisshownonthefollowingslide…SummaryKeyboardEncoderThekey?2008PearsonEducation?2008PearsonEducationKeyTerms

RegisterStageShiftLoadBidirectionalOneormoreflip-flopsusedtostoreandshiftdata.Onestorageelementinaregister.Tomovebinarydatafromstagetostagewithinashiftregisterorotherstoragedeviceortomovebinarydataintooroutofthedevice.Toenterdatainashiftregister.Havingtwodirections.Inabidirectionalshiftregister,thestoreddatacanbeshiftedrightorleft.KeyTermsRegisterOneormor1.Theshiftregisterthatwouldbeusedtodelayserialdataby4clockperiodsis a. c. b. d.?2008PearsonEducationQuiz1.Theshiftregisterthatwo?2008PearsonEducationQuiz2. Thecircuitshownisa a.serial-in/serial-outshiftregister

b.serial-in/parallel-outshiftregister c.parallel-in/serial-out

溫馨提示

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

評論

0/150

提交評論