I want to have four output pins that can optionally use either PWM or bit-bang control. I'd like to be able to change them on the fly and, ideally, independently of one another. Can anyone suggest the simplest approach to this?
I'm thinking that perhaps the simplest approach is to simply toggle them between 100% and 0% when I want to use them in bit-bang mode. Otherwise, I would need four independant muxes. Thoughts?
Toggling between 0% and 100% will be the easiest solution. For a different solution you could use an OR gate instead of a mux.