ATtiny2313Timers-Counters.ppt
《ATtiny2313Timers-Counters.ppt》由会员分享,可在线阅读,更多相关《ATtiny2313Timers-Counters.ppt(14页珍藏版)》请在麦多课文档分享上搜索。
1、ATtiny2313 Timers/Counters,CS-423 Dick Steflik,What Do You Use Timers For?,Timing of events (internal or external) Scheduling Events Measuring the width of a pulse Speed control of motors (PWM) Generation of complex waveforms Frequency generation (sounds),The concept of using a timer/counter,Counter
2、s run asynchronously to your code Can be setup to start based on an internal or external event Can generate interrupts Can signal to a pin,Example,To time a piece of code: Initial the counter to 0, have it interrupt on overflow Interrupt handler should count overflows Start the counter Run your code
3、 At end of code read counter and add to number of overflows to get total time,Example,To time an incoming pulse/event: Setup interrupts on rising and falling edge of pulse and overflow of counter In handler for rising edge start counter In handler for overflow, count the overflows In handler for fal
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
| 下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- ATTINY2313TIMERSCOUNTERSPPT
麦多课文档分享所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。



GB T 14245.1-2008 信息技术.汉字编码字符集(基本集).64点阵字型.第1部分 宋体.pdf
2014届重庆一中九年级下学期期中考试政治试卷与答案(带解析).doc

