Add timer interrupt + PWM work
This commit is contained in:
15
Readmore.md
Normal file
15
Readmore.md
Normal 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)
|
||||
Reference in New Issue
Block a user