Pages: [1] 2   Go Down
Author Topic: ICSP programmer not working  (Read 3263 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

USA
Offline Offline
Sr. Member
****
Karma: 0
Posts: 452
Freeduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 :-P
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
Logged

USA
Offline Offline
Sr. Member
****
Karma: 0
Posts: 452
Freeduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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:

Code:

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

Logged

Daniel
Guest
 Bigger Bigger  Smaller Smaller  Reset Reset

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

D
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi ,
I built the parallel port programmer from
http://www.arduino.cc/en/Hacking/ParallelProgrammer
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
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Taiwan
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Daniel
Guest
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Brazil
Offline Offline
Sr. Member
****
Karma: 0
Posts: 443
..., to learn, to know, to make, to share, to l...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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(http://www.arduino.cc/playground/Code/LibPatch0007)

I didn't ask before just because it worked fine.
But can anyone explain this?
« Last Edit: December 26, 2007, 09:16:28 pm by adilson » Logged

PCB Designer

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 11
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Brazil
Offline Offline
Sr. Member
****
Karma: 0
Posts: 443
..., to learn, to know, to make, to share, to l...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 <partno>                Required. Specify AVR device.
  -b <baudrate>              Override RS-232 baud rate.
  -B <bitclock>              Specify JTAG/STK500v2 bit clock period (us).
  -C <config-file>           Specify location of configuration file.
  -c <programmer>            Specify programmer type.
  -D                         Disable auto erase for flash memory
  -i <delay>                 ISP Clock Delay [in microseconds]
  -P <port>                  Specify connection port.
  -F                         Override invalid signature check.
  -e                         Perform a chip erase.
  -O                         Perform RC oscillator calibration (see AVR053).
  -U <memtype>:r|w|v:<filename>[: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 <exitspec>[,<exitspec>] List programmer exit specifications.
  -y                         Count # erase cycles in EEPROM.
  -Y <number>                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 <partno>                Required. Specify AVR device.
  -b <baudrate>              Override RS-232 baud rate.
  -B <bitclock>              Specify JTAG/STK500v2 bit clock period (us).
  -C <config-file>           Specify location of configuration file.
  -c <programmer>            Specify programmer type.
  -D                         Disable auto erase for flash memory
  -i <delay>                 ISP Clock Delay [in microseconds]
  -P <port>                  Specify connection port.
  -F                         Override invalid signature check.
  -e                         Perform a chip erase.
  -O                         Perform RC oscillator calibration (see AVR053).
  -U <memtype>:r|w|v:<filename>[: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 <exitspec>[,<exitspec>] List programmer exit specifications.
  -y                         Count # erase cycles in EEPROM.
  -Y <number>                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>
Logged

PCB Designer

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 11
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?  
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Integration of technology - the next step.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Brazil
Offline Offline
Sr. Member
****
Karma: 0
Posts: 443
..., to learn, to know, to make, to share, to l...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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) :

Code:
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.
« Last Edit: December 27, 2007, 08:46:43 pm by adilson » Logged

PCB Designer

Pages: [1] 2   Go Up
Jump to: