Add timer interrupt + PWM work

This commit is contained in:
Pratik
2026-04-06 21:25:29 +10:00
parent 4012404504
commit 36d8dbb881
10 changed files with 143 additions and 8 deletions

15
Readmore.md Normal file
View File

@@ -0,0 +1,15 @@
# Timer Interrupt (ATmega328P)
## Goal
Generated 1ms interrupt using Timer1
## Key Registers
- TCCR1B → mode + prescaler
- OCR1A → compare value
- TIMSK1 → enable interrupt
## Logic
Timer counts → match OCR1A → ISR runs → ms++
## Result
LED blink using ms counter (non-blocking)