Introduction
This experiment demonstrates how to use the ATtiny85 microcontroller to generate a Pulse Width Modulation (PWM) signal for controlling devices like LEDs or motors.
Materials Required
- ATtiny85 Microcontroller
- LED
- Resistor (220Ω)
- Breadboard and jumper wires
- Arduino IDE with ATtiny85 support
- USBasp Programmer or similar
No Ads Available.
Circuit Diagram
The following diagram shows how to connect the ATtiny85 to an LED for PWM signal output:
Steps for the Experiment
- Connect the PWM pin of the ATtiny85 to the anode of the LED.
- Upload the PWM generation program using the Arduino IDE.
- Observe the brightness of the LED change according to the PWM duty cycle.
Explanation
The ATtiny85 generates a PWM signal that controls the brightness of the LED. By adjusting the duty cycle of the PWM, you can vary the power delivered to the LED, making it appear brighter or dimmer.
Results and Observations
- The LED should change brightness as the PWM duty cycle is adjusted.