|
ATmega16老板子,8MHz晶振,焊线接出ISP下载接口与AVR-ISP下载器对接,通过Arduino下载启动程序。
下载启动程序时开发板设置:
下载结果如下:
avrdude: Version 7.2-arduino.1
Copyright the AVRDUDE authors;
see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Arduino\portable\packages\MightyCore\hardware\avr\3.0.1\avrdude.conf
Using Port : usb
Using Programmer : usbasp
AVR Part : ATmega16
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : possible i/o
RETRY pulse : SCK
Serial program mode : yes
Parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Alias Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 4 20 128 0 no 512 4 0 9000 9000 0xff 0xff
flash 33 10 128 0 yes 16384 128 128 4500 4500 0xff 0x00
lfuse 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00
signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00
calibration 0 0 0 0 no 4 1 0 0 0 0x00 0x00
Programmer Type : usbasp
Description : USBasp ISP and TPI programmer
avrdude: auto set sck period (because given equals null)
avrdude usbasp_spi_set_sck_period() error: cannot set sck period; please check for usbasp firmware update
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e9403 (probably m16)
avrdude: erasing chip
avrdude: auto set sck period (because given equals null)
avrdude usbasp_spi_set_sck_period() error: cannot set sck period; please check for usbasp firmware update
avrdude: processing -U lock:w:0xff:m
avrdude: reading input file 0xff for lock
with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte lock ...
avrdude: 1 byte of lock written
avrdude: verifying lock memory against 0xff
avrdude: 1 byte of lock verified
avrdude: processing -U efuse:w:{bootloader.extended_fuses}:m
avrdude do_op() warning: skipping -U efuse:... as memory not defined for part ATmega16
avrdude: processing -U hfuse:w:0b11000111:m
avrdude: reading input file 0b11000111 for hfuse
with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte hfuse ...
avrdude: 1 byte of hfuse written
avrdude: verifying hfuse memory against 0b11000111
avrdude: 1 byte of hfuse verified
avrdude: processing -U lfuse:w:0b10111111:m
avrdude: reading input file 0b10111111 for lfuse
with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte lfuse ...
avrdude: 1 byte of lfuse written
avrdude: verifying lfuse memory against 0b10111111
avrdude: 1 byte of lfuse verified
avrdude done. Thank you.
C:\Arduino\portable\packages\MightyCore\tools\avrdude\7.2-arduino.1/bin/avrdude -CC:\Arduino\portable\packages\MightyCore\hardware\avr\3.0.1/avrdude.conf -v -patmega16 -cusbasp -Uflash:w:C:\Arduino\portable\packages\MightyCore\hardware\avr\3.0.1/bootloaders/empty/empty.hex:i -Ulock:w:0xff:m
avrdude: Version 7.2-arduino.1
Copyright the AVRDUDE authors;
see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Arduino\portable\packages\MightyCore\hardware\avr\3.0.1\avrdude.conf
Using Port : usb
Using Programmer : usbasp
AVR Part : ATmega16
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : possible i/o
RETRY pulse : SCK
Serial program mode : yes
Parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Alias Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 4 20 128 0 no 512 4 0 9000 9000 0xff 0xff
flash 33 10 128 0 yes 16384 128 128 4500 4500 0xff 0x00
lfuse 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00
signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00
calibration 0 0 0 0 no 4 1 0 0 0 0x00 0x00
Programmer Type : usbasp
Description : USBasp ISP and TPI programmer
avrdude: auto set sck period (because given equals null)
avrdude usbasp_spi_set_sck_period() error: cannot set sck period; please check for usbasp firmware update
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e9403 (probably m16)
avrdude: Note: flash memory has been specified, an erase cycle will be performed.
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: auto set sck period (because given equals null)
avrdude usbasp_spi_set_sck_period() error: cannot set sck period; please check for usbasp firmware update
avrdude: processing -U flash:w:C:\Arduino\portable\packages\MightyCore\hardware\avr\3.0.1/bootloaders/empty/empty.hex:i
avrdude: reading input file C:\Arduino\portable\packages\MightyCore\hardware\avr\3.0.1/bootloaders/empty/empty.hex for flash
with 0 bytes in 0 sections within [0, -1]
using 0 pages and 0 pad bytes
avrdude: writing 0 bytes flash ...
Writing | ################################################## | 100% 0.00s
avrdude: 0 bytes of flash written
avrdude: verifying flash memory against C:\Arduino\portable\packages\MightyCore\hardware\avr\3.0.1/bootloaders/empty/empty.hex
Reading | ################################################## | 100% 0.00s
avrdude: 0 bytes of flash verified
avrdude: processing -U lock:w:0xff:m
avrdude: reading input file 0xff for lock
with 1 byte in 1 section within [0, 0]
avrdude: writing 1 byte lock ...
avrdude: 1 byte of lock written
avrdude: verifying lock memory against 0xff
avrdude: 1 byte of lock verified
avrdude done. Thank you.
而后拆下ISP下载器连接,将TX、RX接入CH340G的RX、TX,M16的RST通过100u接入CH340G的RTS,然后尝试下载Arduino程序,
用串口下载时,开发板设置:
结果如下:
avrdude: Version 7.2-arduino.1
Copyright the AVRDUDE authors;
see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is C:\Arduino\portable\packages\MightyCore\hardware\avr\3.0.1\avrdude.conf
Using Port : COM21
Using Programmer : urclock
Overriding Baud Rate : 57600
avrdude urclock_getsync() warning: attempt 1 of 10: not in sync
avrdude urclock_getsync() warning: attempt 2 of 10: not in sync
avrdude urclock_getsync() warning: attempt 3 of 10: not in sync
avrdude urclock_getsync() warning: attempt 4 of 10: not in sync
avrdude urclock_getsync() warning: attempt 5 of 10: not in sync
avrdude urclock_getsync() warning: attempt 6 of 10: not in sync
avrdude urclock_getsync() warning: attempt 7 of 10: not in sync
avrdude urclock_getsync() warning: attempt 8 of 10: not in sync
avrdude urclock_getsync() warning: attempt 9 of 10: not in sync
avrdude urclock_getsync() warning: attempt 10 of 10: not in sync
avrdude urclock_recv() warning: programmer is not responding; try -xstrict and/or vary -xdelay=100
avrdude main() error: unable to open programmer urclock on port COM21
avrdude done. Thank you.
选择的串口
不存在或开发板没有连接
有尝试下面做法,均无效:
1、怀疑RXTX接错,对调无效。
2、M16在下载时碰GND进行人工复位,无效。
3、烧录启动程序时选择低波特率如9600、4800均无效。
为什么会出现这样的问题,难道M16不支持Arduino?请高手指教一下,谢谢!
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
|