NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Everything Else » How do you guys deal with 2 or more mcus?

August 26, 2011
by missle3944
missle3944's Avatar

Hi guys,

I just bought another 2 atmegas and it seems to be just a pain trying to plug and replug my programming cable into each of the pins of the 2 microcontrollers. How do you guys deal with that and having to program 2 or more mcus? I was wondering if there was some kind of switch were I could have the programming cable hooked up to and I just have to turn it one way and it programs the master, and then I turn it the other way to program the slave. Or something similar to that.


August 27, 2011
by bretm
bretm's Avatar

If you're not using both of those pins on both of the MCUs, you could connect either the TX's or the RX's together, and then use an SPDT switch (same kind as the programming switch) to switch the other wire between the two chips.

If you're using both pins on both chips, you can use a DPDT switch, but it's hard to find one with the 0.3" row spacing and 0.1" pin spacing for a breadboard. Otherwise you can use two SPDT switches, or four SPST switches (like the DIP switches that come with the Nerdkit) and just remember to switch them in pairs.

August 27, 2011
by missle3944
missle3944's Avatar

Thanks Bretm,

I'll give that a shot with the 2 spdt switches included with the nerdkit and hopefully it will help.


September 02, 2011
by BobaMosfet
BobaMosfet's Avatar

I drew up a circuit, had PCBs manufactured, put the components on, including a header for the programming cable, and just swap MCUs out of it, so I never have to change the programming cable again.


Post a Reply

Please log in to post a reply.

Did you know that you need to think about wires differently when you're transmitting signals more than a few inches? Learn more...