|
|
自己画的板子。最小系统如下,晶振为16Mhz,mega2560芯片没有烧bootloader。我试了用下面的程序:
void setup() {
pinMode(A15, OUTPUT); // initialize digital pin A15(PK7) as an output.
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(A15, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(A15, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
结果灯居然亮暗的时间是10几秒,不是1s!后来我就把delay(1000),改为delay(60),用示波器测才大致接近1s。
为什么会出现这种情况?我的mega2560芯片没有烧bootloader,是不是和这有关? |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|