Step 12: Programming the ExtraCore (or a Pro-mini) with AVRDude and another Arduino
Here is an alternative method if you have another Ardunio, but don't have an FTDI interface.
WARNING: This will blow away your boot loader. You can always use this method to get it back or just keep loading sketches with this method. This method is for the adventuresome or impatient. AVRdude will happily turn your board into a useless coaster if you experiment with any fuse settings. Tread with caution.
Wiring from the existing Arduino
The picture shows a Pro-Mini, but any Arduino compatible should work.
- Load ArduinoISP to your existing (or borrowed) Arduino. (see below "on the computer" for details).
- Connect D9 to a resistor (220ohm-1k works with most leds) and a LED so you can see the "heartbeat".
- Optionally connect D7 and D8 so you can see what's going on. I don't normally use them when things are working.
- Connect VCC and GND between the boards.
- Connect D10 on the programmer to RST on your new board.
- Connect D11 to D11
- Connect D12 to D12
- Connect D13 to D13
Connect the computer to the Arduino via the USB cable and determine the USB port. Mine was com16 so all my examples use that. Change to fit your situation.
On the computer
Prepare your software
- Open the Arduino IDE
- Load the ArduinoISP sketch
- Double check the Serial.begin command is set to 19200.
- Load it onto your Arduino and make a note of the serial port you used. You will need to use it below with AVRDude.
- Check the heartbeat is working. If it ever stops when AVRDude isn't running, hit the reset button.
- Install or locate WinAVR.
- Load the sketch you want to put on the ExtraCore
- Hit the "verify" button. This will compile the sketch to a .hex file.
- Locate the .hex file. (the .hex file is written to /tmp (on Mac and Linux) or \Documents and Settings\<USER>\Local Settings\Temp (on Windows)).
- Open a command prompt. (Start->cmd.exe)
- Use the CD command to change to the WinAVR bin directory. (remove quotes) "CD C:\winavr\bin" for example.
- Run the following command (remove angle brackets and use your own com port)
C:\winavr\bin\>avrdude -p m328p -P <com16> -c avrisp -b 19200
If all is well, you will see a chip signature of "0x1e9514" or "0x1e951"even if AVRDude says "Yikes I was expecting 0x1e951...".
Burn the sketch to the board
Replace the stuff in <angle brackets> with your path and sketch name.
C:\winavr\bin\>avrdude -p m328p -P com16 -c avrisp -b 19200 -F -U flash:w:<Path to your sketch>\<MySketchName>.hex
If all goes well AVRDUDE will put the sketch on the board and then verify that it worked. Your sketch is now ready to go.
Remove these ads by
Signing Up












































Visit Our Store »
Go Pro Today »




Do you have a link to an article or tutorial that you like with instructions on how to burn a bootloader using an FTDI board?
Thanks!
You might try this method: http://www.instructables.com/id/Programming-Arduino-Bootloader-without-External-Pr/
Just borrowing a working Arduino from someone might be the easiest way.
Good luck!
"The ExtraCore and Arduino Pro-Mini don't have on board USB. Therefore you need a way to program them. The easiest way to is to buy an FTDI chip or cable. http://www.sparkfun.com/products/9716 is the one I use."
I've tried FTDI bitbanging, Arduino as ISP and a couple of random guesses so far, but nothing has worked.
I will try the method you outline in this step sometime, I was just hoping for a more straightforward way - I've burned bootloaders and sketches onto the DIP ATMegas and ATTiny85s before with no problems, but this method is completely new to me :)
Thanks!
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
I bought the following chip, which I thought was the same as the Arduino main board (in a different package): http://www.digikey.com/product-detail/en/ATMEGA328P-AU/ATMEGA328P-AU-ND/1832260
I have a hunch I'll need to modify my boards file in some way, but not sure yet.
The directions above mention 0x1e9514 being ok to use -f with, but I can see how it might be confusing.
Where did you get your solder paste? My local hardware store has some cheap solder paste, but I thought it was for plumbing, NOT surface-mount reflow :P
You can clean it up with some solder wick most likely. I solder these chips by hand all the time and it's actually pretty easy. That resonator on the other hand, that thing is tricky to hand solder.
I had to fix some solder bridges by over-applying solder to the ATmega328 pins in order for the wick to work. This is why I assumed I had fried my chip from heat - the chip got too hot to touch a couple of times :P I'm curious if maybe it's possible to a) burn out the resonator from heat or b) burn out the fuses of the ATmega328 chip to cause the invalid device signature error. Any thoughts there?
Just so you know, I attempted a second board yesterday and soldered it up much better - and it worked perfectly first try. Didn't even have to use avrdude at all! I will send you an e-mail and a pull request on Github soon with an Eagle library and other goodies :)