Hardware fast PWM + ADC in ATmega16. The same task but now we should use ADC for change duty cycle.
I recommend use potentiometer/variable resistor with led for check.
Basic structure of fast PWM mode controlling by ADC in ATmega16 for begginers. Don't forget to use datasheet!
- You can use another MCUs. All you need is datasheet. Don't forget change pins!
- Make project in AVR Studio choosing 8-bit MCU ATmega16.
- Copy code from
pwm_adc.c
into yourmain.c
file. - Build project.
Free