Lately I've been doing some programming for a board I designed, and came across an annoying phenomenon which occurs while I am programming the AVR microcontroller over the ISP connection. I'm wondering if I can do anything to mitigate it.
I have three input channels of a ULN2003 connected to the same pins of the AVR as used by MOSI/MISO/SCK on the ISP header. This ULN2003 is used to drive some relays. During programming - even though the relays have no power to the coils (because only the programmer is powering the board) - I get some high-pitched buzzing noises coming from the relays. I'm sure this is probably fairly benign (is it?), and nothing is being activated if they are somehow switching, but it's annoying, and I was wondering if I could do something about it.
One obvious solution that came to mind would be to somehow automatically disconnect those lines from the ULN2003 during programming. It's my understanding that the reset line is pulled low by the programmer, so I could use this state to also control such switching. I've read elsewhere that one solution (in the context of disconnecting other SPI devices during programming) that could be applied here is to use a 74HC126 buffer; the control pins can be hooked to the reset line, and the gate outputs that are connected to the ULN2003 would go hi-impedance when reset is pulled low.
However, I'm only in need of a temporary solution, so is there any way of doing this with common jelly-bean components I have to-hand? For example, a few simple N-channel MOSFETs?