added comment bout channel A
This commit is contained in:
@@ -132,6 +132,7 @@ void uart_printstr(const char* str) {
|
||||
}
|
||||
|
||||
// print hello world, on serial port, every 2 seconds, with empty infinite loop
|
||||
// `screen /dev/ttyUSB0 115200`
|
||||
int main() {
|
||||
uart_init();
|
||||
|
||||
@@ -141,7 +142,7 @@ int main() {
|
||||
TIMSK1 |= (1 << OCIE1A); // Enable CTC interrupt
|
||||
sei(); // Enable global interrupts
|
||||
|
||||
OCR1A = TIME_MS(PERIOD); // Table 16-4 : set CTC compare value, the counter is cleared to zero when the counter value (TCNT1) matches the OCR1A register
|
||||
OCR1A = TIME_MS(PERIOD); // Table 16-4 : set CTC compare value on channel A, the counter is cleared to zero when the counter value (TCNT1) matches the OCR1A register
|
||||
|
||||
TCCR1B |= (PRESCALE_SET(PRESCALE_VALUE)); // 16.4 : set timer according to prescale value, in register TCCR1B, table 16-5 : prescale sets
|
||||
|
||||
|
||||
Reference in New Issue
Block a user