欢迎来到天天文库
浏览记录
ID:18695630
大小:2.17 MB
页数:7页
时间:2018-09-20
《2009年11月2日 第6-1章_中断系统 双语教学_黄英_《单片机原理及应用》讲义(1)new》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、Chapter6InterruptSystemandTimerSystem主讲教师:黄英6.1InterruptsystemContents:6.1.1IntroductionofInterruptTechnology16.1.2InterruptSources11.ExternalInterrupts12.TimerInterrupts23.SerialPortInterrupt26.1.3InterruptControl21.Timer/CounterControlRegister(TCON)22.SerialPortControlRegister(SCON)33.InterruptEna
2、bleRegister(IE)34.InterruptPriorityRegister(IP)45.InterruptPriorityControlRules46.InterruptInitialization56.1.4InterruptProcess51.InterruptSample52.InterruptQuery53.InterruptResponse54.InterruptRequestRepeal66.1.5FlowChartofInterruptService76.1.1IntroductionofInterruptTechnology·Aeffectivemethodtoso
3、lveresourcecompetition.·Letsmultitaskshareoneresource:Resourcesharingtechnology.·Mainlyusedinrealtimecontrol.6.1.2InterruptSources·8051provides5interruptsources:TwoexternalinterruptsTwotimerinterruptsOneserialportinterrupt·5interruptvectorsareassignedinafixedlocation.(1)SerialPortinterrupt:0023H~002
4、AH(8bytes)(2)Timer/Counter1interrupt:001BH~0022H(8bytes)(3)ExternalInterrupt1:0013H~001AH(8bytes)(4)Timer/Counter0interrupt:000BH~0012H(8bytes)(5)ExternalInterrupt0:0003H~000AH(8bytes)·TheinterruptcausestheCPUtojumptotherelatedlocation,whereithasano-conditionjumpinstruction(LJMP/AJMP/SJMP)pointedtos
5、erviceroutine.1.ExternalInterrupts·ExternalInterrupts:/P3.2,/P3.3(generatedfromexternaldevice)·SignalModes:(1)LowLevelactive(2)Fallingedgeactive第7页,共7页2.TimerInterrupts·Timer0,Timer1·Whencountingoverflows:Atimerinterruptisgenerated.Timeroverflowflag(TF0/TF1)issetbyinternalhardwarecircuit.3.SerialPor
6、tInterrupt·Whenserialportreceives/transmitsagroupofserialdata:Aserialportinterruptisgenerated.ReceiveFlag/TransmitFlag(RI/TI)issetbyinternalhardwarecircuit.6.1.3InterruptControlTherearefourinterruptcontrolregisters:TCON,SCON,IE,IP.1.Timer/CounterControlRegister(TCON)·Celladdress:88H·Bitaddresses:8FH
7、~88Hgoback·RelatedBits:TF0/TF1,IE0/IE1,IT0/IT1第7页,共7页2.SerialPortControlRegister(SCON)Celladdress:98Hbitaddresses:9FH~98HRelatedBits:TI,RI3.InterruptEnableRegister(IE)Celladdress:0A8Hbitaddresses:0AFH
此文档下载收益归作者所有