OS: Windows 7b (but the behaviour is excatly the same as in XP, it's just in Finnish so i thought english error messages would be more helpful.)
Fuses:
hfuse: 0b11011001 (0xD9)
lfuse: 0b11111111 (0xFF)
Controller: Atmega128
XTAL: 4Mhz
Pins:
TINY: CARD:
1 MISO -> TXD
2 VCC -> VCC
3 SCK -> SCK
4 MOSI -> RXD
5 RST -> RESET
6 GND -> GND
The circuit board of my controller looks pretty used in the pictures, but it has worked till now and had working program inside (loaded from stk500 in year 2006) when i started.
The problem is, that the program either does not load and the red led lights up forever or the verification won't go trough.
Fuses can be written and read.
The C2 looks that way, because i forgot to bend it over the buffer at first time.
-B 1
-B 10
-B 250
Verification or downloading fails
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- macegr
- Posts: 293
- Joined: Fri Apr 04, 2008 4:46 pm
Re: Verification or downloading fails
Search for the Atmega128 in this forum, it's a known bug that the USBTinyISP doesn't work if this chip is selected. Instead, specify the Atmega1281 and it *should* work.
-
- Posts: 4
- Joined: Sat Jan 17, 2009 10:06 pm
Re: Verification or downloading fails
Thanks for the tip.
Verification still fails. I have a feeling that something is interrupting the transfer process. It seems that the longer sessions get interrupted and it results to an error. The data is moving, because i can write to fuses, but writing the flash is problem. I will get batch of mega8 chips, next week and test this with one of those.
Verification still fails. I have a feeling that something is interrupting the transfer process. It seems that the longer sessions get interrupted and it results to an error. The data is moving, because i can write to fuses, but writing the flash is problem. I will get batch of mega8 chips, next week and test this with one of those.
-
- Posts: 4
- Joined: Sat Jan 17, 2009 10:06 pm
Re: Verification or downloading fails
Ok,
Now with new atmega8 i get the same results. It's random where the download stops, but if it goes trough, verification fails.
I'm beginning to think that there is something wrong with the tinyisp. How would i test that?
Now with new atmega8 i get the same results. It's random where the download stops, but if it goes trough, verification fails.
I'm beginning to think that there is something wrong with the tinyisp. How would i test that?
Code: Select all
D:\avr\mega8l>avrdude -p m8 -c usbtiny -U flash:w:ad24_mega8515.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e9307
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: reading input file "ad24_mega8515.hex"
avrdude: input file ad24_mega8515.hex auto detected as Intel Hex
avrdude: writing flash (3372 bytes):
Writing | | 0% 0.00savrdude:
error: usbtiny_send: usb_control_msg: sending control message failed, win error:
Jõrjestelmõõn kytketty laite ei toimi.
(expected 64, got -5)
D:\avr\mega8l>avrdude -p m8 -c usbtiny -U flash:w:ad24_mega8515.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.03s
avrdude: Device signature = 0x1e9307
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: reading input file "ad24_mega8515.hex"
avrdude: input file ad24_mega8515.hex auto detected as Intel Hex
avrdude: writing flash (3372 bytes):
Writing | ### | 5% 0.14savrdude:
error: usbtiny_send: usb_control_msg: sending control message failed, win error:
Jõrjestelmõõn kytketty laite ei toimi.
(expected 64, got -5)
D:\avr\mega8l>avrdude -p m8 -c usbtiny -U flash:w:ad24_mega8515.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e9307
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: reading input file "ad24_mega8515.hex"
avrdude: input file ad24_mega8515.hex auto detected as Intel Hex
avrdude: writing flash (3372 bytes):
Writing | ################## | 36% 0.86savrdude:
error: usbtiny_send: usb_control_msg: sending control message failed, win error
: Jõrjestelmõõn kytketty laite ei toimi.
(expected 64, got -5)
D:\avr\mega8l>
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: Verification or downloading fails
hmm what happens if you add -B 1 or -B 10 ?
-
- Posts: 4
- Joined: Sat Jan 17, 2009 10:06 pm
Re: Verification or downloading fails
Tested:
Extra short usb cable -> does not help.
Yet another new atmega8 chip -> same problem as with previous 2.
Tests update:
Tried the R4&R7 short out trick -> does not help
Programmed my board trough STK200 -> OK
-B 5 is the option that seems to work best:
Extra short usb cable -> does not help.
Yet another new atmega8 chip -> same problem as with previous 2.
Tests update:
Tried the R4&R7 short out trick -> does not help
Programmed my board trough STK200 -> OK
-B 5 is the option that seems to work best:
Code: Select all
D:\avr\mega8l>avrdude -p m8 -c usbtiny -U flash:w:main.hex -B 1
avrdude: Setting SCK period to 1 usec
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
D:\avr\mega8l>avrdude -p m8 -c usbtiny -U flash:w:main.hex -B 10
avrdude: Setting SCK period to 10 usec
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e9307
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: Setting SCK period to 10 usec
avrdude: reading input file "main.hex"
avrdude: input file main.hex auto detected as Intel Hex
avrdude: writing flash (200 bytes):
Writing | ################################ | 64% 0.09savrdude:
error: usbtiny_send: usb_control_msg: sending control message failed, win error
: Jõrjestelmõõn kytketty laite ei toimi.
(expected 64, got -5)
D:\avr\mega8l>avrdude -p m8 -c usbtiny -U flash:w:main.hex -B 5
avrdude: Setting SCK period to 5 usec
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e9307
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: Setting SCK period to 5 usec
avrdude: reading input file "main.hex"
avrdude: input file main.hex auto detected as Intel Hex
avrdude: writing flash (200 bytes):
Writing | ################################################## | 100% 0.11s
avrdude: 200 bytes of flash written
avrdude: verifying flash memory against main.hex:
avrdude: load data flash data from input file main.hex:
avrdude: input file main.hex auto detected as Intel Hex
avrdude: input file main.hex contains 200 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.06s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0x12 != 0x00
avrdude: verification error; content mismatch
avrdude: safemode: Fuses OK
avrdude done. Thank you.
D:\avr\mega8l>
Please be positive and constructive with your questions and comments.