Saturday 17 October 2015

isp - How should power be supplied for in-system programming?


I'm trying to program an ATmega328 with an AVR-ISP-MK2 from Olimex. The programmer has a setting for whether to supply power to the target board or not. The connector has +5V and GND pins. I wanted to make sure that I've understood this correctly before breaking anything:




  • If the programmer does not supply power (OFF): should I connect the +5V and GND pins from the programmer to the same +5V and GND as the target board, which is powered by another source?





  • If the programmer does supply power (ON): should I power the target board completely from the programmer, so that I pull the +5V and GND on the connector to VCC and GND on the target board? If so, the programmer would be the only power supply.




That is: in both cases, +5V and VCC would be connected, and programmer-pin-GND and target-board-GND would be connected. The only difference would be whether an external power supply is connected.



TARGET jumper controls the powering of the target board. If it is in position ON (check the diagram on the back of the plastic cover) it will provide either 3.3V or 5V to the target board (depending on the position of the POWER jumper) The default position is OFF.




Answer





If the programmer does not supply power (OFF): should I connect the +5V and GND pins from the programmer to the same +5V and GND as the target board, which is powered by another source?



The jumper most likely physically disconnects the +5V pin, so it doesn't matter. Keep GND connected in any case, because the devices require a common reference level to guarantee a reliable communication.



If the programmer does supply power (ON): should I power the target board completely from the programmer, so that I pull the +5V and GND on the connector to VCC and GND on the target board? If so, the programmer would be the only power supply.



Yes, its probably best to completely disconnect the external power supply in that case. Connecting two different DC voltage sources in parallel is almost always a bad idea. Keep in mind, that USB (2.0) can only supply 500mA@5V max, while the programmer will also consume a few mA itself.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...