added comment bout channel A

This commit is contained in:
hugogogo
2025-03-07 12:07:56 +01:00
parent f0566e8bde
commit 444925be21
4 changed files with 5 additions and 4 deletions

View File

@@ -77,7 +77,7 @@ int main() {
ICR1 = TIME_MS(PERIOD); // Table 16-4 : set the period (compare TOP value)
OCR1A = TIME_MS(PERCENT(DUTY_CYCLE, PERIOD)); // 16.9.3 : set the duty cycle to DUTY_CYCLE% of the time -> OC1A (alternate function of PORTB1, aka LED2) is cleared when TCNT1 (the counter value) equals OCR1A
OCR1A = TIME_MS(PERCENT(DUTY_CYCLE, PERIOD)); // 16.9.3 : set the duty cycle to DUTY_CYCLE% of the time on channel A -> OC1A (alternate function of PORTB1, aka LED2) is cleared when TCNT1 (the counter value) equals OCR1A
TCCR1B |= (PRESCALE_SET(PRESCALE_VALUE)); // start the timer with the prescaler