1、设置TI=1,是人为的设置了串行发送请求完毕的中断请求标志。但是你并没有致能(es=1)串口中断。实际上你的interrupt5的处理程序也没有写,是空的。(注意这点)
2、你既然没有设置it0=1(跳变触发中断),那么就是IT0=0(低电平触发)。
3、当一个低电平来的时候,就进入你的interrupt0处理程序。并且硬件自动清标记位置。执行完毕 beer=1。
4、这个时候还有一个中断请求标志IT=1,于是产生了中断嵌套。执行完高级中断后,进入低级中断interrupt5。之后是空白。。。。
5、结果就是你描述的:蜂鸣器一直响,数码管停止显示。
不知道我这样描述,你能不能理解。呵呵
51单片机只是在进入中断服务程序的瞬间清除外中断标志,在执行中断服务程序过程中再次发生相同中断时,中断标志位被置1 但在执行RETI指令退出中断服务程序以前,再次发生的多少次相同的中断都不会被响应。而退出中断服务程序后,如果本中断仍被允许而又没有更高优先级中断,则会再次进入中断服务程序并清除中断标志位。
IT0是决定51单片机响应外中断的模式标志位,为0是低电平触发,为1是下降沿触发。而IE0才是外中断的请求标志位。
八年级上姓名—— Units 1~4(人教版)选择( )1 Li Lei works in England He comes to China__Athree time a year Bthree times a year C three times year( ) 2 His grandmother is well because she often _____ A exercises B smokes C sleeps D sings( ) 3 --- ___do they play football --- Every dayA How soon B How much C How many D How often( ) 4 I____have lunch at 12: 30 But ____ it’s 12:00,I am having my lunch A usually; often B often; usually C sometimes; often D usually; now ( ) 5 Although they feel tired, _____ they still go on working A and B but C / D so( ) 6 You have a ___ You should stop eating anythingA headache B backache C stomachache Dfever( ) 7He is ___ fat because he eats___ junk food A much too; too much B too much; much too C too much; too much D much too; much too( )8 Don’t__on the bus There is no wash roomAdrink much water Beat a lot of junk food Cdo some reading ( )9 You shouldn’t __ when you are tired at nightAgo to bed earlyBstop working Cwork too lateDhave a rest( ) 10 Yesterday I had a lot of homework to do I did it _____ midnight(半夜)A to B until C at D on( )11 Do you enjoy____ in China A live B to live C lived D living ( )12What’s ____ with you, Ann A the matter B the wrong C matter D trouble( )13 the man asked, “Do you have _________ to say”A anything important B important something C something important D important anything( )14--____ are you doing for vacation, Jack –I’m going to Tibet for a week A What B When C How D Who( )15 “I’m flying to Hainan Island for my vacation this summer” “Wonderful!____” A Have a good time B I hope so C Why not D With pleasure ( )16—How about ____ fishing there—That’s a good idea A go B going C to go D goes ( )17--Where is your daughter, Mary –In her study She _____the Internet A surfs B surf C surfed D is surfing句型 18You should eat something 否定句 You ________ _____ ________。19 She’s not feeling well( 改为一般现在时) She _______ ______ well 20 I think he can do it 否定句I _______ think he can do it21She is going in December 划线提问_______ _______ she ________ 22We’re going to Wuhan on September the 15th 划线提问 _____ _____ you going to Wuhan23 Tom sometimes watches TV用now来改写句子 Tom _____ _______ TV now用括号内所给的词的正确形式填空24My____lifestyle helps me get good grades (health)25He is kind of unhealthy He ___ever exercises (hard)26 You should ________some hot tea with honey (drink) 27 You look too _________out (stress)28 Mom _________ me to eat more vegetables (want)29 Alice is tired and has a lot of _________ (head)30 A cat has four _____________ (foot) 31 What about _____________ every morning (run)32I _________( not think) so 33 _________ (not eat) junk food 34Why not go_________(boat)on the river with me 35 We plan ________ (visit) Tibet next year 36give, get, need, believe, stay1) I ________ it’s important to be polite(礼貌)to others 2) could you ______ me some help3) he has a fever He_______ to see a doctor 4)you will ______ tired of the tiring job5) if you wan _______ healthy, you should take more exercise阅读 Alice and Gina are good friends They are in the same class and sit together After school, they often go home together They have many different habits On weekends, Alice likes to stay at home watching TV or sleeping But Gina often goes out to exercise Alice eats junk food every day, although she knows it is bad for her health Gina likes junk food, too She only eats it once a week, because she thinks eating less junk food can help her to keep in good heathToday is Alice’s birthday Alice thinks Gina will buy some junk food for her But in fact, Gina buys her a book It is about how to keep healthy42 Who is Gina 43 Do they have the same habits 44 What does Alice like to eat every day 45 What does Gina like to do on weekends 46 What does Gina buy for Alice 完成下列句子,每空填一词,缩写算一个词。46 关于说英语,有些学生说得挺好。________ _________speaking English, some students speak well47 你怎么了?我背疼。What’s the matter with you I have a __________ __________ 48 我们可以一周练习一两次钢琴。We can practice the piano __________ or __________ a week49 保持健康是很重要的。It’s important to __________ __________ 50.他最喜欢的节目是动物世界。His _________ _ _________ _ is Animal World51 你将和谁去?_______ are you going _____ Units 3~4 选择1 Where _____ you going for vacation A are B were C do D did2 She often goes shopping school _____ her bike A with B on C by D in3 You are going to Hawaii _____ sounds nice A You B The C That D This4 How long are you going to Tibet I’m going there _____ a week A about B in C on D for5 I’m _____ my friend in Hong Kong for vacation A looking B visiting C watching D going6 ___is it from Wuhan to Nanjing It’s about …Sorry, I don’t knowAHow long BHow soon CHow far DHow often7 In China it depends _____ where you are A on B in C of D off8 ___ are you staying For about four days A How soon B How often C How long D How many9 This year I want to do____A something different Bdifferent somethingCanything different Ddifferent anything10 She says that she is very tired , and she needs a rest She wants___exciting vacationAa Bthe C/ D an11 --____ does she get to school – she usually gets to school by bike A what B when C why D how 12 You can ____ a map when you want to travel to a city A see B look at C read D look for 13---how do you come here You look tired---____ A On bike B By bike C By car D in train 14It will ___ you an hour to fly to England from Hong Kong A spend B take C spends D takes 15Jim doesn’t come to school ___ bike He comes ___his father’s car A on; by B by; by C by; in D on; in 16There ___ a large number of books in the library A is B are C has D have17 --__ do you think of your school life --it’s boring A what B how C why D when 18 ---how long does it take ---I don’t knowit doesn’t depend ___ me A on B in C of D with二、用括号内所给的词的正确形式填空(10分)19 A lot of __________ visit the Great Wall every day (tour)20 I finished _________ my last movie yesterday (make)21 Things are __________ in other parts of the world (difference)22 There are many ways of _______ the work (do)23 I’m _________________ to spend time in the beautiful countryside (plan)24 How do you go to work every day I go to work on _______________ (feet)25 He is _________________ next week and staying until September (leave)26I walk to the zoo once a year 划线提问 _____ ____ _____ go to the zoo once a year 27 I takes 8 minutes to get to school 划线提问 _____ _____ _____ it take to get to school 28 My home is 1 kilometre from here 划线提问_____ _____ _____ your home ____ ____ 29 we often walk home= we often _____ _____ _____ _____ 同义句转换30.Let’s go fishing on Sunday = _____ _____ _____ fishing on Sunday 同义句转换31 My mother has lunch at the factory every day 改为否定句My mother ____ ____ lunch at the factory every day32 ______ _____( 不是所有的) students go to school on the bike 三从方框中选择适当的句子填空,补全对话。A: Where do you live B: _______ (41)A: _______(42) B: I think it is, but my grandfather says it is not far at all !A: _______ (43) B: No , sometimes I ride to school but I often walk to school My grandfather asks me to walk A: _______ (44) B: You are right , although I don’t want to keep this good habit A: _______ (45) B: You know , it takes me a lot of time to get to school 四、根据中文意思,完成下列句子,每空填一词,缩写算一个词。46.早上他怎样到达学校? How does he __________ __________ school in the morning 47.戴维计划散散步、钓鱼和骑自行车旅行。Dave plans to _______ _______ , to go fishing and to go bike riding 48 你住处离车站有多远?__________ __________ do you live from the bus station49 别忘了寄一张明信片给我。Don’t forget to __________________ me a __________________ 50.我通常乘公共汽车上学。 I usually go to school _________ _________ 五、完形填空(每小题1分,共10分) It 51fine yesterday Lily and I went to 52 Fujian MuseumIt is 53two kilometres from my home So we decided to go there 54bike We left 55 8 o’clock At the museum we56 many photos and other things 57learned a lotThere we saw 58 children with their parents, students 59 their teachers At ten o’clock we left the museum60 home We had a good time today ( ) 51 A is B were C are D was ( ) 52 Avisit Bvisited Cis visiting Dare visiting( ) 53 A on B to C about D from ( ) 54 A on B by C in D at( ) 55 A at B for C to D in ( ) 56 A see B are seeing C saw D sees( ) 57 A They B We C Our D Us ( ) 58 A a lot B a lots C lots of D a lots of( ) 59 A with B and C or D so ( ) 60 A from B for C at D go答案Units1-3 选择1-5 BADDC 6-10 CAACB 11-15 DAAAA 16-17 BD 句型 18 shouldn’t ,eat , anything 19 doesn’t feel 20 don’t 21 when is , going 22 when are 23 is watching用括号内所给的词的正确形式填空24---35 healthy, hardly, drink, stressed, wants, headaches, feet, running, don’t think, don’t eat, boating, to visit36 believe, give, needs, get, stay阅读42 she’s Alice’s friend 43 No, they have different habits 44Junk food 45 she often goes out to exercise 46 A book Unit 3-4 选择 1-5 ABCDB 6-10 CACAD 11-15 DABBC 16-18 AAA用括号内所给的词的正确形式填空 19 tourists 20 making 21 different 22 doing 23 planning 24 foot 25 leaving 26 how do you 27 how long does 28 how far is, from here 29 go home on foot 30 what about going 31 doesn’t have 32 Not all 三从方框中选择适当的句子填空,补全对话。41-45 DECFA四、根据中文意思,完成下列句子46 get to 47 take walks 48 how far 49 send, postcard 50 by bus 五、完形填空51-55 DACBA 56-60 CBCAB 八年级上册部分词组Unit Four1get to school 到校 2ride a bike 骑自行车 3take the subway 乘地铁 4take the train 乘火车 5take a bus 乘公共气车\by bus 6take a taxi 乘出租车7walk to school 走到学校 8how far 多远 9bus station 公共气车站\bus stop10have a quick breakfast 匆匆吃过早饭 11leave for 前往12the early bus 早班 13the bus ride 公共气车之行 14at about six –thity 在大约六点半15around the world 全世界 16North America 在北美 17means of transportation 交通方式18a number of / the number of 19on weekends 在周末 20be ill in the hospital 生病住院21a map in Chinese 中文地图 22speak Chinese 讲汉语 23thank you so much 这样感谢你 24don’t worry 不要担心 Unit Five1 来参加我的晚会 come to my party2 在周六下午 on Saturday afternoon3 上钢琴课 have a piano lesson4 去看医生 go to the doctor5 太多家庭作业 too much homework6 谢谢邀请 Thanks for asking7 玩得高兴 have fun 8 去商业街 go to the mall9 棒球比赛 baseball game10 后天 the day after tomorrow11 为考试而学习 study for a test12 多谢邀请 Thanks a lot for the invitation13 在度假期 be on vacation14 保持安静 keep quiet 15 打网球 play tennis16足球比赛football match 17文化俱乐部culture club18 整天 the whole day 19 过来 come over to20 去看牙医 go to the dentist21 来加入我们 Come and join us22 我愿意 I’d love to 23 下一次 another time24 临时照看他的妹妹 babysit his sisterUnit Six1在某些方面in some ways 2看起来一样look the same3 看起来不同 look different4 喜欢参加晚会 enjoy going to the parties5 多于; 超过 more than 6 共用; 共有 in common7 同…一样… as…as8 擅长; 在…方面做得好 be good at9 与…一样 the same as 10使我大笑make me laugh 11 大多数 most of12 与…不同 be different from13 相反的观点 opposite views14 善待孩子们 be good with children15 喜欢讲笑话 enjoy telling jokes16 招聘老师 teacher wanted17 停止讲话 stop talking 18 呆在家 stay at home1 以…开始 begin with2 游泳池 swimming pool3 一起; 总共 all together
1、设置TI=1,是人为的设置了串行发送请求完毕的中断请求标志。但是你并没有致能(es=1)串口中断。实际上你的interrupt5的处理程序也没有写,是空的。(注意这点)
2、你既然没有设置it0=1(跳变触发中断),那么就是IT0=0(低电平触发)。
3、当一个低电平来的时候,就进入你的interrupt0处理程序。并且硬件自动清标记位置。执行完毕 beer=1。
4、这个时候还有一个中断请求标志IT=1,于是产生了中断嵌套。执行完高级中断后,进入低级中断interrupt5。之后是空白。。。。
5、结果就是你描述的:蜂鸣器一直响,数码管停止显示。
不知道我这样描述,你能不能理解。呵呵
“it行业的职业有:程序员和系统分析员、硬件工程师、硬件测试工程师、软件工程师。
IT行业指的是信息技术产业。
信息技术产业,又称信息产业,它是运用信息手段和技术,收集、整理、储存、传递信息情报,提供信息服务,并提供相应的信息手段、信息技术等服务的产业。
信息技术(IT即InformationTechnology)就是感测技术、通信技术、计算机技术和控制技术。也许您不满意这个定义,但这的确是一个又简洁、又具体、又系统、又实用的定义。
89C51/52的中断系统有5个中断源 ,2个优先级,可实现二级中断嵌套 。
1、(P32)可由IT0(TCON0)选择其为低电平有效还是下降沿有效。当CPU检测到P32引脚上出现有效的中断信号时,中断标志IE0(TCON1)置1,向CPU申请中断。
2、(P33)可由IT1(TCON2)选择其为低电平有效还是下降沿有效。当CPU检测到P33引脚上出现有效的中断信号时,中断标志IE1(TCON3)置1,向CPU申请中断。
3、TF0(TCON5),片内定时/计数器T0溢出中断请求标志。当定时/计数器T0发生溢出时,置位TF0,并向CPU申请中断。
4、TF1(TCON7),片内定时/计数器T1溢出中断请求标志。当定时/计数器T1发生溢出时,置位TF1,并向CPU申请中断。
5、RI(SCON0)或TI(SCON1),串行口中断请求标志。当串行口接收完一帧串行数据时置位RI或当串行口发送完一帧串行数据时置位TI,向CPU申请中断。
IE寄存器:
中断允许控制寄存器分为两层结构,第一级结构为中断允许总控制EA,只有当EA处于中断允许状态,中断源中断请求才能够得到允许;当EA处于不允许状态时,无论IE寄存器中其他位处于什么状态,中断源中断请求都不会得到允许。第二级结构为5个中断允许控制位,分别对应5个中断源的中断请求,当对应中断允许控制位为1时,中断源中断请求得到允许。
EX0:外部中断0允许位。EX0=1,允许外部中断0中断;EX0=0,禁止外部中断0中断。当EX0=1( SETB EX0 )时,同时单片机P32引脚上出现中断信号时,单片机中断主程序的执行而“飞”往中断服务子程序,执行完后通过中断返回指令RET 动返回主程序。当EX0=0( CLR EX0)时,即使单片机P32引脚上出现中断信程序也不会从主程序“飞” 出去执行,因为此时单片机的CPU相当于被“堵上了耳朵”,根本接收不到P32引脚上的中断信号,但是这并不表示这个信号不存在。如果单片机的CPU有空查一下TCON中的IE0位,若为1就说明有中断信号出现过。
ET0:T0溢出中断允许位。ET0=1,允许T0中断;ET0=0,禁止T0中断。
EX1:外部中断1允许位。EX1=1,允许外部中断1中断;EX1=0,禁止外部中断1中断。当EX1=1( SETB EX1)时,并且外部P33引脚上出现中断信号时,单片机CPU会中断主程序而去执行相应的中断服务子程序;当EX1=0( CLR EX1)时使外部P33引脚上即使出现中断信号,单片机的CPU也不能中断主程序转而去行中断服务子程序。 [3] 因此,可以这样认为,EX0和EX1是决定CPU能否感觉到外部引脚P32P33上的中断信号的控制位。
ET1:T1溢出中断允许位。ET1=1,允许T1中断;ET1=0,禁止T1中断。
ES:串行中断允许位。ES=1,允许串行口中断;ES=0,禁止串行口中断。
EA:中断总允许位。EA=1,CPU开放中断;EA=0,CPU禁止所有的中断请求。总允许EA好比一个总开关。EA就相当于每家水管的总闸,如果总闸不开,各个龙头即使开了也不会有水;反过来,如果总闸开了而各个分闸没开也不会有水,所当我们想让P32和P33引脚上的信号能够中断主程序则必须将EA位设置为0(CLR EA)。
TCON寄存器:
各位的标识如下:
TF1:定时器1溢出标志位。当定时器1计满溢出时,由硬件使TF1置1,并且申请中断,进入中断服务程序,有硬件自动清0 ,在查询方式下用软件清0
TR1:定时器运行控制位,TR1置1是开启定时器1,TR1置0时关闭定时器1
TF0:定时器0溢出标志位。当定时器0计满溢出时,由硬件使TF0置1,并且申请中断,进入中断服务程序,有硬件自动清0 ,在查询方式下用软件清0
TR0:定时器运行控制位,TR0置1是开启定时器0,TR0置0时关闭定时器0
IE1:外部中断1请求标志位。
IT1:外部中断1触发方式选择位。当IT1置0时,为低电平触发;当IT1置1时,为下降沿触发。
IE0:外部中断0请求标志位。
IT0:外部中断0触发方式选择位。当IT0置0时,为低电平触发;当IT0置1时,为下降沿触发。
51单片机外部中断响应条件:
1、中断源有中断请求;
2、中断源的中断允许位为1(设置IE寄存器相关位);
3、CPU开中断(设置IE寄存器开中断,即EA=1)
CPU时序的有关知识:
振荡周期:为单片机提供定时信号的振荡源的周期(晶振周期或外加振荡周期)
状态周期:2个振荡周期为1个状态周期,用S表示。
机器周期:1个机器周期含6个状态周期,12个振荡周期。
指令周期:完成1条指令所占用的全部时间,它以机器周期为单位。
定时器的其他知识点:
1、51单片机有两组定时器/计数器,因为既可以定时,又可以计数,故称之为定时器/计数器。
2、定时器/计数器和单片机的CPU是相互独立的。定时器/计数器工作的过程是自动完成的,不需要CPU的参与。
3、51单片机中的定时器/计数器是根据机器内部的时钟或者是外部的脉冲信号对寄存器中的数据加1。
4、有了定时器/计数器之后,可以增加单片机的效率,一些简单的重复加1的工作可以交给定时器/计数器处理。CPU转而处理一些复杂的事情。同时可以实现精确定时作用。
与定时器/计数器有关的寄存器:
1、TMOD寄存器
2、TCON寄存器
3、IE寄存器
4、THx/TL寄存器
工作方式寄存器TMOD:
工作方式寄存器TMOD用于设置定时/计数器的工作方式,低四位用于T0,高四位用于T1。其格式如下:
M1M0:工作方式设置位。定时/计数器有四种工作方式。一般我们厅方式1和方式2:
控制寄存器TCON:
TCON的低4位用于控制外部中断,已在前面介绍。TCON的高4位用于控制定时/计数器的启动和中断申请。其格式如下:
TF1(TCON7):T1溢出中断请求标志位。T1计数溢出时由硬件自动置TF1为1。CPU响应中断后TF1由硬件自动清0。T1工作时,CPU可随时查询TF1的状态。所以,TF1可用作查询测试的标志。TF1也可以用软件置1或清0,同硬件置1或清0的效果一样。
TR1(TCON6):T1运行控制位。TR1置1时,T1开始工作;TR1置0时,T1停止工作。TR1由软件置1或清0。所以,用软件可控制定时/计数器的启动与停止。
TF0(TCON5):T0溢出中断请求标志位,其功能与TF1类同。
TR0(TCON4):T0运行控制位,其功能与TR1类同。
IE中断开关寄存器:
用于开启cpu中断和对应的中断位。
THx和TL定时/计数存储寄存器:
THx存储高8位数据,TLx存储低8位数据。
定时器/计算器初值计数公式:
计数个数与计数初值的关系为:X=2^n-N
N是需要计数的值;n与设置定时器/计数器的工作方式有关(可能为8、13、16);X是需要设置在THx和TLx的初值。
使用定时器/计算器的初始化流程:
1、对TMOD赋值,以确定T0和T1的工作方式。
2、计算初值,并将其写入TH0、TL0或TH1、TL1。
3、中断方式选择,则对EA赋值,开放定时器中断。
4、使TR0或TR1置位,启动定时/计数器定时或计数。
以上就是关于51单片机的默认优先级是INT0>IT0>INT1>IT1>PS 但是为什么在使用的时候好像不起作用啊!要使用IP进行重设全部的内容,包括:51单片机的默认优先级是INT0>IT0>INT1>IT1>PS 但是为什么在使用的时候好像不起作用啊!要使用IP进行重设、51单片机外部中断0响应中断程序的时候IT0被硬件置0,要是再来一个中断信号不是就不能响应了吗、八年级英语上册风向标二单元六课时答案等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)