View Single Post
Old 03-24-2017, 01:07 AM   #94 (permalink)
t vago
MPGuino Supporter
 
t vago's Avatar
 
Join Date: Oct 2010
Location: Hungary
Posts: 1,808

iNXS - '10 Opel Zafira 111 Anniversary

Suzi - '02 Suzuki Swift GL
Thanks: 831
Thanked 709 Times in 457 Posts
Quote:
Originally Posted by josemapiro View Post
Hi t vago
The problem still continues, it is not always but sometimes it just wakes up with the movement.
I finally figured out why this is so. This problem affects AtMega2560 boards only.

Basically, the problem lies with the pins used to capture the fuel injector signal. The interrupts, INT4 and INT5, associated with those pins are not fully supported by the wake-up module on the AtMega2560. To capture fuel injector pulses, MPGuino configures these two pins in such that, if sleep modes deeper than IDLE are selected, the AtMega2560 will never wake up from those interrupts.



Now, I could move the fuel injector pins from 3/2 (PE5/PE4) to 18/19 (PD3/PD2), and that would move the interrupts to INT3/INT2, which do allow MPGuino to wake up the AtMega2560 with fuel injector pulses. That's an easy and sure fix, but it would force you to change your fuel injector wiring to use these other two pins. That would certainly fix the problem.

Another option, which I am not as sure will work, is to make changes to the code to configure the INT4/INT5 interrupts to a setting that should cause the AtMega2560 to wake up, immediately before the AtMega2560 goes to sleep. Then, once the AtMega2560 is awake, re-configure the INT4/INT5 pins for use by MPGuino.

A third option would be to disallow sleep modes with the AtMega2560. That's not a good option at all.

Quote:
Originally Posted by josemapiro View Post
I think it should be possible to use the JSON output for this.
You could also record just the raw data, and have an Android app handle the display. It'd be the ultimate MPGuino display.
Attached Thumbnails
Click image for larger version

Name:	s201703230000.jpg
Views:	384
Size:	180.9 KB
ID:	21405  
  Reply With Quote