Using 8 Mhz internal clock.

I want to make a few Christmas gifts along the lines of the birthday card idea I had a week ago and want to save money and soldering effort by using a cheaper Atmega8 and leave out the crystal + caps.

Has anybody got the 8 Mhz internal clock working reliably with the Atmel ATmega8?
I've had a search about and can only find reference to people succeeding with the 168 / 368 and one of Adafruits bootloaders and the description / guides are sketchy at best. I also I think a 168 bootloader won't work on the Atmega8.

I'm not interested in using the time critical functions so could it be a simple matter of burning the Atmega8 bootloader and then changing the fuses for the clock settings or will that upset uploading a sketch to it??

Google todbot blog and look for a post on building standalone arduino circuits with atmega8s. Also consider using an attiny with icsp programming.

Thanks, I've had a look at todbot blog which was very well documented.
However I now cant get the Arduino ICP to work. It gives the following message.

avrdude: Yikes! Invalid device signature.

  • Double check connections and try again, or use -F to override*
  • this check.*

I've tried it with a Atmega8 and Atmega168 and get the same error.

I even milled it a nice PCB based on this one MEGA-ISP Shield and tested it for continuity through to the pins on each Atmega chip several times.

I'm a bit lost at what to try next.

Is there any possibility that you can try to program a different processor?

I'm using a 328 as the programmer and I've tried to program two different 8's and a 168. I know both of these already have the arduino bootloader on them and they both have been tested to work.

Do the LEDs blink when you try to program the target?

Programmer Arduino with 328
Target 168 same results with 8.

Power up:
The three led on the programmer Arduino flicker in sequence, 1, 2, 3 then the heart beat fades ON and OFF regularly.

Target connected:
Target Arduino power LED lights.

Correct board type / processor selected from TOOLS menu

Attempt to burn bootloader:
PROG LED flashes once and simultaneously the pin 13 LED of the target flashes once. The error message appears on the PC and the heart beat LED resumes fading ON and OFF.

The target Arduino board has had the FTDI chip forcibly removed duting an accident but other than that still runs a pre programmed sketch. Other than that I cant think of anything else I may have done / omitted.

What does it say the signature IS?

You didn't wind up with mega88s or mega8As, did you?

If you get a 328 signature, it probably means that the IDE is talking to your duemilanove rather than THROUGH the megaISP sketch to your target board. It helps if you use a board without the auto reset circuitry to run the megaISP sketch.

I haven't burned a 8MHz mega8, but I did successfully use the megaISP sketch to put optiboot on some mega8s.

(The fact that you're getting an "invalid signature" message is actually a good sign. If your programmer weren't wired right, you probably wouldn't get any response at all!)

Where would I look to find the signature?

I only get the following error message.

avrdude: Yikes! Invalid device signature.

  • Double check connections and try again, or use -F to override*
  • this check.*

Checked and the chip has ATMEGA8-16PU stamped on it and the other one has ATMEGA168-20PU

I'm not convinced that the programming arduino is hooked up correctly to the target. if it is correctly connected, could there be anything else connected to the target chip that would interfere? for greatest comfort I would make sure that there was nothing on the programming lines.

Can you try running avrdude directly from the command line? It's easy to get extra info that way using -v -v on the command line.

I have built a couple of arduino-based programmers but and i know they can work but it was never very satisfactory. for a christmas deadline you might consider breaking down and spending $20 on a programmer.