Hi, this is my first shield on arduino, and I'm completely new to electronics, so don't judge me if the question is stupid.
My project is SPI programmer/uart bridge shield for arduino mega. Simple example of its use - programming AVR and then read serial output from this AVR. The next photo is actually its working with atmega328p.
Its scheme is fairly simple too - its just pins to connect spi in the bottom (sck, mosi, miso, ss), and rx0, tx0 on the right, and there is a pins for ground and 3.3v and 5v. To work as a SPI programmer there is a 10uF capacitor connected to one side of switch, and just a ground wire connected to opposite side of switch to work as UART bridge. The base of switch is connected to reset, so when the switch is in upper position - arduino mega working as UART brigde, and when switch in bottom position - as SPI programmer.
Everything works just fine - except one thing - when its in the SPI programmer mode you need to remove right uart rx/tx pins. I don't know why is it so, and how to fix this, so can you guys suggest some solutions - I think its doable with pair of transistors with both base's connected to capacitor's plus lead, but I'm not sure about what transistors should it be (npn/pnp for rx/tx), which resistance's and what the whole scheme should look alike. Or, maybe its doable in arduino SPI programmer source code?
If you have any solution please, get my fritzing project in attachment and edit it, or write it in plain words(first is more preferable as I need to see scheme, coz I'm pretty lame as I said), thanks.
arduino mega ISP shield.fzz.zip (5.17 KB)