Main Site Documentation

Two Output Compars on same pin


#1

OK I have another question for experts.

So my goal here is to mix two signals both square waves, that may or may not have the same duty cycle or frequency. I want to do basic OR mixing of these two singles and output them on a single pin.

In the past I have done this on a AVR by using two interrupts (one for each single) having them both manipulate the same pin.

I have successfully created a single frequency using output compare on a pin but I seem to get an error when I try and have 2 output compare objects manipulate the same pin (not uprising). How can I do this without having to do the mixing externally?

I could output each freq on it’s own pin and mix them external but this would be a pain and would be much better to do in software.

Thanks,
Eric


#2

You can do this in RLP but why not just use an OR gate on 2 pins?


#3

Thanks for the quick reply,

Well I could do it external, just figured it would be cleaner to do it in software.

Well guess that dose it, time to dive into RLP, it’s needed for other parts of the project anyway.

Thanks again,
Eric