没有合适的资源?快使用搜索试试~ 我知道了~
单片机实验报告——LED灯控制器.doc
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 176 浏览量
2022-07-04
14:12:55
上传
评论
收藏 325KB DOC 举报
温馨提示
试读
14页
单片机实验报告——LED灯控制器
资源推荐
资源详情
资源评论
problems that cannot be ignored. Some leaders unwilling to do masses work, masses concept weak, on masses feelings not deep, pendulum not are with masses of relationship, think masses work is revolutionary war era of things, now obsolete has, buried business work, ignored masses work of situation compared General; some leaders not do masses work, old method regardless of with, new not with, not understand masses psychological, not understand masses wishes, not said masses language, work method simple stiff, caused masses of conflict and antipathy; some leaders can't do masses work, Faced with a lot of contradictions among the people worry about fear, panic set in encounter group events, and some are even mismanaged, inflame, so work has suffered heavy losses, and so on. These problems we are soberly aware, enhancing the party's ruling capability, the maintenance and development of the party's advanced nature and purity, and to enhance the ability of party
committees and leading cadres are good people. Attach great importance to and is good at doing mass work, has become the new urgent situation strengthening the party's governing capacity-building tasks. Combined practice of maintaining flesh-and-blood ties with the masses, urged the broad masses of party members and cadres, especially all levels ... Processing to improve as a guide to the country. "" What I did is summed up these new things, be promoted. "This is a vivid manifestation of the Deng Xiaoping's mass. Deng also put people "support does not support", "agreed not to agree", "happy happy", "promise not to promise" as a starting point and destination of developing guidelines, policies, and as the only standard for measuring compliance with the wishes of the masses of the people. Under the guidance of Deng Xiaoping theory, Central Government adopted a series of important measures to strengthen links with the masses. In December 1989, the CPC Central
Committee made on adhering to and perfecting the system of multi-party cooperation and political consultation under the leadership of the Chinese Communist Party, closely for CPC and the democratic parties and the relationship between the part of the masses that they contact, effectively carrying out the mass line, played a positive role. In March 1990, the 13 plenary session adopted the decision on strengthening contacts with the masses of the Party noted that "created and developed in the long struggle of the party's mass line, is to realize the party's ideological line, the fundamental political and organizational work route", can always maintain flesh-and-blood ties and development of the masses, is directly related to the rise and fall of the rise and fall of the party and State. In September 1994, 14 adopted by the plenary session of the Party on strengthening decision on several major issues of party building. The requirements of the decision of the party's leading bodies and
leading cadres should develop a democratic style of work, come from the masses, to the masses, together, stick to the mass line. Party of 13 session four in the plenary yihou, to Jiang comrade for core of party
of third generation Central led collective, banner Deng Xiao-ping's theory great flag, insisted liberation thought, and facts, and times, in both at home and abroad political storm, and economic risk, severe test before, relies on party and people, defended China features Socialist, created socialist market new system, created full open new situation, advance party of construction new of great engineering, founded "three a representative" important thought, Continue to steer the ship of reform and opening up forward on the right. Comrade Jiang Zemin said: "strengthening and improving the party's mass work in the new situation, it is of decisive significance to consolidating the ruling Foundation of the party. "Through our party and some of the world's major lessons learned from the success of the old party of the party, Comrade Jiang Zemin pointed out:" the biggest political advantage of our party is in close contact with the masses, the most dangerous after the ruling party was divorced
from the masses. "He said:" our reform and construction, only the understanding, support and participation of the people, people's enthusiasm and creativity into full play in order to advance; the leadership of the party, only the tie and win the masses embraced, can be consolidated and strengthened. "He pointed out that strengthening and improving the party's work style construction, maintaining the party's flesh-and-blood ties with the masses is the core problem, the key is to do solid work, implement, resolutely oppose and overcome formalism. Comrade Jiang Zemin stressed that all the work and policies of the party, are in compliance with the fundamental interests of the overwhelming majority of the people to the highest degree, to the majority of people are not satisfied with the fundamental guidelines, strive to make our workers, farmers, intellectuals and other people enjoy ... Single, everyone seemed to know. But well known does not mean perfect. Some party members and
leading cadres, consider contacting their small departments, within a small circle of people, or contact individual owners, the entrepreneur, is the masses, this idea is obviously not correct. The Communist Party of China, people should have three characteristics. First, the people should be the most social, is a Department within the scope of the majority. Specific to the party and Government departments, especially the cadres working in the Central and State organs, mass is the 1.3 billion Chinese people, work for the party members and cadres, masses are the land within the jurisdiction of the common people. The second characteristic of the masses, is that we have common interests. Masses are manifestations of each specific people, but the crowd is a comprehensive political concept, refers to people with common political and economic interests in the period of social transformation, social differentiation between the interests of the masses is large, if you do not find the
interest in doing mass work, the party members and cadres, will be in a passive position. The third characteristic of the masses
《微机实验》报告
实验名称: LED 灯控制器
指导教师:刘小英
专业班级 :光电 1310
姓名:陈艺天
学号:U201314333
联系方式:18608410805
一、 任务要求
实验目的:加深对定时/计数器、中断、IO 端口的理解,掌握定时/计数器、中断的应
用编程技术及中断程序的调试方法。
实验内容:利用 C8051F310 单片机设计一个 LED 灯控制器
主要功能和技术指标要求:
1. LED 灯外接于 P0.0 端。
2. LED 灯分别按 2Hz,1Hz 和 0.5Hz 三种不同频率闪动,各持续 10s。
3. 在 LED 灯开始和停止闪烁时蜂鸣器分别鸣响 1 次。
problems that cannot be ignored. Some leaders unwilling to do masses work, masses concept weak, on masses feelings not deep, pendulum not are with masses of relationship, think masses work is revolutionary war era of things, now obsolete has, buried business work, ignored masses work of situation compared General; some leaders not do masses work, old method regardless of with, new not with, not understand masses psychological, not understand masses wishes, not said masses language, work method simple stiff, caused masses of conflict and antipathy; some leaders can't do masses work, Faced with a lot of contradictions among the people worry about fear, panic set in encounter group events, and some are even mismanaged, inflame, so work has suffered heavy losses, and so on. These problems we are soberly aware, enhancing the party's ruling capability, the maintenance and development of the party's advanced nature and purity, and to enhance the ability of party
committees and leading cadres are good people. Attach great importance to and is good at doing mass work, has become the new urgent situation strengthening the party's governing capacity-building tasks. Combined practice of maintaining flesh-and-blood ties with the masses, urged the broad masses of party members and cadres, especially all levels ... Processing to improve as a guide to the country. "" What I did is summed up these new things, be promoted. "This is a vivid manifestation of the Deng Xiaoping's mass. Deng also put people "support does not support", "agreed not to agree", "happy happy", "promise not to promise" as a starting point and destination of developing guidelines, policies, and as the only standard for measuring compliance with the wishes of the masses of the people. Under the guidance of Deng Xiaoping theory, Central Government adopted a series of important measures to strengthen links with the masses. In December 1989, the CPC Central
Committee made on adhering to and perfecting the system of multi-party cooperation and political consultation under the leadership of the Chinese Communist Party, closely for CPC and the democratic parties and the relationship between the part of the masses that they contact, effectively carrying out the mass line, played a positive role. In March 1990, the 13 plenary session adopted the decision on strengthening contacts with the masses of the Party noted that "created and developed in the long struggle of the party's mass line, is to realize the party's ideological line, the fundamental political and organizational work route", can always maintain flesh-and-blood ties and development of the masses, is directly related to the rise and fall of the rise and fall of the party and State. In September 1994, 14 adopted by the plenary session of the Party on strengthening decision on several major issues of party building. The requirements of the decision of the party's leading bodies and
leading cadres should develop a democratic style of work, come from the masses, to the masses, together, stick to the mass line. Party of 13 session four in the plenary yihou, to Jiang comrade for core of party
of third generation Central led collective, banner Deng Xiao-ping's theory great flag, insisted liberation thought, and facts, and times, in both at home and abroad political storm, and economic risk, severe test before, relies on party and people, defended China features Socialist, created socialist market new system, created full open new situation, advance party of construction new of great engineering, founded "three a representative" important thought, Continue to steer the ship of reform and opening up forward on the right. Comrade Jiang Zemin said: "strengthening and improving the party's mass work in the new situation, it is of decisive significance to consolidating the ruling Foundation of the party. "Through our party and some of the world's major lessons learned from the success of the old party of the party, Comrade Jiang Zemin pointed out:" the biggest political advantage of our party is in close contact with the masses, the most dangerous after the ruling party was divorced
from the masses. "He said:" our reform and construction, only the understanding, support and participation of the people, people's enthusiasm and creativity into full play in order to advance; the leadership of the party, only the tie and win the masses embraced, can be consolidated and strengthened. "He pointed out that strengthening and improving the party's work style construction, maintaining the party's flesh-and-blood ties with the masses is the core problem, the key is to do solid work, implement, resolutely oppose and overcome formalism. Comrade Jiang Zemin stressed that all the work and policies of the party, are in compliance with the fundamental interests of the overwhelming majority of the people to the highest degree, to the majority of people are not satisfied with the fundamental guidelines, strive to make our workers, farmers, intellectuals and other people enjoy ... Single, everyone seemed to know. But well known does not mean perfect. Some party members and
leading cadres, consider contacting their small departments, within a small circle of people, or contact individual owners, the entrepreneur, is the masses, this idea is obviously not correct. The Communist Party of China, people should have three characteristics. First, the people should be the most social, is a Department within the scope of the majority. Specific to the party and Government departments, especially the cadres working in the Central and State organs, mass is the 1.3 billion Chinese people, work for the party members and cadres, masses are the land within the jurisdiction of the common people. The second characteristic of the masses, is that we have common interests. Masses are manifestations of each specific people, but the crowd is a comprehensive political concept, refers to people with common political and economic interests in the period of social transformation, social differentiation between the interests of the masses is large, if you do not find the
interest in doing mass work, the party members and cadres, will be in a passive position. The third characteristic of the masses
4. 利用单片机内部定时器定时,要求采用中断方式。
提高要求:
使用按键(KINT)控制 LED 灯闪烁模式的切换。
二、 设计思路
C8051F310 单片机片上晶振为 24.5MHz,采用 8 分频后为 3.0625MHz ,输入时钟信
号为 48 个机器周期,所以 T1 定时器采用定时方式 1,单次定时最长可以达到的时间为
1.027s,可以满足 0.5Hz 是的定时要求。
基础部分:
给 TMOD 赋值 10H,即选用 T1 定时器采用定时方式 1,三种频率对应的半周期时
间为 0.25s、0.5s、1s。计算得需给 TH1 和 TL1 为 C1H、B1H;83H、63H;06H、C6H。
要使闪烁持续 10s,三种模式需要各循环 40、20、10 次。
用 LOOP3:MOV C,PSW.5 ;PSW.5 为标志位,进定时器中断后置一
JNC LOOP3
代替踏步程序等待中断,以便中断完后回到主程序继续向下执行。
为了减少代码长度,可以采用循环结构,循环主题中,将 R1、R2 分别赋给 TH1、
TL1,R7 为循环次数(用 DJNZ 语句实现);定时中断里,重新给 TH1、TL1 赋值时同理。
这样,循环时只要把定时时间和循环次数赋给 R1、R2、R7 即可,达到减少代码长度的
效果。
蜂鸣器也采用 T1 定时方式 1,定时一秒。
三、 资源分配
P0.0:为 LED 灯控制端口,高电平触发。
P3.1:为蜂鸣器控制端口,高电平触发。
P0.1:为 KINT 键控制端口,下降沿触发。
R1、R2:用于存放计时器计时数据,R1 赋给 TH1、R2 赋给 TL1。
R7:存放三种模式的循环次数。
R0:在外部中断程序中赋值,用于判断采用何种模式。
PSW.1:为标志位,用于等待定时器中断,中断执行完清零,并在中断处向下继续执
problems that cannot be ignored. Some leaders unwilling to do masses work, masses concept weak, on masses feelings not deep, pendulum not are with masses of relationship, think masses work is revolutionary war era of things, now obsolete has, buried business work, ignored masses work of situation compared General; some leaders not do masses work, old method regardless of with, new not with, not understand masses psychological, not understand masses wishes, not said masses language, work method simple stiff, caused masses of conflict and antipathy; some leaders can't do masses work, Faced with a lot of contradictions among the people worry about fear, panic set in encounter group events, and some are even mismanaged, inflame, so work has suffered heavy losses, and so on. These problems we are soberly aware, enhancing the party's ruling capability, the maintenance and development of the party's advanced nature and purity, and to enhance the ability of party
committees and leading cadres are good people. Attach great importance to and is good at doing mass work, has become the new urgent situation strengthening the party's governing capacity-building tasks. Combined practice of maintaining flesh-and-blood ties with the masses, urged the broad masses of party members and cadres, especially all levels ... Processing to improve as a guide to the country. "" What I did is summed up these new things, be promoted. "This is a vivid manifestation of the Deng Xiaoping's mass. Deng also put people "support does not support", "agreed not to agree", "happy happy", "promise not to promise" as a starting point and destination of developing guidelines, policies, and as the only standard for measuring compliance with the wishes of the masses of the people. Under the guidance of Deng Xiaoping theory, Central Government adopted a series of important measures to strengthen links with the masses. In December 1989, the CPC Central
Committee made on adhering to and perfecting the system of multi-party cooperation and political consultation under the leadership of the Chinese Communist Party, closely for CPC and the democratic parties and the relationship between the part of the masses that they contact, effectively carrying out the mass line, played a positive role. In March 1990, the 13 plenary session adopted the decision on strengthening contacts with the masses of the Party noted that "created and developed in the long struggle of the party's mass line, is to realize the party's ideological line, the fundamental political and organizational work route", can always maintain flesh-and-blood ties and development of the masses, is directly related to the rise and fall of the rise and fall of the party and State. In September 1994, 14 adopted by the plenary session of the Party on strengthening decision on several major issues of party building. The requirements of the decision of the party's leading bodies and
leading cadres should develop a democratic style of work, come from the masses, to the masses, together, stick to the mass line. Party of 13 session four in the plenary yihou, to Jiang comrade for core of party
of third generation Central led collective, banner Deng Xiao-ping's theory great flag, insisted liberation thought, and facts, and times, in both at home and abroad political storm, and economic risk, severe test before, relies on party and people, defended China features Socialist, created socialist market new system, created full open new situation, advance party of construction new of great engineering, founded "three a representative" important thought, Continue to steer the ship of reform and opening up forward on the right. Comrade Jiang Zemin said: "strengthening and improving the party's mass work in the new situation, it is of decisive significance to consolidating the ruling Foundation of the party. "Through our party and some of the world's major lessons learned from the success of the old party of the party, Comrade Jiang Zemin pointed out:" the biggest political advantage of our party is in close contact with the masses, the most dangerous after the ruling party was divorced
from the masses. "He said:" our reform and construction, only the understanding, support and participation of the people, people's enthusiasm and creativity into full play in order to advance; the leadership of the party, only the tie and win the masses embraced, can be consolidated and strengthened. "He pointed out that strengthening and improving the party's work style construction, maintaining the party's flesh-and-blood ties with the masses is the core problem, the key is to do solid work, implement, resolutely oppose and overcome formalism. Comrade Jiang Zemin stressed that all the work and policies of the party, are in compliance with the fundamental interests of the overwhelming majority of the people to the highest degree, to the majority of people are not satisfied with the fundamental guidelines, strive to make our workers, farmers, intellectuals and other people enjoy ... Single, everyone seemed to know. But well known does not mean perfect. Some party members and
leading cadres, consider contacting their small departments, within a small circle of people, or contact individual owners, the entrepreneur, is the masses, this idea is obviously not correct. The Communist Party of China, people should have three characteristics. First, the people should be the most social, is a Department within the scope of the majority. Specific to the party and Government departments, especially the cadres working in the Central and State organs, mass is the 1.3 billion Chinese people, work for the party members and cadres, masses are the land within the jurisdiction of the common people. The second characteristic of the masses, is that we have common interests. Masses are manifestations of each specific people, but the crowd is a comprehensive political concept, refers to people with common political and economic interests in the period of social transformation, social differentiation between the interests of the masses is large, if you do not find the
interest in doing mass work, the party members and cadres, will be in a passive position. The third characteristic of the masses
行程序。
PSW.5:为标志位,用于判断执行一种中断还是三种,在外部中断程序中改变。
四、 流程图
1.主程序流程图(含提高部分):
剩余13页未读,继续阅读
资源评论
oligaga
- 粉丝: 50
- 资源: 2万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功