I want to mix up to 4 rectangle audio signals which come directly from a microcontroller's timer output pin and contain only one frequency each. For example, if the microcontroller outputs 400Hz and 600 Hz, i want the output to contain both frequencies like they are played on individual speakers.
Afterwards, the mixed signal is amplified by a BC547, then a 2SC5449 transistor and finally played by a speaker.
The problem is that just adding the signals wouldn't apply here because the transistors just cut off everything above 1V.
So i need a mixing "function" which accepts booleans and outputs booleans. Is that possible? I tried XOR, but combining 300Hz and 400Hz sounds like a razor, which is obviously wrong.
Do you have any idea how to do this? I already have an ATtiny13, which is connected to the raw signals and the amplifier, where I XORed the signals.
The 120 ohm resistor was added later when i noticed the speaker was quite a load.