Skip to main content
4 events
when toggle format what by license comment
Sep 18, 2020 at 23:42 vote accept TommyS
Sep 13, 2020 at 20:05 comment added TommyS Edgar Bonet. Implemented & worked w/IDLE! Much lower mA. However, there maybe a coding solution to the problem outlined in my post.Convinced that when I combined Mr. Nick Gammon's two examples "InputCaptureCounter/Timer" & "Deep Sleep" the issue is in Void Loop=> if (!triggered) return; This stops the program until a flag inside the ISR Capture is "true". When the attacheInterrupt on INT0/D3 fires same time as the ISR Capture reads on D13, the program may not make past WakeUp ISR, added by me. As a consequence the ISRs Capture & Overflow cannot read the pulse on D13 (PC7 on 32u4).
Sep 13, 2020 at 1:07 comment added TommyS Thank you for the suggestion & link. Saw an example for IDLE mode. Will check if shutting down unused peripherals lowers close to same as consumption as in SLEEP_MODE_POWERDOWN. My assumption was that using an INT0-type interrupt would wake up the CPU so the INPUT CAPTURE TIMER would be fully ready. Works half of the time, on every 2nd external pulse, so I thought that there is some sort of an interrupt-sequence/priority conflict in my code, or some of the flags (which are still murky for me) are not set properly as a result of the two combined codes. I suspect "if !triggered" and "return".
Sep 12, 2020 at 9:56 history answered Edgar Bonet CC BY-SA 4.0