Programming the atmega168 help

Hello,
I think that I may have bitten off more than I can chew. I am new to electronics but have decided to buy all the components to make the bread board arduino and I am now stuck.

I followed the tutorial and bought the “AVR STK Parallel Port Dongle Programmer” from sparkfun (http://www.sparkfun.com/commerce/product_info.php?products_id=13).

What is this programmer? Is it a STK200, STK500, I'm not even sure which bootloading tutorials I am supposed to be reading. Also, I have tried altering the Arduino IDE preferences and when I try to upload I get the “avrdude not in sync” error. I am trying to determine if my problem is with my cpu/programmer or with my beadboard circuit. I would like to try it working with AVRDude directly (this might be a dumb question) do they have AVRDude command line for PC (XP). I know that it is used by arduino but I cant find any standalone builds for the pc, only unix.

Also, any arduino users in the Washington DC area?

Thanks,
Dan

You can use the avrdude that comes with Arduino. It's in hardware/tools/avr/bin with its configuration file in hardware/tools/avr/etc. You'll also need the libusb0.dll that's in the Arduino application directory. If you copy them all to the same directory, you should be able to, from a command prompt (cmd), run:

avrdude -C avrdude.conf .......

where the dots signify the rest of the parameters. To get an idea of what those parameters are, you can set upload.verbose to true in your Arduino preference file. It will show you the command line used by the IDE, which you should be able to tweak slightly to work with your programmer.

At the moment, there's no way to directly upload sketches from the Arduino IDE using a programmer. If you want to use the IDE, you'd first need to burn the bootloader to your chip, then upload via serial or USB.

It looks like that's just a parallel port programmer (i.e. not stk200 or stk500). That's "dapa" to avrdude.

Hey, thanks for the response, I will give it a try when I get off of work. I thought that you could program your sketches to a mega168 chip using the IDE, but maybe im confused. Check this link
http://www.arduino.cc/en/Hacking/Programmer My ultimate goal is to burn my Arduino sketches to a chip without the bootloader. I suppose the best method is to find where the IDE dumps the hex file from your sketch and use avrdude to burn to the atmega168, is that right?

Sorry, that page is a bit out-of-date. It used to work in Arduino 0009, but in Arduino 0010 the upload and bootloader burning process got changed a bit to make it more general (i.e. the automatic generation of the Boards and Burn Bootloader menu items based on configuration files).

I am still having trouble programming the 168. I rebuilt my circuit and have tested it with a pre-programmed 168 chip and it can successfully run the hello wold led blink sketch. When I have tried programming the chip using the parallel programmer I have had very limited success. So far, none of the command using "dapa" have worked, they give me the "device not responding" error. I accidentally discovered that using STK200 gives me a response from the device, using STK200 it gives me the following error:

Device signature = 0x1e9406
Expected signature for ATMEGA168 is FF FF FF

I have been looking all over the internet and have not found a solution yet.

BTW, thinking of getting the USBTiny, maybe my old PC wont work with this parallel programmer.

Thanks again,
Dan

I GOT IT!!!!!!! Just tried everything on another computer and it worked! Thanks!