Burning Atmega8 with UsbtinyISP and Arduino 1.0: working ... but too slow-SOLVED

Well, looks like I stumped into the same trouble again (http://arduino.cc/forum/index.php/topic,62405.0.html), but the old solution doesn´t seem to work.

I´ve used Arduino 1.0 to save a sketch into a blank Atmega8 using a UsbtinyISP. When I install the Ic into my standalone board, it works but toooooooo slow. looks like its working with the internal oscilator, and it is not using the installed crystal.
I´ve used this setting in the boards.txt:

uatmega8.name=Unlocked ATmega8
uatmega8.upload.protocol=usbtiny
uatmega8.upload.using=usbtinyisp
uatmega8.upload.maximum_size=8192
uatmega8.upload.speed=19200

uatmega8.bootloader.low_fuses=0xdf
uatmega8.bootloader.high_fuses=0xca
uatmega8.bootloader.path=atmega8
uatmega8.bootloader.file=ATmegaBOOT.hex
uatmega8.bootloader.unlock_bits=0x3F
uatmega8.bootloader.lock_bits=0x3F

uatmega8.build.mcu=atmega8
uatmega8.build.f_cpu=16000000L
uatmega8.build.core=arduino
uatmega8.build.variant=standard

And uploaded the sketch using the "File / Upload using programmer" option.

I haven´t burnt a bootloader into the IC, since it´s not required. I understand that the fuses are set ok to work without the bootloader.

I´ve used my osciloscope to test the outputs, that work fine, and tried to see if the cristal is oscilating, but i found just a lot of noise. Connections are tested.

Thanks in advance for your help.

Until you "burn the bootloader" the chip will be set to use a 1 MHz clock speed.

(The Arduino IDE sets the fuses as part of the bootloader burning.)

Burnt the bootloader, and then reuploaded the sketch. Both things using the described board configuration, with USBTinyISp and Arduino 1.0.

Now nothing is working.
No signal is comming out of the outputs.

I can see that the crystal pins are now high, but I can see only noise comming out. What kind of signal should be expected?

Used avrdude to get this info:

avrdude -c usbtiny -p m8 -v

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\WinAVR-20100110\bin\avrdude.conf"


         Using Port                    : lpt1
         Using Programmer              : usbtiny
         AVR Part                      : ATMEGA8
         Chip Erase delay              : 10000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         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  Max W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- --- -- ---------
           eeprom         4    20   128    0 no        512    4      0  9000  90 00 0xff 0xff
           flash         33    10    64    0 yes      8192   64    128  4500  45 00 0xff 0x00
           lfuse          0     0     0    0 no          1    0      0  2000  20 00 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  2000  20 00 0x00 0x00
           lock           0     0     0    0 no          1    0      0  2000  20 00 0x00 0x00
           calibration    0     0     0    0 no          4    0      0     0  0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0  0 0x00 0x00

         Programmer Type : USBtiny
         Description     : USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/
avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9307
avrdude: safemode: lfuse reads as DF
avrdude: safemode: hfuse reads as CA

avrdude: safemode: lfuse reads as DF
avrdude: safemode: hfuse reads as CA
avrdude: safemode: Fuses OK

avrdude done.  Thank you.

What else can I do to get a better diagnostic???
Regards

I can see that the crystal pins are now high, but I can see only noise comming out. What kind of signal should be expected?

The crystal pins should be using the 16 MHz crystal and load capacitors to stabilize the oscillator. If you connect anything else to the crystal pins (like a meter or scope probe) it may destabilize the clock.

The solution to the original problem was the fuses story. Bootloader burnt and that should have solved it, but.....

The damn clock wasn´t working, because.....capacitors were wrong! I bought some capacitors as if they were 22pF. They are labeled 22J, but when I measured them, they are actually 220nF! (I´ll have to thank my wife for the new DMM that measures capacitors she gave me for my last birthday :slight_smile: ).
So I changed the parts and now it´s working.

Thanks for your help.