AVR®: Updating PWM Duty Cycle from ADC Sensor Reading
In this video:
- Update the PWM duty cycle based upon the ADC result register.
- Open AVR_PWM.c, from a previous video.
- Copy relevant PWM_init_LED() function, relevant defines, and interrupt service routines back into this project.
- Verify that we can change the LED brightness by varying the POT connected to the ADC.
- Find the user guide and schematics for the I/O1 Xplained Pro (ATIO1-XPRO), from The Atmel Store
- Connecting the I/O1 Xplained pro to the ATmega328P Xplained mini.
- Verifying that we are now able to change the LED brightness as the light sensor reading changes.