ArduinoISP not working

Hello,

I have been trying for around a month now to use an Arduino Uno as an ISP to flash code to the Sparkfun Geiger Counter. In the end, after much deliberation with their technical support, I purchased the ArduinoISP board, but now that is not working either.

I thought that if I tried to upload code to my Arduino using the board, I could see if it was an issue with the setup or with the board or with my code. I tried just uploading the 'blink' example sketch. It came back with a whole host of errors:

Sketch uses 1,030 bytes (3%) of program storage space. Maximum is 32,256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2,039 bytes for local variables. Maximum is 2,048 bytes.

avrdude: Can't find programmer id "arduinoisp"

Valid programmers are:
c2n232i = serial port banging, reset=dtr sck=!rts mosi=!txd miso=!cts [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:791]
dasa3 = serial port banging, reset=!dtr sck=rts mosi=txd miso=cts [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:778]
dasa = serial port banging, reset=rts sck=dtr mosi=txd miso=cts [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:765]
siprog = Lancos SI-Prog http://www.lancos.com/siprogsch.html [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:752]
ponyser = design ponyprog serial, reset=!txd sck=rts mosi=dtr miso=cts [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:739]
pavr = Jason Kyle's pAVR Serial Programmer [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:710]
dragon_pdi = Atmel AVR Dragon in PDI mode [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:703]
dragon_dw = Atmel AVR Dragon in debugWire mode [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:695]
dragon_hvsp = Atmel AVR Dragon in HVSP mode [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:687]
dragon_pp = Atmel AVR Dragon in PP mode [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:679]
dragon_isp = Atmel AVR Dragon in ISP mode [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:671]
dragon_jtag = Atmel AVR Dragon in JTAG mode [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:663]
jtag2pdi = Atmel JTAG ICE mkII PDI mode [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:655]
jtag2avr32 = Atmel JTAG ICE mkII im AVR32 mode [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:647]
jtagmkII_avr32 = Atmel JTAG ICE mkII im AVR32 mode [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:639]
jtag2dw = Atmel JTAG ICE mkII in debugWire mode [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:631]
jtag2isp = Atmel JTAG ICE mkII in ISP mode [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:623]
jtag2 = Atmel JTAG ICE mkII [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:615]
jtag2fast = Atmel JTAG ICE mkII [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:607]
jtag2slow = Atmel JTAG ICE mkII [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:599]
jtagmkII = Atmel JTAG ICE mkII [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:591]
jtag1slow = Atmel JTAG ICE (mkI) [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:584]
jtag1 = Atmel JTAG ICE (mkI) [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:576]
jtagmkI = Atmel JTAG ICE (mkI) [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:568]
butterfly_mk = Mikrokopter.de Butterfly [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:562]
mkbutterfly = Mikrokopter.de Butterfly [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:556]
avr911 = Atmel AppNote AVR911 AVROSP [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:549]
avr109 = Atmel AppNote AVR109 Boot Loader [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:543]
butterfly = Atmel Butterfly Development Board [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:537]
usbtiny = USBtiny simple USB programmer, USBtinyISP - Inexpensive USB AVR Programmer [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:531]
usbasp = USBasp, USBasp - USB programmer for Atmel AVR controllers - fischl.de [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:525]
avr910 = Atmel Low Cost Serial Programmer [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:519]
stk600hvsp = Atmel STK600 in high-voltage serial programming mode [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:513]
stk600pp = Atmel STK600 in parallel programming mode [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:507]
stk600 = Atmel STK600 [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:501]
stk500hvsp = Atmel STK500 V2 in high-voltage serial programming mode [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:495]
stk500pp = Atmel STK500 V2 in parallel programming mode [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:489]
stk500v2 = Atmel STK500 Version 2.x firmware [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:483]
mib510 = Crossbow MIB510 programming board [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:477]
stk500v1 = Atmel STK500 Version 1.x firmware [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:471]
stk500 = Atmel STK500 [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:465]
buspirate = The Bus Pirate [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:455]
avrisp2 = Atmel AVR ISP mkII [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:449]
avrispmkII = Atmel AVR ISP mkII [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:443]
avrispv2 = Atmel AVR ISP V2 [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:437]
avrisp = Atmel AVR ISP [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:431]
jtagkey = Amontec JTAGKey, JTAGKey-Tiny and JTAGKey2 [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:408]
2232HIO = FT2232H based generic programmer [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:382]
avrftdi = FT2232D based generic programmer [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:355]
arduino = Arduino [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:335]
wiring = Wiring [C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf:329]

but just hung on 'uploading...' without finishing.

I think it's not installed properly - but why not? I downloaded the files and used the Device Manager to specify the folder containing all the different drivers (didn't know which one was right). Was this correct, or is there a better way to go about the process?

'Blink' uploaded fine to the Uno without an ISP. Interestingly. the Arduino IDE identifies COM8 as having an Uno plugged in, but COM8 disappears with the ISP plugged in, which further suggests it's a configuration issue. However, I'm not sure what I've done wrong. I'm trying to finish this for a deadline on Monday, so any help would really be appreciated!

Thanks in advance,
Archie

The Arduino Uno as ISP should have worked. The ISP you bought is almost the same as an Uno (but with smaller microcontroller and ICSP pins on the board).

Did you connect everything properly, and did you select the right boards, and functions from the menu in the right order ?

The alternative is : Gammon Forum : Electronics : Microprocessors : Atmega bootloader programmer
It will take some time to do that page completely, but it is worth it.

It came back with exactly one error - that the programmer isn't recognized. some definition is missing somewhere. I've never used arduinoisp - it's not one of the more popular ones. Most people seem to use ArduinoAsISP, USBAsp, USBTinyISP, or AVRISP.

How are you attempting to program it? You should be choosing "ArduinoISP" from tools -> programmers, and then uploading via file -> upload using programmer.

Also, what IDE version are you using?

The USBAsp is only $5, and the IDE recognizes it (and so many people use them that everyone would know if an update broke it, because it would be all over the forums). Nano's are $3 and you can just add some jumpers to one to make a dedicated ArduinoAsISP on the cheap too.

Sparkfun Geiger Counter. In the end, after much deliberation with their technical support,

This is what you typically get from sparkfun - overcharged and disappointed. Awful vendor, sky high prices, slow shipping - I use them only as a last resort, when I can't get something from anywhere else.

I was attempting to use my Uno R3 SMD edition as an ISP, but it didn't work and the guy at Sparkfun told me to get a different AVR programmer, because using the Arduino was 'a bit of a hack', and I'd gotten a few errors. He was heavily suggesting the Sparkfun AVR programmer (perhaps this was all just a marketing ploy?!) but I really need this all done as soon as possible (I have a robotics project with a deadline of Monday), so I just ordered the first one with free next-day delivery from Amazon. When this didn't work, he was like 'well I don't really know, try these forums...' -of which this was one.

I am certainly going to be avoiding Sparkfun in the future - the prices are ridiculous (luckily I wasn't paying this time), and the documentation and project tutorials available is shocking when you compare it to someone like Adafruit. Unfortunately, open-source USB Geiger Counters are a bit hard to come by.

In the mean time, does anyone know of any way to flash hex to my Geiger Counter with either the ArduinoISP or my Uno as ISP. I could post the original error messages in full from the Uno as ISP if it helps, the Sparkfun guy said ' I don’t think the Arduino as ISP is reading the Geiger Counter’s microcontroller correctly', as it gave me: 'Device signature = 0x000000'

When this is all done and I have a minute of spare time not taken up by robotics or Avrdude troubleshooting, I'll try and get my hands on a USBAsp.

I'm using IDE version 1.6.4

Thanks,
Archie

I use a USBasp version 2, but most others use an Arduino Uno as ISP.
Did you read the last two lines of my Reply #1 ? Follow that page from begin to bottom. You could make a photo of the wiring so we can check it.

Device Signature= 000000 usually means a wire is connected wrong, or the chip has been set to use a crystal or external clock signal (there's no crystal on that board). That could happen if you attempted to bootload it as an Arduino Uno or other board that uses an external crystal.

I will follow the Arduino tutorial tomorrow since time is of the essence, and I'd like to avoid the longer one if possible. In the meantime, I have attached an image of the connections from board to board in case that is the problem.

Thanks for all your fantastic (and fast!) help - without people like you I'd still be burning out LEDs on a PP3 battery!

Archie

Thanks for the photo. For the Arduino ISP board, that is all that is needed.
Did you do the steps in this tutorial ? https://www.arduino.cc/en/Guide/ArduinoISP
Could you upload the blinking sketch with the programmer (in the menu is: upload with programmer). Can you burn the bootloader of the Uno ?

Perhaps there is a problem with your USB. A laptop or a cheap USB cable might not give enough power to the Arduino.
Did you install the driver for the Arduino ISP board ? It is strange that it can't be found.
Try another computer with other USB cable.

There is a very small chance that the Sparkfun ICSP header is wrong or badly soldered. You could measure with a multimeter that the pins are connected and not shortcut. But only if the programmer works with the Uno and not with the Geiger board.

Brilliant. I tried on the laptop - no luck. Will try on an iMac tomorrow, to see if the OS or computer are at fault.

Thanks,
Archie

What version of IDE are you using? The older versions of the IDE are using an older version of avrdude that does not have the support for the "ArduinoISP" programmer. You could update your version of avrdude to the latest v6.1. Or update to a latest version of IDE 1.6.x.

For avrdude v6.1, http://download.savannah.gnu.org/releases/avrdude/avrdude-6.1-mingw32.zip

I've just tried the first step of the 'Gammon' tutorial, but when uploading the code to my Uno it says:

Arduino: 1.6.4 (Mac OS X), Board: "Arduino Uno"

Build options changed, rebuilding all
Using library SPI in folder: /Users/me/Downloads/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/SPI

/Users/TamsinRoques/Downloads/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10604 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/me/Downloads/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Users/me/Downloads/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard -I/Users/me/Downloads/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/SPI /var/folders/zj/br6tf1ts2c186628d4_nwtc40000gn/T/build7036892353788989597.tmp/blt.cpp -o /var/folders/zj/br6tf1ts2c186628d4_nwtc40000gn/T/build7036892353788989597.tmp/blt.cpp.o
blt.ino:131:21: fatal error: HV_Pins.h: No such file or directory
compilation terminated.
Error compiling.

What do I do now? Do I need to be installing something else?

I don't know what you have downloaded, but HV_pins.h should be part of it.

I haven't downloaded anything - I'm just using normal Arduino IDE 1.6.4 on Mac OSX 10.9.5. Do I need to download something? I just copied and pasted the code in the github repo into a IDE sketch.

I've just done a Spotlight search on the mac, and the HV_Pins.h is in fact on the system. Should it be in a particular directory?

Thanks,
Archie

I don't know what you are doing or what you have on your computer anymore. Sorry.
Do you only one Arduino installed ? And are you following the bootloader tutorial of Nick Gammon ? Gammon Forum : Electronics : Microprocessors : Atmega bootloader programmer
Did you download something from Github ? What did you download ?

I don't really know what's what either anymore!

The Nick Gammon tutorial seems very complicated, and this one which I found was simpler. For the Gammon tutorial, I didn't download anything from the Github, but I just copied and pasted one of the .ino sketches.

I am now trying an Arduino.cc tutorial here: Arduino Playground - MegaISP . It seems to be working a lot better, but when I try the command:

avrdude -p m328p -P /dev/cu.usbmodem621 -c avrisp -b 19200

I get: avrdude: stk500_recv(): programmer is not responding

I have installed Crosspack, as recommended in the Arduino tutorial. What has gone wrong?

I think that this one should do exactly what I want it to, in a simpler way than the Nick Gammon one.

UPDATE: I connected the 'heartbeat' LED to pin 9. The heart does indeed beat, but it freezes when I try to send any commands

UPDATE 2: The LED connected to pin 7 (the programmer LED) flashes quickly and briefly when I send the command, but nothing after that. The Pin 8 'error' LED shows nothing.

That Mega-ISP is from 2008. That is very old in Arduino years. Nick Gammon put a lot effort to make a good bootloader programming sketch.

If your Arduino IDE files (the system libraries and so) have been changed, download the newest version. Remove every old version of the Arduino IDE.

Follow the page of Nick Gammon from begin to bottom.

Check the link to Github in the "Code" section.
Download the zip file from GitHub and copy the folder "Atmega_Board_Programmer" into your user Arduino folder (where your projects are). Start the Arduino IDE and compile that sketch.
It should compile just fine (27.956 bytes (86%) code and 255 bytes (12%) ram).

If that doesn't work, then perhaps something is wrong with the hardware.

I would follow that code, but the tutorial is quite long and complex, and really I'm not sure I understand it. I am now just trying to get it to work with the ISP board I bought.

Moving back to the original point of this question that the ArduinoISP board is not working, I cannot identify which serial port it is plugged into on Mac OSX. I have successfully uploaded 'blink' with it over /dev/cu.usbmodem621 with the Arduino IDE, although nothing comes up in the tools>port menu, except the standard bluetooth stuff.

When I'm trying to use AVRdude in the terminal, it says that it can't find that serial port, and if I give it no value for '-P', it gives me:

avrdude: ser_open(): can't open device "unknown": No such file or directory

How do I find what serial port is being used - is it hidden somewhere? I'm really not a mac person, so I don't know these things.

Thanks

I don't know mac either. The port should show in the tools>port menu.