Rev 2104 | Rev 2109 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2104 | Rev 2107 | ||
---|---|---|---|
Line 87... | Line 87... | ||
87 | The maximum duration of all channels at maximum value is 8 * 2 ms = 16 ms. |
87 | The maximum duration of all channels at maximum value is 8 * 2 ms = 16 ms. |
88 | The remaining time of (22.5 - 8 ms) ms = 14.5 ms to (22.5 - 16 ms) ms = 6.5 ms is |
88 | The remaining time of (22.5 - 8 ms) ms = 14.5 ms to (22.5 - 16 ms) ms = 6.5 ms is |
89 | the syncronization gap. |
89 | the syncronization gap. |
90 | */ |
90 | */ |
91 | ISR(TIMER1_CAPT_vect) { // typical rate of 1 ms to 2 ms |
91 | ISR(TIMER1_CAPT_vect) { // typical rate of 1 ms to 2 ms |
92 | int16_t signal = 0, tmp; |
92 | int16_t signal, tmp; |
93 | static int16_t index; |
93 | static int16_t index; |
94 | static uint16_t oldICR1 = 0; |
94 | static uint16_t oldICR1 = 0; |
Line 95... | Line 95... | ||
95 | 95 | ||
96 | // 16bit Input Capture Register ICR1 contains the timer value TCNT1 |
96 | // 16bit Input Capture Register ICR1 contains the timer value TCNT1 |