Hello All,
I am working on one project which requires following condition.
Analog voltage and PWM on same pin of microcontroller.
Does it possible??
Currently I am using one pin of microcontroller. If analog voltage at that pin is 0-5V . I am converting 0-5V from internal ADC and getting values between 0-1023 as my adc is of 10 bit. Using those values, I am generating PWM and varying duty according to analog value.
Now I wanted to use the same pin which should accept pwm and according to the duty cycle of i/p pwm it should vary the duty cycle of o/p Pwm.
In case I am using analog then it should work as analog control and if I am using PWM then it should work as PWM control.
Does it possible using one pin.
Please let me know How??
I am working on one project which requires following condition.
Analog voltage and PWM on same pin of microcontroller.
Does it possible??
Currently I am using one pin of microcontroller. If analog voltage at that pin is 0-5V . I am converting 0-5V from internal ADC and getting values between 0-1023 as my adc is of 10 bit. Using those values, I am generating PWM and varying duty according to analog value.
Now I wanted to use the same pin which should accept pwm and according to the duty cycle of i/p pwm it should vary the duty cycle of o/p Pwm.
In case I am using analog then it should work as analog control and if I am using PWM then it should work as PWM control.
Does it possible using one pin.
Please let me know How??