Hello, I am wanting to output 0-10V PWM signal, or 0-10V analog signal. The microcontroller's GPIOs output 0 to 3.3V, so I will just amplify that up to 10v with an op amp.
My question comes down to, lets say I want this to be a configuration option within the firmware, e.g. setting a flag such as "USE_PWM = True;", "USE_ANALOG = True;", etc.
What would be a good method of wiring these two separate systems up to the same output? For instance one GPIO would be the PWM setup, another separate GPIO would be the Analog setup. If I connect the 2 outputs together I would need to disable/disconnect the other one somehow? Is this doeable with a mosfet somehow? I suppose I could have even a 3rd GPIO controlling a relay and could switch between the two... but would prefer to not use a relay if possible.
Thanks and any help is greatly appreciated.
My question comes down to, lets say I want this to be a configuration option within the firmware, e.g. setting a flag such as "USE_PWM = True;", "USE_ANALOG = True;", etc.
What would be a good method of wiring these two separate systems up to the same output? For instance one GPIO would be the PWM setup, another separate GPIO would be the Analog setup. If I connect the 2 outputs together I would need to disable/disconnect the other one somehow? Is this doeable with a mosfet somehow? I suppose I could have even a 3rd GPIO controlling a relay and could switch between the two... but would prefer to not use a relay if possible.
Thanks and any help is greatly appreciated.