How can I generate this pulse with an Arduino Micro?
Is it necessary an external component?
|
|||||||||||||
|
Take two 10K or so resistors:
The following program does the trick:
When Pin2 (or any other pin for that matter) is set as |
|||||
|
If both inputs are 0V, the output will be 0V. If both inputs are 5V, the output will be 5V. If one input is 0V and one 5V the output will be 2.5V. However, if the device attached to the output doesn't have a high input impedance, the voltage will drop some. You could add an opamp to prevent this. I think you can generate the 2 pins outputs using one of the timers in phase correct pwm mode. Freeing up the cpu and giving a very clean output signal, as using software "pwm" could be slightly of due to interrupts occuring. |
|||||||||
|