极客工坊

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 21470|回复: 8

ATMEGA88-20PU能不能烧arduino的bootloader?

[复制链接]
发表于 2013-12-2 23:01:57 | 显示全部楼层 |阅读模式
本帖最后由 艰苦奋斗 于 2013-12-4 23:32 编辑

最近网上买了块arduino mega2560,看价格应该是山上下来的,不过试过好用,另手上有几天atmega88-20pu的片子,上周焊了个最小系统板,试过各种方法烧bootloader, 用编程器(easypro 90b)、USBISP(zf-007)、arduinoisp都烧过,也试好多个bootloader,但始终连不上arduino ide,是不是arduino就不支持这个芯片?看技术文档,这个atmega88应该和atmega8什么的是差不多的, 用arduinoisp写atmega8的boot的会提示芯片ID错误:
avrdude: Device signature = 0x1e930a
avrdude: Expected signature for ATMEGA8 is 1E 93 07
         Double check chip, or use -F to override this check.
avrdude: Send: Q [51]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]

avrdude done.  Thank you.
有没人办法修改一下这个“ATMEGA8 is 1E 93 07 ”这个信息,使arduino支持atmega88?

以前一直用51,第一次接触AVR和arduino,问题可能比较......,让大家见笑了,请各位高手指点。
回复

使用道具 举报

 楼主| 发表于 2013-12-2 23:04:44 | 显示全部楼层
吐槽一下,论坛的验证吗有点太难认了,我没色弱,居然换了7、8个才填正确
回复 支持 反对

使用道具 举报

发表于 2013-12-3 09:53:22 | 显示全部楼层
可以的,用压缩文件里的ATmegaBOOT_88_ng.hex


具体步骤如图所示

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-12-4 19:57:26 | 显示全部楼层
楼上好人,谢谢,我下来试试。{:soso__17269592215300614061_4:}
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-12-4 20:26:25 | 显示全部楼层
本帖最后由 艰苦奋斗 于 2013-12-4 20:41 编辑

试了一下,加的文件在IDE 1.05不能编译,报错,我再去找一个0022版的试试,有点想念我的STC51了

C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega88 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -IC:\Program Files (x86)\Arduino\hardware\arduino\cores\atmega88 C:\Users\chenrj\AppData\Local\Temp\build4004214757975655122.tmp\Blink.cpp -o C:\Users\chenrj\AppData\Local\Temp\build4004214757975655122.tmp\Blink.cpp.o
Blink.ino:10:21: error: Arduino.h: No such file or directory
Blink.ino: In function 'void setup()':
Blink:15: error: 'OUTPUT' was not declared in this scope
Blink:15: error: 'pinMode' was not declared in this scope
Blink.ino: In function 'void loop()':
Blink:20: error: 'HIGH' was not declared in this scope
Blink:20: error: 'digitalWrite' was not declared in this scope
Blink:21: error: 'delay' was not declared in this scope
Blink:22: error: 'LOW' was not declared in this scope
回复 支持 反对

使用道具 举报

发表于 2013-12-4 21:05:28 | 显示全部楼层
我烧atmega328 bootloader时也遇过 signature问题。至于atmega88,看看下面方法行吗?

修改 ...\arduino-1.0.5\hardware\tools\avr\etc\avrdude.conf文件
大约在8496行,把signature = 0x1e 0x93 0x0f; 更换为你要的signature,应该是 0x1e 0x93 0x07;吧
把文件保存然後重启Arduino IDE
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-12-4 21:22:21 | 显示全部楼层
本帖最后由 艰苦奋斗 于 2013-12-4 22:01 编辑

找了个0022版本,把板子加上去,选ATMAGE88还是不能编译,后来没用压缩包里的boards.txt,直接在原来的boards.txt上加了下面一段:
##############################################################

atmega88.name=Arduino NG or older w/ ATmega88
atmega88.upload.protocol=stk500
atmega88.upload.maximum_size=7168
atmega88.upload.speed=19200
atmega88.bootloader.low_fuses=0xff
atmega88.bootloader.high_fuses=0xdd
atmega88.bootloader.extend_fuses=0xf8
atmega88.bootloader.path=atmega88
atmega88.bootloader.file=ATmegaBOOT_88_ng.hex
atmega88.bootloader.unlock_bits=0x3F
atmega88.bootloader.lock_bits=0x0F
atmega88.build.mcu=atmega88
atmega88.build.f_cpu=16000000L
atmega88.build.core=arduino
##############################################################
这次编译通过了,下载通过,插了个LED试了一下,BLINK测试终于通过,下一步试试能不能在1.05版上用。
回复 支持 反对

使用道具 举报

发表于 2013-12-4 21:42:02 | 显示全部楼层
艰苦奋斗 发表于 2013-12-4 20:26
试了一下,加的文件在IDE 1.05不能编译,报错,我再去找一个0022版的试试,有点想念我的STC51了

C:\Pr ...

boards.txt 是旧的,编辑将会有问题

我弄了了一个,看行吗?
atmegaNG.name=Arduino NG or older w/ ATmega88
atmegaNG.upload.protocol=arduino
atmegaNG.upload.maximum_size=6144
atmegaNG.upload.speed=19200
atmegaNG.bootloader.low_fuses=0xe2
atmegaNG.bootloader.high_fuses=0xdf
atmega88.bootloader.extended_fuses=0x00
atmegaNG.bootloader.path=atmega88
atmegaNG.bootloader.file=ATmegaBOOT_88_ng.hex
atmegaNG.bootloader.unlock_bits=0x3F
atmegaNG.bootloader.lock_bits=0xCF
atmegaNG.build.mcu=atmega88
atmegaNG.build.f_cpu=16000000L
atmegaNG.build.core=arduino
atmegaNG.build.variant=standard

只是加了与更改了
atmegaNG.upload.protocol=arduino
atmegaNG.build.core=arduino
atmegaNG.build.variant=standard
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-12-4 22:04:11 | 显示全部楼层
本帖最后由 艰苦奋斗 于 2013-12-4 22:22 编辑

谢谢楼上的,我自己改了boards.txt文件,现在已经能编译了,下面试试能不能在1.05版本上用,0022版本太老了。
更新:
经过测试,楼上给的在1.05版本上能用,谢谢了,困扰多天的问题终于解决了。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|联系我们|极客工坊

GMT+8, 2026-6-8 16:38 , Processed in 0.038450 second(s), 21 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表