June 24, 2015 at 11:58 pm #20437
I am having trouble with my ATmegaxx8 target board together with the adafruit USBTinyISP. It was suggested that i might need a crystal since the processor in the dev kit might be configured for external crystal and not internal. Can anyone confirm if the processor in the ATMegaxx8 target board dec kit is configuted for an external crystal? I get the same failure to write boot loader when I use the same 328P processor with I bought from RS.
June 25, 2015 at 12:25 am #22106
- This topic was modified 3 years, 4 months ago by Windell Oskay.
A “raw” ATmega328 from the factory is configured to run from its internal clock, and does not require an external crystal. Our ATmegaXX8 mini dev kits come with a raw chip, unless specially ordered otherwise.
However, once it is programmed with a bootloader that expects an external crystal (or technically, once its “fuse” bytes are set to require one– which happens as part of that programming process), it does require a crystal.
If you do not have a crystal on your target board, and you tried to program a bootloader, it’s possible that you may have *succeeded* once, which will make it so that it cannot be reprogrammed, at least until you add the crystal and caps.June 25, 2015 at 1:14 am #22107
I got the same result with one other processor that I bought from RS and also should be with factory settings. I think it is unlikely that both would write halfway once, even if it might happen.
I have resolve red every joints and checked that the processor have correct vcc. The green light on the programmer is lighted and the red flashes once before I get error message rc=-1June 25, 2015 at 1:54 am #22108
There are a few things that all need to work correctly for it to program:– The programmer– The chip– The connection between them– The softwareThere’s not much that I can say, except that you need to check each of those things to find out where the error is. I’ve been there a few times, and I usually feel pretty silly after finding the error that I missed (backwards cable? no power? wrong software command?).Do you have the external crystal installed? And, are you trying to install a bootloader that requires one?June 25, 2015 at 2:39 am #22109
Hi again,I know all to well what you mean by feeling silly after finding an error… Arduino is s re experience for me though.I did not have an external crystal installed, since the processor is not supposed to need one, I did not install it.I think that might be second on my todo list..First is to try to make an install on a Windows laptop and see how that work, I have been trying on My iMac up until now.This will give me a full new setup and different software installation so if the result is replicated I can look into the programmer or cable.As I said, I am beginner so I have mainly used the Arduino IDE to send write boot loader command to the programmer.June 25, 2015 at 2:47 am #22110
With this setup, you’ll need to be very careful, since most of the bootloaders in the IDE *do* require a crystal. Which bootloader have you been writing?June 25, 2015 at 2:55 am #22111
ah.. well thats a problem, too. I just wrote the one default in the IDE…Arduino: 1.6.4 (Mac OS X), Board: “Arduino Uno”/Applications/Arduino 1.6.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino 1.6.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -cusbtiny -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:mavrdude: Version 6.0.1, compiled on Apr 14 2015 at 16:30:25Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/Copyright (c) 2007-2009 Joerg WunschSystem wide configuration file is “/Applications/Arduino 1.6.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf”User configuration file is “/Users/stefangutehall/.avrduderc”User configuration file does not exist or is not a regular file, skippingUsing Port : usbUsing Programmer : usbtinyavrdude: usbdev_open(): Found USBtinyISP, bus:device: 020:008AVR Part : ATmega328PChip Erase delay : 9000 usPAGEL : PD7BS2 : PC2RESET disposition : dedicatedRETRY pulse : SCKserial program mode : yesparallel program mode : yesTimeout : 200StabDelay : 100CmdexeDelay : 25SyncLoops : 32ByteDelay : 0PollIndex : 3PollValue : 0x53Memory Detail :Block Poll Page PolledMemory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xffflash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xfflfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00June 25, 2015 at 2:55 am #22112Programmer Type : USBtinyDescription : USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/avrdude: programmer operation not supportedavrdude: Using SCK period of 10 usecavrdude: initialization failed, rc=-1Double check connections and try again, or use -F to overridethis check.avrdude done. Thank you.Error while burning bootloader.June 25, 2015 at 3:03 am #22113
Yes; the Uno bootloader does require the external crystal. If you try (even once with partial success) to burn this bootloader, it can convert your chip to the state of requiring an external crystal.June 25, 2015 at 3:21 am #22114
Thanks,After i tried on a windows machine I will order a crystal (and caps unless i have them) from RS here in Hong Kong, with luck Ill have it tomorrow.Instead of Arduino IDE, what method would you recommend to burn boot loader?June 25, 2015 at 3:32 am #22115
The Arduino IDE is a fine method to burn a bootloader– one of the easiest and most reliable. Just make sure that your hardware setup is matched to the bootloader that you choose.June 26, 2015 at 4:10 am #22116Update: Just installed crystal and capacitors on the board and tried to burn boot loader again.Success on both processors. Thanks for all the help!June 26, 2015 at 5:29 pm #22117
Awesome– glad to hear it!
- You must be logged in to reply to this topic.