[noob-ask] burning bootloader using LPT programmer

Brohogan, Macsimski and Kodockz,

I always use the Parallel Port Programmer here, with Atmega8, and WinXP. It works fine for me.
I got the Device Signature problem with older IDEs, but not with 0011.

You can try the DOS prompt command to burn the bootloader using the -F command (that override the device signature). This worked for me before:
For Atmega8, use the procedure described in this post, reply#15:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1200218080;start=all
(you must change the reference from Arduino-0010 to Arduino-0011)

For Atmega168, you must change the command -pm8 to -pm168
and change the fuses settings.

If you don't know how to change the fuses for Atmega168, you can try the 0007 IDE version to burn the bootloader (it uses uisp instead of avrdude), using the parallel port programmer.

Here is a nice page :

http://www.dl1dow.de/inhalt/arduino/bootloader/index.html

Your parallel cable may be wired as DAPA, or as BSD.
It seems that only the BSD configuration may be fine,
but "in some cases, the ATMEGA 168 became inprogrammable"... :-?

hm.. could it be that the polling register caused the trouble? I installed them on both computers I'm working on...

is there any way to "uninstall" them?

I don't think this is your problem because I have it installed in my computer and I can burn the bootloader with the Parallel Port Programmer without problems.

Did you try the DOS solution?

Or the 0007 solution?

I don't think this is your problem because I have it installed in my computer and I can burn the bootloader with the Parallel Port Programmer without problems.

Did you try the DOS solution?

Or the 0007 solution?

Im still busy with programming the board. I decided to leave this one out for next week after my code is fnished.

I think im gonna try the DOS coz i dont wanna ruin my working Arduino IDE 011.

Mm i believe I can find the fuse settings as specified on the other thread...

Hi,
So did anyone find a good way to work it out easily?

Hmm ..

I decided to give the 011 another shot. This time i put the empty atmega168 to the arduino board (NG rev C).
I realized without any extern/USb power connected, the power turnen on.

And then again it failed.

@BroHogan,
where did u put the pause on the status_giveio?

I typed "pause" at the very end of load... and status... batch files. This way you can run them by just clicking on them and actually see what happened.

A few weeks ago I posted a tip that went nowhere. It simply said that if your parallel cables are too long (~1M) they may not work. This was based on my experience - long cable = no work, short cable = work.

I suggested (and still do) that someone who is able to edit the guide for making the cable, add that little tip. 20cm is a good length - even if it means crawling behind your machine.

It's a shame that the ability for everyone to use a parallel ISP programmer has been so elusive here. It would be great if procedures were formalized to the extent that they would work for everyone. It would save a lot of frustration.

Right now it appears to be a black art.

am i missing something ? the Arduino 007 IDE cant burn bootloader for Atmega168 ?

It's a shame that the ability for everyone to use a parallel ISP programmer has been so elusive here. It would be great if procedures were formalized to the extent that they would work for everyone. It would save a lot of frustration.

It can't be readily formalized, because it's basically a hack. Functionality depends to a great extent on the particulars of the specific hardware and host OS in question.

No one is being elusive, they're just not all jumping up to help troubleshoot your unique combination of hardware, software, and construction technique.

Preprogrammed ICs are available from several places online, ususally about US$4 or $5 - not much more than the bare processor.

If it's terribly important to you to be able to burn a program via ICSP, spend US$22 at LadyAda's web site, or US$36 at digikey, and get a USB attached programmer. I know $30 or $40 is non trivial to a broke college student, but it's not all that much in the grand scheme of things, and trust me, it's much less trouble than you've already gone to. Plus, it'll work on a machine that doesn't have a parallel port, like a laptop.

I'm surprised there isn't more attention given to the RS232 based programmers, but I suspect that the timing issues introduced in USB/RS232 adapters can wreak havoc with bit banging.

-j

Sorry, I was only trying to help some others here.
My programmer has been working fine since I shortened the cable, so I really don't have a dog in the fight.

I wasn't saying that the people here have been elusive. I said that the problem seems to be elusive. I'd like to make that distinction.

If you say that the option on the IDE to burn with a parallel programmer is a hack and may not work for everyone, then I guess it should be left at that.
I really don't care anymore.

I wasn't saying that the people here have been elusive.

Sorry, my mistake. I've said before, I should have an interlock on my keyboard to keep me from posting until my blood-caffeine level is high enough.

f you say that the option on the IDE to burn with a parallel programmer is a hack

Nope, I meant the whole idea of a parallel port programmer, especially a wires-only device, is a hack. I don't mean that in a negative way, but it's a fact.

Sorry if my post came off negative toward anyone, I sure didn't mean it that way.

-j

anw .. .

tried to execute this code here (in command prompt):
avrdude -c dapa -p m168 -P LPT1 115000 -U signature:r:-:h

got the error that it cant access/open port LPT1.

-----edited----

ignore this.. it was lpt1 not LPT1.

then i added delays ... - i 20000 -> very long one i guess.
still it failed.

one thing that i saw was the LED that i put on pin 13 blinks/flickers while processing the code above.
The longer the delay the better i can see the blinks.

parallel programmer attached or unattched to the port gives the same result.

sigh .... other suggestion?

hi all...

finally a little bit of progress, but i still have a problem.

i tried uisp instead of avrdude:

uisp -dpart=atmega168 -dprog=dapa - dlpt=0x378 --wr_lock=0x3f
uisp -dpart=atmega168 -dprog=dapa - dlpt=0x378 --wr_fuse_e=0x00
uisp -dpart=atmega168 -dprog=dapa - dlpt=0x378 --wr_fuse_h=0xdd
uisp -dpart=atmega168 -dprog=dapa - dlpt=0x378 --wr_fuse_l=0xff
uisp -dpart=atmega168 -dprog=dapa - dlpt=0x378 --erase --ipload if=[bootloader directory] -v
uisp -dpart=atmega168 -dprog=dapa - dlpt=0x378 --wr_lock=0xCF

It seemed to burn the bootloader, but the LED on pin 13 blinks so fast after i reset.

And i cant upload sketches. when im still uploading the sketch, the led blinks.

what did i do wrong here?

FINALLY!

I can upload my sketch directly thru avrdude!

So, all along it was the printer port setting.

macsimski. thank you for your post. if not because i read his post i wouldnt change the parallel port.

  1. I changed the parallel port settings to ECP then adress 0x378
  2. i used 'uisp' to check if my parallel programmer is working or not
    $ uisp -dprog=dapa -dlpt=0x378
  • the number of 0x378 is from the parallel port properties (check uisp website for valid port adresses)
  • uisp then will try to find your chip, if it does, it will tell you waht chip u have
  1. then i tried using avrdude.
    avrdude -c dapa -P lpt1 -p m168
    it read the signature and its ok.

  2. reading the fuses
    uisp -dprog=dapa -dlpt=0x378 -dpart=atmega168 --rd_fuses
    or
    avrdude -c dapa -P lpt1 -p m168 -U efuse:r:-:h
    avrdude -c dapa -P lpt1 -p m168 -U hfuse:r:-:h
    avrdude -c dapa -P lpt1 -p m168 -U lfuse:r:-:h

  3. open/ ulnlock bit
    uisp -dprog=dapa -dlpt=0x378 -dpart=atmega168 --wr_lock = 0x3f
    or
    avrdude -c dapa -P lpt1 -p m168 -U lock:w:0x3f:m

  4. set fuses
    uisp -dprog=dapa -dlpt=0x378 -dpart=atmega168 --wr_fuse_e=0x00 --wr_fuse_h=0xdd --wr_fuse_l=0xff
    or
    avrdude -c dapa -P lpt1 -p m168 -U efuse:w:0x00:m
    avrdude -c dapa -P lpt1 -p m168 -U hfuse:w:0xdd:m
    avrdude -c dapa -P lpt1 -p m168 -U lfuse:w:0xff:m

  5. upload hex
    uisp -dprog=dapa -dlpt=0x378 -dpart=atmega168 -- Upload if=[hex file location] -v
    or
    avrdude -c dapa -P lpt1 -p m168 -U flash:w:[hex file location]

  6. lock bits again.. now 0x0f. in some other source they say 0xcf

pls note that no.3 to no.6 is what i did based on many resources. also im not realy sure that the fuse settings are correct. better check the datasheet.
also i hvent been able to upload the bootloader. im uploading the hex files created form the sketch.

thanks to uchobby's and javier valcarce's tutorial.

Hello! I ve got 2 questions: (Iam very noob! I ve got arduino 2 days ago.) How could I blink 2 LEDs together? The longer leg of the first LED can be placed in the 12. bank, and the shorter can be (must be) placed in GND. And the longer leg of the second LED can be placed in the 13th bank, and the shorter must be placed in GND. Can it work? I found the program in: File / Sketchbook / examples / digital / Blink Can somebody send me this program?
How is it possible to make 3 4 5 ... leds work?

Thanks for your help.

Hello! I ve got 2 questions: (Iam very noob! I ve got arduino 2 days ago.) How could I blink 2 LEDs together? The longer leg of the first LED can be placed in the 12. bank, and the shorter can be (must be) placed in GND. And the longer leg of the second LED can be placed in the 13th bank, and the shorter must be placed in GND. Can it work? I found the program in: File / Sketchbook / examples / digital / Blink Can somebody send me this program?
How is it possible to make 3 4 5 ... leds work?

Thanks for your help.

I'm glad it worked for someone.

I put a lot of effort into trying to get the parallel port programmer working and now I wish I hadn't bothered. I's simple. It should work. But it never did for me. Reading around trying to find out why it didn't, it gradually became clear that you're at the mercy of your parallel port - some work - some don't and if your's doesn't there aint nothing you can do. Parallel ports have their uses but they're a total pain.

BTW, does anyone know how to make a usb parallel adapter appear as parallel port (instead of as 'usb printing support') under Linux or Windows. Call me a masochist, but I tempted to give it another try.

does anyone know how to make a usb parallel adapter appear as parallel port (instead of as 'usb printing support') under Linux or Windows. Call me a masochist

OK, you're a masochist. (:

Really. You just think the real parallel port was problem - don't even start with the USB adapter. Been there, done that. I don't recall the specifics, but I want to say it was a commercial parallel port programmer of some sort.

Just send about US$20 to LadyAda. Or $36 to digikey. Or shoot, send me a blank ATmega with return postage and address label, and I'll burn it for you.

-j