Timeline for How to update a variable in an ISR using Timers
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 11, 2014 at 22:08 | history | edited | BrettFolkins | CC BY-SA 3.0 |
added 31 characters in body
|
| Dec 11, 2014 at 22:06 | comment | added | BrettFolkins |
Make sure the code matches what is posted in the question in every other way. Try changing your loop to just println(cont); delay(1000);. Also you are still including the bits with cli() and TCCR3A etc correct?
|
|
| Dec 11, 2014 at 21:56 | comment | added | UserK |
I've tried your code but the counter isn't incremented. I've added the TCNT3=0; in the ISR() and removed //TCCR3B |= (1 << WGM32); in the setup() as you said. I've also tried commenting out the cont=0; line but nothing changed
|
|
| Dec 11, 2014 at 20:28 | history | edited | BrettFolkins | CC BY-SA 3.0 |
deleted 2 characters in body
|
| Dec 11, 2014 at 19:22 | history | edited | BrettFolkins | CC BY-SA 3.0 |
deleted 1 character in body
|
| Dec 11, 2014 at 19:16 | history | answered | BrettFolkins | CC BY-SA 3.0 |