ICSP programmer not working

Hi,

I followed the parallel port ICSP programmer tutorial and build one, connect both the programmer and USB power to arduino, run the program editor and choose the correct COM port and AVR chip options. But, when I start burning bootloader, the program editor report following error message:

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

I've installed the Windows XP register setting, and tried different mode of parallel port in the BIOS setting screen.... will these settings affect the communication between arduino and PC? Which mode is the best choice for arduino? I also tried different LPT settings in Windows' Device Manager panel, but still not working.... which setting should I use? Do I need to enable the legacy plug-and-play setting?

I've installed giveio driver and the giveio.sys is in the Windows folder, do I need to run the loaddrv.exe before burning bootloader?

Btw, when I connect the parallel port and ICSP connector, the LED on the arduino will light up a little bit, is that normal?

Thanks in advance!
Genio

Usually you don't need to mess with the parallel port settings.

Is this the same self made Arduino board? The board needs to be powered either by USB or external power. The LED intensity is a symptom that the wiring of the ICSP connector maybe wrong. The Arduino should have full power, so you should see the LED brightly lit, as the parallel programmer does not provide power to the board.

Please, post a picture so we can better understand the problem.

How did you program the first atmega168 while building the self made board? If you have an stk500 or other AVR programmer, you can try programming something using the ICSP... it that test works, then you know how to debug the parallel programmer.

hi nkcelectronics:

Thanks for your reply. Yes, it's the same self made board. I use ATmega8 chip.

I really need to improve my soldering skill, just found two short ends :stuck_out_tongue:
After repairing the board, I reconnect it to parallel port and USB power. The LED will become dim light when connect with parallel port only, and become bright light after connect to USB.

However, I still can't upload the bootloader in the code editor-- the editor's screen will freezing after executed the command, and consumed almost all of the CPU resources.

Then I use DOS command window to run the "burnpara.bat", but get some flash error messages (shown below). What's the message mean?

Thanks a lot!


D:\arduino-0010\hardware\bootloaders\atmega8>burnpara.bat

D:\arduino-0010\hardware\bootloaders\atmega8>REM Before running this for the fir
st time, you'll need to install giveio.

D:\arduino-0010\hardware\bootloaders\atmega8>REM Unzip drivers\giveio.zip, then
run ginstall.bat.

D:\arduino-0010\hardware\bootloaders\atmega8>uisp -dpart=ATmega8 -dprog=dapa -dl
pt=0x378 --wr_lock=0xFF
Atmel AVR ATmega8 is found.
Writing lock bits ...
Reinitializing device
Atmel AVR ATmega8 is found.

Lock Bits set to 0xff

D:\arduino-0010\hardware\bootloaders\atmega8>uisp -dpart=ATmega8 -dprog=dapa -dl
pt=0x378 --wr_fuse_l=0xdf --wr_fuse_h=0xca
Atmel AVR ATmega8 is found.

Fuse Low Byte set to 0xdf

Fuse High Byte set to 0xca

D:\arduino-0010\hardware\bootloaders\atmega8>uisp -dpart=ATmega8 -dprog=dapa -dl
pt=0x378 --erase --upload --verify if=ATMegaBOOT.hex
Atmel AVR ATmega8 is found.
Erasing device ...
Reinitializing device
Atmel AVR ATmega8 is found.
Uploading: flash
Verifying: flash
flash error at address 0x1c40: file=0x0d, mem=0xff
flash error at address 0x1c41: file=0x92, mem=0xff
flash error at address 0x1c42: file=0xa2, mem=0xff
flash error at address 0x1c43: file=0x36, mem=0xff
flash error at address 0x1c44: file=0xb1, mem=0xff
flash error at address 0x1c45: file=0x07, mem=0xff
flash error at address 0x1cc0: file=0x1f, mem=0xff
flash error at address 0x1cc1: file=0x93, mem=0xff
flash error at address 0x1d40: file=0x8d, mem=0xff
flash error at address 0x1d41: file=0xdf, mem=0xff
flash error at address 0x1e40: file=0x81, mem=0xff
flash error at address 0x1e41: file=0x91, mem=0xff
flash error at address 0x1ec0: file=0x0d, mem=0xff
flash error at address 0x1ec1: file=0xd0, mem=0xff
flash error at address 0x1f40: file=0xfa, mem=0xff
flash error at address 0x1f41: file=0xce, mem=0xff
flash error at address 0x1fc0: file=0xe1, mem=0xff
flash error at address 0x1fc1: file=0x99, mem=0xff

D:\arduino-0010\hardware\bootloaders\atmega8>uisp -dpart=ATmega8 -dprog=dapa -dl
pt=0x378 --wr_lock=0xCF
Atmel AVR ATmega8 is found.
Writing lock bits ...
Reinitializing device
Atmel AVR ATmega8 is found.

Lock Bits set to 0xcf

The LED will become dim light when connect with parallel port only, and become bright light after connect to USB.

The dim LED is not a good sign. Check for correct pin connectivity from parallel programmer to ICSP. GND is pin 6, +5V is pin 2, Reset is pin 5, MISO is pin 1, SCK is pin 3 and MOSI is pin 4.

pin numbering viewed from the top:

MISO |1 2| +5V
SCK  |3 4| MOSI
RST  |5 6| GND

I would also try disconnecting the usb power and using external power...

D

Hi ,
I built the parallel port programmer from

I would like to know if this programmer is supported by other softwares like avrdude and ponyprog.
If so what is is called

Thanks
Newbee

Thanks nkcelectronics and Daniel,

I'm wondering whether my ATmega8 is still alive....

Before insert the ATmega8 into socket, these pins have a very large resistance value like open circuit:

SCK and GND
SCk and RST
AREF and GND

After insert the AVR chip, those values are changed to:

SCK <-- 52K --> GND
SCk <-- 91K --> RST
AREF <-- 52K --> GND

Are those resistance changes normal? thanks!

Hi guru,

Check this page:
http://www.adafruit.com/index.php?main_page=product_info&cPath=16&products_id=11

I believe the ICSP programmer is compatible with ponyprog.

genio

resistance values in powered circuits are not reliable, as the circuit influences the meter reading. Measuring the resistance of semiconductors like chips is similarly not reliable, as the chips are powered and you can never know what state the pins are in internally.

D

Genio,

I had the same problem here, with WinXP and Arduino 0010, trying to bootload a Self Made Serial Single Sided Arduino with Atmega8. I turned off Anti Virus and Firewall, but didn't work.

I also tried Arduino 0009, but only worked with 0007 version. Try it. But start it running run.bat, because arduino.exe didn't work here.

If it works, you can try to upload sketches with 0010. I use 0007 for this too, but with the patch optimization(Arduino Playground - LibPatch0007)

I didn't ask before just because it worked fine.
But can anyone explain this?

Adlison: what errors did you get when you tried it with 0010 or 0009? 0007 uses uisp instead of avrdude for doing the upload and bootloader burning, so I'm not too surprised that you had different results. Still both of them should work, and it would be good to figure out what the problem is with the later versions.

I'm using WinXP Professional, parallel port cable.

But note that the same occured in Giuliano Obici's Workshop in Brazil, using Ubuntu. I don't remember the error message, but we tried 0010 (didn't work) and 0007 (that worked fine). The board used is the same, Self Made Serial Single Sided with Atmega8. Not only one board, but many...

I'm curious too, because you know, I'm developing that new version of SSS Board. The same problem with it.

Here, on version 0010, running run.bat or arduino.exe (both works), the error message is:

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

On version 0009, both runs too (arduino.exe and run.bat), and it says unknown option, and show all options (twice):

d:\Arduino\Software\arduino-0009\tools/avr/bin/avrdude: unknown option -- d
Usage: avrdude [options]
Options:
-p Required. Specify AVR device.
-b Override RS-232 baud rate.
-B Specify JTAG/STK500v2 bit clock period (us).
-C Specify location of configuration file.
-c Specify programmer type.
-D Disable auto erase for flash memory
-i ISP Clock Delay [in microseconds]
-P Specify connection port.
-F Override invalid signature check.
-e Perform a chip erase.
-O Perform RC oscillator calibration (see AVR053).
-U :r|w|v:[:format]
Memory operation specification.
Multiple -U options are allowed, each request
is performed in the order specified.
-n Do not write anything to the device.
-V Do not verify.
-u Disable safemode, default when running from a script.
-s Silent safemode operation, will not ask you if
fuses should be changed back.
-t Enter terminal mode.
-E [,] List programmer exit specifications.
-y Count # erase cycles in EEPROM.
-Y Initialize erase cycle # in EEPROM.
-v Verbose output. -v -v for more.
-q Quell progress output. -q -q for less.
-? Display this usage.

avrdude project: URL:http://savannah.nongnu.org/projects/avrdude
d:\Arduino\Software\arduino-0009\tools/avr/bin/avrdude: unknown option -- d
Usage: avrdude [options]
Options:
-p Required. Specify AVR device.
-b Override RS-232 baud rate.
-B Specify JTAG/STK500v2 bit clock period (us).
-C Specify location of configuration file.
-c Specify programmer type.
-D Disable auto erase for flash memory
-i ISP Clock Delay [in microseconds]
-P Specify connection port.
-F Override invalid signature check.
-e Perform a chip erase.
-O Perform RC oscillator calibration (see AVR053).
-U :r|w|v:[:format]
Memory operation specification.
Multiple -U options are allowed, each request
is performed in the order specified.
-n Do not write anything to the device.
-V Do not verify.
-u Disable safemode, default when running from a script.
-s Silent safemode operation, will not ask you if
fuses should be changed back.
-t Enter terminal mode.
-E [,] List programmer exit specifications.
-y Count # erase cycles in EEPROM.
-Y Initialize erase cycle # in EEPROM.
-v Verbose output. -v -v for more.
-q Quell progress output. -q -q for less.
-? Display this usage.

avrdude project: URL:http://savannah.nongnu.org/projects/avrdude

Hmm, I can burn the bootloader to an ATmega8 on a Diecimila with an AVRISP mkII using Arduino 0010 under Mac OS X. (It looks like Arduino 0009 has a bug that will prevent it from working.) But there are a lot of things different there. Does the IDE not show you the command line it's using (if you set upload.verbose to true)? If it does, can you post it here?

I'm having similar problems -

I put together my boarduino and it lights - and will do the quick red flash when you press reset.

If i connect only my parallel cable - i get both LED's dimly lit.

If i connect the power supply while the parallel cable is installed - both lights turn bright and solid.

I hit the reset button and the green remains bright - and the red is off.

If i try to program while holding the reset button - it flashes like there is data being transfered - but it always errors out.

On my board pin 2 has no connection.

I am going to try a shorter cable (its about 18" right now) as the conductors are thin (chopped an IDE cable for the 6 pin connector)

Thanks -

Barton

Mellis,

sorry for delay. I was trying to understand what did you ask me, when said: "set upload.verbose to true". Since I am new arduiner it tooks time to understand that you wanted me to change that line in preferences.txt in \documents and settings\user\application data\arduino.

Well, I did it with 0010, and the message is (note that there is a line that repeated 65 times, and I cut 64) :

Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
d:\Antigo\Gizmo\Drivers e Programas\Arduino\Software\arduino-0010\hardware/tools
/avr/bin/avrdude -Cd:\Antigo\Gizmo\Drivers e Programas\Arduino\Software\arduino-
0010\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -pm8 -cdapa -i800 -e -Ulock
:w:0x3F:m -Uhfuse:w:0xca:m -Ulfuse:w:0xdf:m


avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         System wide configuration file is "d:\Antigo\Gizmo\Drivers e Programas\
Arduino\Software\arduino-0010\hardware/tools/avr/etc/avrdude.conf"

         Using Port            : lpt1
         Using Programmer      : dapa
         Setting isp clock delay: 800
         AVR Part              : ATMEGA8
         Chip Erase delay      : 10000 us
         PAGEL                 : PD7
         BS2                   : PC2
         RESET disposition     : dedicated
         RETRY pulse           : SCK
         serial program mode   : yes
         parallel program mode : yes
         Timeout               : 200
         StabDelay             : 100
         CmdexeDelay           : 25
         SyncLoops             : 32
         ByteDelay             : 0
         PollIndex             : 3
         PollValue             : 0x53
         Memory Detail         :

                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           eeprom         4    20   128    0 no        512    0      0  9000  90
00 0xff 0xff
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           flash         33    10    64    0 yes      8192   64    128  4500  45
00 0xff 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           lfuse          0     0     0    0 no          1    0      0  2000  20
00 0x00 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           hfuse          0     0     0    0 no          1    0      0  2000  20
00 0x00 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           lock           0     0     0    0 no          1    0      0  2000  20
00 0x00 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           calibration    0     0     0    0 no          4    0      0     0
 0 0x00 0x00
                                  Block Poll               Page
      Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           signature      0     0     0    0 no          3    0      0     0
 0 0x00 0x00

         Programmer Type : PPI
         Description     : Direct AVR Parallel Access cable
           VCC     = 3
           BUFF    =  (not used)
           RESET   = 16
           SCK     = 1
           MOSI    = 2
           MISO    = 11
           ERR LED = 0
           RDY LED = 0
           PGM LED = 0
           VFY LED = 0

(REPEATS THIS LINE 65 TIMES)
bitbang_cmd(): [ AC 53 00 00 ] [ FF FF FF FF ]

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


avrdude done.  Thank you.

I hope it helps you to help us.

I'm testing here, and found another problem. (still using Serial Single Sided with Atmega8, parallel port cable)

Using DOS Prompt under WinXP, burnpara.bat from 0007 version works fine: the pin13 led turns off before burning bootloader, and reset button blinks this led.
burnpara from 0010 version doesn't work: the pin13 led remains dim bright before bootloader, and reset button doesn't work.

I saw differences between these files. On 0010 there isn't a command before uisp: -v=4. the line cd.. doesn't work, since the burnpara file is located two levels over root. And the last line cd bootloader doesn't work too, because the directory name is bootloaderS. I made the changes on 0010, and didn't work.
I copyied 0010 on 0007 directory and vice-versa and they run but don't work. The same with uisp file. Can anyone explain this? Can this be related with 0010 bootloader not working with SSS, Mellis?

Adlison: the burnpara.bat file is a bit outdated, so I'm not surprised it doesn't work. Have you installed giveio (linked to from the bottom of the parallel programmer page)? You might need to get permission to access the parallel port (although I would think that uisp would need it too). Also, in the programmers.txt file in ARDUINO/hardware has a parallel.delay key. Try increasing the value from 800 (maybe to 1600 or more).

Giveio is installed, and XP_stop_polling.reg too. Under 0007 directory, burnpara always works. Under 0010, it doesn't.

I changed parallel.delay to 1600, 16000 and 100000. Not working yet.

Independant of parallel.delay changes, something changed while trying. I didn't change anything, but now 0010 bootloader doesn't erase previous bootload done under 0007. It is sending the same error message while bootloading, but just keeps previous bootload and sketches loaded (blink test).

If you set upload.verbose to true in the preferences file (apologies for giving such opaque instructions before), does it display that commands that are used to burn the bootloader (in Arduino 0007 and 0010)? If so, give it a try from the command line. That way, if it doesn't work, you can ask the avrdude folks why uisp can burn a bootloader with your setup and avrdude can't. They might have more of an idea of what's different between the way the two programs work. The mailing list is here - or post here and I can post to the avrdude list.

Mellis,

the first command used by arduino 0010 is:
avrdude -avrdude.conf -v -v -v -v -pm8 -cdapa -i800 -e -Ulock:w:0x3F:m -Uhfuse:w:0xca:m -Ulfuse:w:0xdf:m

it doesn't work. I think because it finds the wrong value for device signature of atmega8 (expects 1e9307, but always changing each time you try bootloading - 0x000100, 0x000102,...)

I added -F instruction in this command line and it worked fine.

I saw before in the forum that there is a second command line, like this:
avrdude -avrdude.conf Or the results are the same?-v -v -v -v -pm8 -cdapa -i800 -e -Uflash:w:d:\arduino-0010\hardware\bootloaders\atmega8\ATmegaBOOT.hex:i -Ulock:w:0x3F:m
I couldn't see it on arduino 0010 messages, because the first command line didn't work, so the second command line is not shown.

Like the first, it nedded the -F instruction to works. But it tooks 10 minutes!

I saw something similar here:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1192727600
and I think is a better place to post, since it seems to be a software problem.

The time needed to burn bootloader is almost 10 minutes, but with arduino 0007 is almost 30 seconds here.

My first question is: are there some difference between these bootloaders (0010 and 0007) for the use of Arduino Board? Or the results are the same on chip functions and memory space usage?

My second question:
Can this time (10 minutes) be reduced on arduino 0010?

My third question:
Is there some file to change these command lines to add -F instruction and use it under Arduino 0010?

And the Fourth:
the page:

says:

  • bootloader.atmega8.unlock_bits (default value: 0xFF) is the value to write to the ATmega8 lock byte to unlock the bootloader section.

but the first command line on arduino 0010 says:

-Ulock:w:0x3F:m

Does this different values for Unlock bits cause some problem? Are they intentional or it is an error?

Sorry if I'm asking too much.