|
关于arduino定时器,推荐http://letsmakerobots.com/node/28278
里面讲的很详细,简单翻译一些重点。
1,Arduino很多命令要到定时器(Timer)
2,Arduino Uno包含3个定时器
Timer0:
8位
用于指令 delay(), millis() and micros().
Timer1:
16位
 Servo 库使用到
Timer2:
8位
Tone()指令会用到
Timer3, Timer4, Timer5:
16位
Timer 3,4,5只有Arduino Mega有
PWM 相关指令对应
Pins 5 and 6: controlled by timer0(冲突delay()指令)
Pins 9 and 10: controlled by timer1
Pins 11 and 3: controlled by timer2
|
|