Timeline for Arduino Hardware timer and interrupts issue
Current License: CC BY-SA 3.0
13 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 26, 2015 at 15:48 | answer | added | Ron | timeline score: 2 | |
| Jun 26, 2015 at 5:43 | answer | added | Nick Gammon♦ | timeline score: 1 | |
| Sep 4, 2014 at 18:26 | comment | added | Treesrule14 | Delete lines from your code until you have it work again then add the last line in again. Simulate inputs with numbers ect... Its very hard to help you like this | |
| Sep 2, 2014 at 2:29 | history | tweeted | twitter.com/#!/StackArduino/status/506629986380689408 | ||
| Sep 1, 2014 at 22:50 | comment | added | gbulmer |
Is the speedo value correct when the value is Serial.print(...) only, and everything using display is removed? I am suspicious about display using a timer or effecting interrupts.
|
|
| Sep 1, 2014 at 22:31 | history | edited | Vajira Lasantha |
New tags.
|
|
| Sep 1, 2014 at 22:30 | comment | added | Vajira Lasantha | @gbulmer When I run these two parts of codes separately (RPM and Speedo), they work without any problems and give me the correct values. But when I merge them together, the speedo value becomes incorrect. | |
| Sep 1, 2014 at 22:27 | comment | added | Vajira Lasantha | @Will - Lets say my current speed is 25kmph. But I'm seeing incorrect random values like 31, 35, 45, 40, etc... Sometimes after every 5-6 seconds I get the correct reading 25kmph. But my RPM values are showing correctly 99% of the time. | |
| Sep 1, 2014 at 18:33 | comment | added | Gerben |
Try swapping count = TCNT1; and TCCR1B = 0;. It could be that stopping the counter also resets TCNT1.
|
|
| Sep 1, 2014 at 14:36 | history | migrated | from electronics.stackexchange.com (revisions) | ||
| Sep 1, 2014 at 13:24 | comment | added | gbulmer | Have you tried to reduce the program to the smallest amount of code that either works or has the bug, and nothing extra. For example "the speed value does not show properly" is still in the code, but everything else removed. Please answer Will's question first. | |
| Sep 1, 2014 at 13:07 | comment | added | Will | "So far I got everything working but the speed value does not show properly" - Can you explain more: what are you seeing? what are you expecting to see? How are you showing the value. Don't make us work it out from the code! | |
| Sep 1, 2014 at 12:18 | history | asked | Vajira Lasantha | CC BY-SA 3.0 |