数字电子技术(Floyd第十版)课件Chapter2_第1页
数字电子技术(Floyd第十版)课件Chapter2_第2页
数字电子技术(Floyd第十版)课件Chapter2_第3页
数字电子技术(Floyd第十版)课件Chapter2_第4页
数字电子技术(Floyd第十版)课件Chapter2_第5页
已阅读5页,还剩67页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

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. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论