华中科技大学51单片机应用与语言程序设计课件总纲.ppt

华中科技大学51单片机应用与语言程序设计课件总纲.ppt

  1. 1、本文档共54页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
华中科技大学51单片机应用与语言程序设计课件总纲

* Discuss the pushbutton, and how each terminal corresponds to two pins. Discuss pushbutton theory of operation. Review how the pushbutton shorts the terminals. Discuss what P3 is supposed to sense depending on whether the pushbutton is pressed or not. Emphasize that the white lines are artifacts of the drawing. * Explain that the DEBUG command will be used to monitor the state of IN3, which is a special variable that holds a 1 when it senses Vdd and a 0 when it senses Vss. Ask them what effect PAUSE has. Make sure that they understand that the pushbutton will only be checked every ? second by design. Mention that serial port buffer overload is an issue for many PCs. * Suggest that they reopen FlashLed.bs2, and modify the contents of the DO…LOOP according to what’s shown. Remind them to rename it. This time, it’s PushbuttonControlledLed.bs2 Explain how the IF statement is used to make decisions. * Explain that they can add specific conditions using the ELSEIF keyword. After they appear to understand this code segment, explain the problem about pressing and holding both pushbuttons. Show them this program in the stamp editor and have them think about how to detect if both pushbuttons are pressed. Explain that that is yet another way IF…ELSEIF…ELSE can be used. Explain that time will probably not permit, but there is also a reaction timer game that involves an LED that changes color and a program that tracks how long it takes between the time the LED changes color and the user lets go of the pushbutton. Open WAM and show how the chapters are split into activities. Explain that the first activity is usually a hands-on, minimal or no programming exercise. The last activity is typically an application example that involves something fun and interactive for the students, such as a reaction timer game. * Introduce that the Debug Terminal can be used to send messages to the BASIC Stamp as well as display messages from the BASIC Stamp. Explain that the DEBUGIN comman

文档评论(0)

aena45 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档