Burning an Arduino Bootloader with the phenoptix AVR ISP
Background
In yesterday's post about the phenoptix AVR ISP I said I'd share the details of how I used it to install a boot-loader on a blank chip. I was preparing the chip for use in an Arduino clone of my own design. Watch this space for details of that project! For now I'll talk you though on the boot-loader instalation.You will need
- a computer running the Arduino IDE version 1.0.5
- an Arduino board - in my case, an Arduino UNO SMD edition
- a blank chip - the ATMega386p that I mentioned yesterday
- the phenopix AVR ISP programmer, as described yesterday
- the special phenoptix ISP sketch from Github (details below)
Arduino UNO, AVR ISP and ATMega328p |
What you need to do
The process has four main stages:
- Set up the hardware.
- Prepare the Arduino.
- Burn (install) the boot-loader.
- Test the chip.
Set up the hardware
- Carefully insert the chip you want to prepare into the appropriate socked of the phenoptix AVR ISP shield. You may need to straighten the legs of the IC chip before you can insert it.
- Carefully plug the pins of the shield into the header sockets of the Arduino.
- Connect the Arduino to your computer using a USB cable. You should see the LED on the Arduino light up, and you'll also see some flashing on the LEDs of the shield
Prepare the Arduino
You'll need to upload a special sketch to the Arduino. Don't use the standard ISP sketch from the Arduino examples menu. You must use a sketch that's specific to the phenoptix shield. You can get that sketch from github.- Click on this link.
- click on the button marked Raw.
- Copy the text of the sketch to the clipboard.
- Create a new sketch in the Arduino IDE
- Paste the text
- Save the sketch. I called mine phenopitxISP.
- Upload the sketch to the Arduino.
Burn the Bootloader
Up to this point you've used the Arduino IDE in the usual way; you shouldn't need to change the port or board settings from those that you normally use.
For the next stage, however, the Arduino IDE needs to know about the chip you want to prepare, not about the Arduino that you're using as an ISP.
(For an ATMega8, which I also wanted to use, you'd select Arduino NG or earlier w/ ATMega8).
So:
- In the IDE, from Tools/Board, select the board type that corresponds to the target chip.
- From Tools click on Burn Bootloader.
You should see a Burning Bootloader message appear on the status line at the bottom of the IDE. The lights on the shield will flash for quite some while - a minute or so. Once they stop you should see a message on the IDE status line indicating that the Bootloader has been installed.
Now you're nearly done, with one more phase left.
Testing your chip's bootloader
For this stage you will need to try the chip out in the clone where you plan to use it.
- Carefully remove the chip from the panoptix shield.
- Insert it into your clone board.
- Connect the clone board to the computer running the Arduino IDE. You may need to change the port setting on the IDE if you are using a different USB cable from the one you used with your Arduino.
- Using the IDE, install a test sketch on your clone. I edit the standard blink sketch to use delays set to 100 ms. The LED blinks rapidly and I can easily see that I've installed something other than the default version of the sketch on the chip.
Testing the chip in a clone board |
Conclusion
The phenoptix board and software have proved easy to use, and I'm very pleased with the result. I'm now well on the way to preparing the set of Arduino clones I needed.
Comments
Post a Comment