Full disclosure. I am a total noob and am trying to learn but would really really appreciate help programming an ATtiny13.
Basically, I'm using an ATtiny13 to control a relay for switching in a guitar pedal. Because of the gain of the pedal and the efficiency of the relay there's a "switch pop" when switching.
The usual solution is to use an optocoupler or LED and LDR to pull the output to ground for ~30ms as the relay switches which eliminates the pop.
I have the programming worked out to send a brief output voltage to light the LED. It works OK. The problem is the LDRs are slow and variable and some work better than others.
I think there's a better way. Instead of the output pin switching to HIGH for 30ms to light the LED. I would like to program it to:
- When not switching, sit as an input that does nothing to not affect the output
- When switching, change to a OUTPUT set to LOW to function as a (near) ground to mute the output.
Right now the programming is set to LOW OUTPUT when not switching. I've tested this and it's close enough to ground to mute the signal. So this should work.
In at a loss trying to program. I would have no problem shaing the entire code if someone could walk me through programming this.
Any help would be so very appreciated.
Thank you!