dis*_*ame 8 microcontroller avr avrdude
嗯..我一直在网上搜索很多角落..但我找不到解决问题的办法.上次我使用AVRISP2时效果很好.现在,当我尝试在uC上编写程序时,我收到以下消息:
avrdude: stk500v2_command(): command failed
avrdude: stk500v2_program_enable(): bad AVRISPmkII connection status: Unknown status 0x00
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
Run Code Online (Sandbox Code Playgroud)
我在互联网上发现了很多帖子,但没有任何解决方案.有谁知道问题可能是什么?
我已经检查了引脚,我更新了ISP的固件(blinkdemo工作).
谢谢你的任何提示..
我和我的一些朋友花了很多时间,但经过几个小时的搜索,尝试和"调试",我们能够解决问题.我希望这可以帮助其他有同样问题解决问题的人.
问题是ISP(在我的情况下是USB-Prog 3.3)与我的Atmega8谈得太快了,而Atmega8只能以1MHz的速度运行.所以有两种可能的解决方案:
我在哪里红,ISP不能快于底层微控制器速度的1/4.
以下几行节省了我的一天:
它将Atmega8设置为8MHz,并为其提供64ms的频率.
avrdude -p atmega8 -P usb -c avrispv2 -U lfuse:w:0xe4:m -U hfuse:w:0xd9:m -B 22
Run Code Online (Sandbox Code Playgroud)
以下是avrdude手册的摘录:
`-B BITCLOCK'
Specify the bit clock period for the JTAG interface or the ISP
clock (JTAG ICE only). The value is a floating-point number in
microseconds. The default value of the JTAG ICE results in about
1 microsecond bit clock period, suitable for target MCUs running
at 4 MHz clock and above. Unlike certain parameters in the
STK500, the JTAG ICE resets all its parameters to default values
when the programming software signs off from the ICE, so for MCUs
running at lower clock speeds, this parameter must be specified on
the command-line.
Run Code Online (Sandbox Code Playgroud)
此外,我想推荐Android版AVR保险丝计算器 - 它似乎是微控制器程序员非常有用的工具.