Global Moderator
Dallas
Offline
Shannon Member
Karma: 116
Posts: 10144
|
 |
« Reply #15 on: December 31, 2012, 01:55:20 am » |
There are three possibilities...
• If you are using an Uno (or other Arduino compatible board) as a programmer, auto-reset has not been disabled
• The wiring between the programmer (Uno) and the target (ATtiny processor) is not correct
• The target has been configured to use an external clock but a clock signal is not present on XTAL1
It is fairly easy to determine which is the culprit from a verbose output. Enable verbose output for uploads and post the results.
|
|
|
|
« Last Edit: December 31, 2012, 04:05:01 pm by Coding Badly »
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 1
Posts: 175
|
 |
« Reply #16 on: December 31, 2012, 02:00:23 am » |
It is fairly easy to determine which is the culprit from a verbose output. Enable verbose output for uploads and post the results.
I am unfamiliar with verbose output, can you please explain. Thank you.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 116
Posts: 10144
|
 |
« Reply #17 on: December 31, 2012, 02:11:01 am » |
• Start the Arduino IDE
• Click File then Preferences
• Ensure Show verbose output during: upload is checked
• Click OK
• Try to Burn Bootloader (try to do whatever you were trying to do)
• Click in the Status Window (bottom part of the IDE)
• Hold Ctrl and press A to Select All
• Hold Ctrl and press C to Copy
• Paste into a reply; please use [code] [/code] tags
|
|
|
|
« Last Edit: December 31, 2012, 02:13:06 am by Coding Badly »
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 1
Posts: 175
|
 |
« Reply #18 on: December 31, 2012, 03:58:53 pm » |
This is what I get when I try the burn boot loader with the ATTiny85 (internal 8Mhz clock) C:\arduino-1.0.1\hardware/tools/avr/bin/avrdude -CC:\arduino-1.0.1\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -pattiny85 -cstk500v1 -P\\.\COM4 -b19200 -e -Uefuse:w:0xff:m -Uhfuse:w:0xdf:m -Ulfuse:w:0xe2:m
avrdude: Version 5.11, compiled on Sep 2 2011 at 19:38:36 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "C:\arduino-1.0.1\hardware/tools/avr/etc/avrdude.conf"
Using Port : \\.\COM4 Using Programmer : stk500v1 Overriding Baud Rate : 19200 avrdude: Send: 0 [30] [20] avrdude: Send: 0 [30] [20] avrdude: Send: 0 [30] [20] avrdude: Recv: . [14] avrdude: Recv: . [10] AVR Part : ATtiny85 Chip Erase delay : 4500 us PAGEL : P00 BS2 : P00 RESET disposition : possible i/o RETRY pulse : SCK serial program mode : yes parallel program mode : yes Timeout : 200 StabDelay : 100 CmdexeDelay : 25 SyncLoops : 32 ByteDelay : 0 PollIndex : 3 PollValue : 0x53 Memory Detail :
Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- eeprom 65 6 4 0 no 512 4 0 4000 4500 0xff 0xff Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- flash 65 6 32 0 yes 8192 64 128 4500 4500 0xff 0xff Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00 Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00 Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00 Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00 Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00 Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- calibration 0 0 0 0 no 2 0 0 0 0 0x00 0x00
Programmer Type : STK500 Description : Atmel STK500 Version 1.x firmware avrdude: Send: A [41] . [80] [20] avrdude: Recv: . [14] avrdude: Recv: . [02] avrdude: Recv: . [10] avrdude: Send: A [41] . [81] [20] avrdude: Recv: . [14] avrdude: Recv: . [01] avrdude: Recv: . [10] avrdude: Send: A [41] . [82] [20] avrdude: Recv: . [14] avrdude: Recv: . [12] avrdude: Recv: . [10] avrdude: Send: A [41] . [98] [20] avrdude: Recv: . [14] avrdude: Recv: . [00] avrdude: Recv: . [10] Hardware Version: 2 Firmware Version: 1.18 Topcard : Unknown avrdude: Send: A [41] . [84] [20] avrdude: Recv: . [14] avrdude: Recv: . [00] avrdude: Recv: . [10] avrdude: Send: A [41] . [85] [20] avrdude: Recv: . [14] avrdude: Recv: . [00] avrdude: Recv: . [10] avrdude: Send: A [41] . [86] [20] avrdude: Recv: . [14] avrdude: Recv: . [00] avrdude: Recv: . [10] avrdude: Send: A [41] . [87] [20] avrdude: Recv: . [14] avrdude: Recv: . [00] avrdude: Recv: . [10] avrdude: Send: A [41] . [89] [20] avrdude: Recv: . [14] avrdude: Recv: . [00] avrdude: Recv: . [10] Vtarget : 0.0 V Varef : 0.0 V Oscillator : Off SCK period : 0.1 us
avrdude: Send: A [41] . [81] [20] avrdude: Recv: . [14] avrdude: Recv: . [01] avrdude: Recv: . [10] avrdude: Send: A [41] . [82] [20] avrdude: Recv: . [14] avrdude: Recv: . [12] avrdude: Recv: . [10] avrdude: Send: B [42] . [14] . [00] . [00] . [01] . [01] . [01] . [01] . [03] . [ff] . [ff] . [ff] . [ff] . [00] @ [40] . [02] . [00] . [00] . [00] [20] . [00] [20] avrdude: Recv: . [14] avrdude: Recv: . [10] avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85 avrdude: Send: P [50] [20] avrdude: Recv: . [14] avrdude: Recv: . [10] avrdude: AVR device initialized and ready to accept instructions
Reading | avrdude: Send: V [56] 0 [30] . [00] . [00] . [00] [20] avrdude: Recv: . [14] avrdude: Recv: . [00] avrdude: Recv: . [10] avrdude: Send: V [56] 0 [30] . [00] . [01] . [00] [20] avrdude: Recv: . [14] avrdude: Recv: . [00] avrdude: Recv: . [10] ################avrdude: Send: V [56] 0 [30] . [00] . [02] . [00] [20] avrdude: Recv: . [14] avrdude: Recv: . [00] avrdude: Recv: . [10] ################################## | 100% 0.08s
avrdude: Device signature = 0x000000 avrdude: Yikes! Invalid device signature. Double check connections and try again, or use -F to override this check.
avrdude: Send: Q [51] [20] avrdude: Recv: . [14] avrdude: Recv: . [10]
avrdude done. Thank you.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Dallas
Offline
Shannon Member
Karma: 116
Posts: 10144
|
 |
« Reply #19 on: December 31, 2012, 04:04:43 pm » |
Which eliminates the first possibility leaving...
• The wiring between the programmer (Uno) and the target (ATtiny processor) is not correct
• The target has been configured to use an external clock but a clock signal is not present on XTAL1
Very carefully check the wiring.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 1
Posts: 175
|
 |
« Reply #20 on: December 31, 2012, 04:11:41 pm » |
If this is the case, can I fix it or just trash it. • The target has been configured to use an external clock but a clock signal is not present on XTAL1
Very carefully check the wiring.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 1
Posts: 175
|
 |
« Reply #21 on: December 31, 2012, 04:36:42 pm » |
I Tried it with a Brand new one, I still get errors when I try to do the boot loader and upload Blink.
But Blink works.
|
|
|
|
« Last Edit: December 31, 2012, 05:15:55 pm by kculm »
|
Logged
|
|
|
|
|
Offline
God Member
Karma: 10
Posts: 871
|
 |
« Reply #22 on: January 01, 2013, 02:50:37 am » |
Wiring issue.
+ . . . . . . . . -
pin 7 - pin 13 on an uno. pin 6 - pin 12 pin 5 - pin 11 pin 1 - pin 10 (ss)
pin 8 = Positive/ 5v pin 4 = 0v / GND
Upload the ISP sketch from Arduio (MKII / UNO) and upload the firmware, hit reset, forget the cap to gnd.
Now select Arduino as ISP, pick Attiny85 8mhz, now burn the bootloader.
Now you may proceed to program the chip with your code.
|
|
|
|
« Last Edit: January 01, 2013, 02:52:19 am by cjdelphi »
|
Logged
|
|
|
|
|
Offline
God Member
Karma: 10
Posts: 871
|
 |
« Reply #23 on: January 01, 2013, 02:57:50 am » |
the only exception to what i've said...
It's been burnt with a 20mhz bootloader, in which case you'll need to add a Crystal and Caps, or you wont be able to upload anything.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 1
Posts: 175
|
 |
« Reply #24 on: January 01, 2013, 09:31:10 am » |
cjdelphi, Thank you for all your help.
Not to be a pain but I have a few questions for you. when you say Upload the ISP sketch from Arduio (MKII / UNO) and upload the firmware, hit reset, forget the cap to gnd.
I am not sure what you mean by up load firmware.
Also in Arduino 1.0.1, under tools programmer, it's all ready set to Arduino as ISP. is that correct?
And lastly, what core are you using. I have been told to download three different versions.
the one latest one I was told to use has the 85 Listed as AtTiny85(internal oscillator: BOD disabled)
Like I said I am sorry If I am being a pain. I am just trying to learn.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #25 on: January 02, 2013, 05:44:41 am » |
Hello all and sorry if i'm HI-Jacking this thread.
But I have a somewhat similar situation/question.
I also have an attiny85 and I also wanted to use an Arduino (Mega 2560) as an ISP programmer. This constantly failed to work so used a Buspirate instead to do a verify (e.g. avrdude -v). This outputted fuses and everything and I could burn the tiny empty85at8.hex (and verify) it a few times successfully. I'm not quite sure what this does (I belive it is the same as using the 'burn bootloader' option, which doesn't really burn any bootloader but sets up the fuses?
Anyhow, I've managed to compile nathan's IR -> Keyboard 'gateway' for the attiny85 and since I want to use a 12 MHz crystal (tinytuner was refusing to compile so I figured I might as well just use the oscillator for more accurate timings) I used as a board attiny85 with external osc from the boards menu.
I then compiled in the arduino IDE using 'verfiy' and went to /tmp/build1234.tmp/ to find the compiled hex file. I used avrdude to upload the file and verify (-U flash:v:file.hex) successfully. However after this all interaction with the attiny85 fails.
From the posts above I'm guessing this is expected, as now I need the 12 MHz crystal on pins 2/3 iirc (with caps) to even talk to the attiny? Is this correct? If just for testing purposes I quickly solder only the crystal to those pins, would it communicate again as well? (The board I made has the caps and crystal already on it but quickly hooking up a crystal is easy, adding the caps is trickier.
I guess to summarize, my question is, when selecting the board type from the menu, is this setting up any fuses and do those fuse settings end up in the final hex file? Or have I broken my chip somehow?
Oliver
|
|
|
|
|
Logged
|
|
|
|
|
United Kingdom
Online
Faraday Member
Karma: 131
Posts: 4658
|
 |
« Reply #26 on: January 02, 2013, 11:09:35 am » |
From the posts above I'm guessing this is expected, as now I need the 12 MHz crystal on pins 2/3 iirc (with caps) to even talk to the attiny? Is this correct? If just for testing purposes I quickly solder only the crystal to those pins, would it communicate again as well? (The board I made has the caps and crystal already on it but quickly hooking up a crystal is easy, adding the caps is trickier.
You only need the crystal if you programmed the fuses to expect a crystal as well. In this case, it will probably work without the capacitors. Alternatively, if you have an Arduino then write a sketch to toggle an output pin continuously, and feed that to pin 2 of the ATtiny.
|
|
|
|
« Last Edit: January 02, 2013, 11:11:20 am by dc42 »
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #27 on: January 02, 2013, 12:18:45 pm » |
I was not aware that I had programmed any fuses in that regard. Toggling the pin on the arduino is handy  But i have 30 crystals, so that's easy enough. With a 12 MHz crystal everything burns and verifies perfectly fine again. Sorry for the noise 
|
|
|
|
« Last Edit: January 02, 2013, 03:31:16 pm by oliv3r »
|
Logged
|
|
|
|
|
|