Using an STK500 as a standalone Arduino Board

Hello.

I am relatively new to AVR development, and I recently happened upon the Arduino project. I am curious to know if it is possible to put an ATMega8 in my STK500, and use the Arduino IDE to interface the ATMega8, without buying a fully built Arduino board. I have successfully uploaded the bootloader by following these instructions. But when I try to upload sketches through the Arduino IDE, I get nothing but "programmer not responding" errors. After reviewing the Arduino schematics, I don't see why this shouldn't work. I have a feeling that all I need is the right settings on the STK500. I know that the Arduino hardware requires a 16 Mhz external crystal, but can't the STK500 supply the clock source it needs? Or will I need to put an actual crystal in the "crystal" slot on the STK500? If I need to put in an external crystal, does the STK500 supply the 20 pF capacitors that usually accompany the crystal? Thanks in advance for your help. Talk to you soon.

-Jay

I'm guessing you need to supply your own crystal, and make sure the jumpers and other pins are set appropriately to connect it to your ATmega.

Mellis,

Thanks for the reply. I will give the crystal a try. I'll post my progress tomorrow after I get the crystal. Talk to you then.

-Jay

I have done this with both a mega8 and mega168. You'll need to read the stk500 manual on jumpers and crystals.

The only tricky thing is that if you are not using a mega8 that has the arduino bootloader already loaded you'll need to use the programming serial port for downloading the bootloader.

After the bootloader is successfully installed you'll need to switch over to the "spare" serial port for using the arduino environment for programming the chip. Just remember to install the jumpers that connect the spare serial port to the appropriate pins on the mega8--check the arduino schematic.

Can someone give me the step by step on how to use atmega8 with STK500 ?
I am able to run AVR studio programs (including one that uses the 2nd serial port)
When I burn the bootloader I can not upload a skethch... The LED does blink 3-4 times every 6 seconds but I get an error:
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

I am trying to do this without a crystal... C code works fine (including serial port)

---Help--

I am trying to do this without a crystal...

All of the bootloader, UART and sketch code timing is based on a known crystal speed, that's why a 16MHZ crystal is specified. Get a 16MHZ crystal and try again.

Unless you have edited an recompiled a new bootloader, your choices for "F_CPU" are 8 and 16 MHZ.

I found this great blog : Minimal Arduino with ATmega8 – todbot blog

An after burnig the atmega8-noxtal i was able to download the 'blink' example.

Now I can not figure out how to download another program. How do you get the STK500 board to start the bootloader again (and not the blink) program ?
Thanks.
-D

An AVR with the bootloader loaded ALWAYS runs the bootloader. Normally it will look at the serial port for a couple of seconds to see if there is boot traffic, and if not, start the sketch (blink.) So it's just a matter of timing a press of the RESET button correctly. (The amount of time that it waits is dependent on the actual version of the bootloader that you loaded. The old ATmega8 bootloader would wait something like 10 seconds. The optiboot distributed with Uno waits about 0.5 s!)