burning bootloader to atmega168

ok, i'm trying to install the bootloader ( arduino ) to the atmega168 i just got. I followed the directions on the arduino site, in the hacking section, and i'm getting this error:

avrdude: can't open device "giveio"

avrdude: failed to open parallel port "lpt1"

what do i have to install or connect, and what does this mean?

thanks! -big93

ok i installed the program i dident install, but now when i hook up the parallel port programmer, i get this error when trying to upload:

avrdude: AVR device not responding avrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check.

and this is when the icsp pins are connected, and i have my 9v battery connected to the board, giving power... and the "l" smd led is lit when i connect my cable.

please help anybody...

heres an idea:

maybe i can just breadboard my programmer, that way i just hook the chips up to the board, but which icsp wires do i connect to which arduino pins?

please... anybody help me, i wanna burn the boot loader on these chips already

Do you have anything currently on any of the arduino pins, and do you have the resistors connected as described here?

Here's a mapping of the pins.

| Parallel Programmer | ICSP Header | ATmega | Arduino Pins | | - | - | - | - | | 11 | 1 | 18 | 12 | | - | 2 | 7, 20 | +5V (Not really nessecary if you have ext. power.) | | 1 | 3 | 19 | 13 | | 2 | 4 | 17 | 11 | | 16 | 5 | 1 | Reset | | 18 | 6 | 8, 22 | Ground |

Note that you do probably need those resistors.

ok, eerything is suposedly hooked up the way it's sapposed to.

now here is something fishy:

when i don't connect external power, the led for power is still lit, but very dimmly... does this indicate a misswiring?

and i don't have the 5v pin from the connector hooked up, but i do have ground connected. i re wired everything, and i'm having similar results on my breadboard.

and one more q:

can misswiring screw the chip up? if i have lets say miso connected to mosi, can the permenently damage my chip, or is there protection within the chip?

ok, eerything is suposedly hooked up the way it's sapposed to.

now here is something fishy:

when i don't connect external power, the led for power is still lit, but very dimmly... does this indicate a misswiring?

and i don't have the 5v pin from the connector hooked up, but i do have ground connected. i re wired everything, and i'm having similar results on my breadboard.

Your board is getting power from one of the programming pins (through the I/O line). There isn't enough current supplied for it to run, but the power reaches the Vcc line and will often be enough to make the power LED glow faintly. Along these lines, you should take care to never program an unpowered AVR. Often you will get an error when you try this. Other times the voltage on the programming lines is enough to allow the programming to occur, but the programming commands often get corrupted and can do very bad things like change the AVR fuses, which can in turn make your AVR unresponsive by enabling debugWire or changing the clock settings.

can misswiring screw the chip up? if i have lets say miso connected to mosi, can the permenently damage my chip, or is there protection within the chip?

Connecting power and ground backwards can definitely destroy your AVR. Connecting the signal lines incorrectly will probably cause the programming to immediately fail with no harm done as long as you have current-limiting resistors on those lines. The programmer uses MOSI as an output and MISO as an input, so if you swap the two you can encounter the situation where the programmer is trying to drive a pin one way while your Arduino is trying to drive that same pin the other way. Without a current-limiting resistor this could conceivably burn out the pin or damage your parallel port.

  • Ben

that was very usefull! thank you for that. Now this makes me consider going to buy diodes and putting them between ground on the arduino to ground on my board. will this stop 5v to enter my ground pin?

So i googled some more and found that maybe i should try to use miso with an occiliscope to see if i see bounces of power. Since i don;t have one lying around, can i just use my digital multimeter and check the line for incoming messages from my comp? If what i’m thinking is true, then my multimeter should flicker with some power when i connect one pin to miso and one to ground. correct?

comming monday, if i can’t get this working, i’m not gonna beat a dead horse, ill just buy a usb programmer from ladyada.