If your MCU isn't powering up, it probably means that your external programmer isn't putting +5V on your board. Personally I am just programming it with C. This would mean you are not using Arduino at all, but just C and the AVR libraries. You can use your STK 500 in AVR Studio to directly upload software to your board. If you are going to be programming through ICSP, you will bypass the Arduino bootloader which clears up some space. Power would flow into the programmer, and I don't really think that this is healthy for your programmer.īe sure no power is supplied to your board, and connect the other end of the cable to your external programmer, be it an STK 500, AVRISP or an AVR Dragon, or anything alike that has a 6 pin ICSP header. However, that would be something nice for a next Instructable.Īs electricity goes two ways, I recommend disconnecting the ICSP cable whenever you have your external programmer switched off. You can prevent electricity flowing back by adding a diode just after your battery/power supply or you can add another 3-pin connector with a jumper so you can swap the power supply. Be sure to connect either the ICSP - OR - a battery/power supply, and never both. So here is the catch, if you have an external programmer connected and you don't have a protection diode, the 5V from the programmer will flow into the battery or power supply. Your external programmer will automatically (usually) power your board through ICSP. Word of warning: if you connect your board to an external programmer through ICSP, 5V is put on pin 2! That means that this pin should directly connect to where-ever your 5V comes from (be it a 7805 or somewhere else). Now mark which is pin 1 near your ICSP header, and connect a cable to it. I'll spare you the sight of my perfboard's back view! This takes some soldering and can be quite annoying, as the pins are quite near eachother. Connect pin 6 of the ICSP header to your ground (GND). Connect pin 5 of the ICSP header to the RESET pin of your MCU (usually pin 1) Connect pin 4 of the ICSP header to the MOSI pin of your MCU. Connect pin 3 of the ICSP header to the SCK pin of your MCU. So not necessarily to your Vcc pin on your MCU, simply put +5V on it. Connect pin 2 of the ICSP header to your +5V supply on your board. Connect pin 1 of the ICSP header to the MISO pin of your MCU. See the image below with the ICSP header pinout and do the following: Beware of the orientation! Before proceeding please read the warning at the bottom of this page. It works just the same, but be sure to leave NC unconnected. This list is for 2x3 ICSP headers, if you want to use the 2x5 instead, see the image. Be sure to remember which side everything goes to. You can place your ICSP header basically anywhere on your breadboard or perfboard (or PCB), simply connect the following lines to the pins you wrote down. I'm a bit new to the world of electronics, so if you find a mistake please feel free to comment! All you'd have to do is connect slightly differently - just follow the image and it'll work fine.īelow you will see my slightly unorganised remotecontrol repeater, but hey, it works :) In step 3 you can also see the pinout for the 2x5 header, which works just the same. The 10-pin header doesn't really add anything in ICSP mode. This Instructable tells you how to add a 6-pin ICSP header. ![]() If that isn't enough feel free to comment and I'll help you as best as I can!īy writing this Instructable (my first, by the way), I assume you have completed an instructable such as the following: - thanks jmsaavedra! This should, however, be compatible with any kind of breadboard-connected MCU or any other set up you have, too. If you have tried this before, but can't programme it, I will also tell you how to fix that from my own experience. So if you are pulling your MCU out each time you want to update the software on it and putting it into a programmer, or if you are just testing out your MCU and don't know what you're going to do with it yet, you can add the ICSP pins. ![]() ![]() ICSP is basically "in circuit serial programming" which allows you to upload software to your MCU without having to pull it out every time. This will work for non-Arduino's nicely as well. Basically, using the ICSP header will allow you to use an external programmer to 'upload' software to your MCU (microcontroller unit). If you made your own Hackduino or similar project, you may be wondering how to add the ICSP header. So you may have been playing with Arduino's, or rather, Hackduino's.
0 Comments
Leave a Reply. |