Decoding Nissan style Mitsi Electric 360 slot cam sensors
- SleepyKeys
- LQFP144 - On Top Of The Game
- Posts: 549
- Joined: Mon Feb 11, 2008 10:52 pm
- Location: Arizona
- Contact:
Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors
Thanks Fred! For giving me my own official file LT1-360-8.c. I have been reading though some of the PA docs and am starting to write some test code.
I was thinking about setting the overflow at 8 making it interrupt 45 times per cam revolution. Then I started thinking, maybe this number should be evenly divisible by 2 for reasons I I'm unaware of(yet). Let me know what you guys think.
I may be able to come up with some simple sync/check code that will sync in only 1 spot, but it would be simple and effective. Then maybe focus on code that can sync at multiple spots.
-sean
I was thinking about setting the overflow at 8 making it interrupt 45 times per cam revolution. Then I started thinking, maybe this number should be evenly divisible by 2 for reasons I I'm unaware of(yet). Let me know what you guys think.
I may be able to come up with some simple sync/check code that will sync in only 1 spot, but it would be simple and effective. Then maybe focus on code that can sync at multiple spots.
-sean
You snooze, you lose!
Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors
You are most welcome :-) I'm pretty happy with the new setup, once I tidy it up and finish it, it will be quite a nice little process to use. The latest one has size reporting too. Pull away! :-)
Doing dividing won't give you sync. It will get you RPM and quite accurately, but you won't be able to sync like that. If you used it to drive a dizzy (crap idea) you could get decent accuracy from it like that but dwell would still suck. In that dizzy mode it would be coarse rings for firing edges and fine stuff divided for RPM only.
Fred.
Doing dividing won't give you sync. It will get you RPM and quite accurately, but you won't be able to sync like that. If you used it to drive a dizzy (crap idea) you could get decent accuracy from it like that but dwell would still suck. In that dizzy mode it would be coarse rings for firing edges and fine stuff divided for RPM only.
Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
- SleepyKeys
- LQFP144 - On Top Of The Game
- Posts: 549
- Joined: Mon Feb 11, 2008 10:52 pm
- Location: Arizona
- Contact:
Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors
Well I'll explain a bit more....... first I need to scan in and document the tooth count of the disk to explain my logic. TBC........
You snooze, you lose!
- SleepyKeys
- LQFP144 - On Top Of The Game
- Posts: 549
- Joined: Mon Feb 11, 2008 10:52 pm
- Location: Arizona
- Contact:
Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors
Input needed in http://www.diyefi.org/forum/viewtopic.php?f=8&t=569 

You snooze, you lose!
- SleepyKeys
- LQFP144 - On Top Of The Game
- Posts: 549
- Joined: Mon Feb 11, 2008 10:52 pm
- Location: Arizona
- Contact:
Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors
Since the code is coming together I figured I had better get a tooth count. I'll have to take Fred's advice and hook the scope up to my LT1 car while it's running. That way I can use the #1 coil trigger and figure out where TDC is. Every time I play the assumption game I loose.
You snooze, you lose!
- SleepyKeys
- LQFP144 - On Top Of The Game
- Posts: 549
- Joined: Mon Feb 11, 2008 10:52 pm
- Location: Arizona
- Contact:
Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors
Getting the initial sync is pretty obvious but what do you guys think about this for checking sync? Checking sync once every revolution should be enough, no? If that's all we need and I stick to my divide by 8(using the correct offset) then I can use my lucky #7 window and write code that checks to make sure no pulses occur while the #7 window is open. Or did I get ahead of myself?
-sean
-sean
You snooze, you lose!
Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors
You have the ability to check 8 times per revolution of it, 4 of them with 100% certainty.
I'd be counting narrow slots for each wide one and keeping track of were i thought i was and what i was expecting to see next.
from cold if you count and you get a narrow one you know that the next one MUST be one of the four wide ones (ie, not another narrow one). If you get another narrow one next time, lose sync.
Once you have a wide one of known width you are synced, at that point you should expect two things :
1) that the next one IS narrow
2) that the one after is the correct one
Once you get to the one after you can repeat.
Additionally, to get your extra resolution (if a bit dodgy) you can reset your counter on one of the edges and base future secondary interrupt timings off that reset point.
The main point : sync as often as possible without overloading the cpu :-)
Good luck :-)
Fred.
I'd be counting narrow slots for each wide one and keeping track of were i thought i was and what i was expecting to see next.
from cold if you count and you get a narrow one you know that the next one MUST be one of the four wide ones (ie, not another narrow one). If you get another narrow one next time, lose sync.
Once you have a wide one of known width you are synced, at that point you should expect two things :
1) that the next one IS narrow
2) that the one after is the correct one
Once you get to the one after you can repeat.
Additionally, to get your extra resolution (if a bit dodgy) you can reset your counter on one of the edges and base future secondary interrupt timings off that reset point.
The main point : sync as often as possible without overloading the cpu :-)
Good luck :-)
Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
- SleepyKeys
- LQFP144 - On Top Of The Game
- Posts: 549
- Joined: Mon Feb 11, 2008 10:52 pm
- Location: Arizona
- Contact:
Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors
Found TDC marks and updated picture......bed time
You snooze, you lose!
- SleepyKeys
- LQFP144 - On Top Of The Game
- Posts: 549
- Joined: Mon Feb 11, 2008 10:52 pm
- Location: Arizona
- Contact:
Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors
I have decided to use 360/5 instead of 360/8. 360/8 only provided me with one sync point that was a whole number, 360/5 will give me 4(I was hoping for 8 but 4 will do
). The only way to get more whole numbers is to jump to a 16-bit var for the virtual CAS. But we have still yet to come up with a scheduler so I had better keep it 8-bit. Comments/suggestions welcome as always.

Code: Select all
if (PTITCUrrentState & 0x02){ /* if signal is high that means we can count the lows */
switch Counters.PrimaryTeethDuringLow{
case 23: /* wheel is at 0 deg TDC #1, set our virtual CAS to tooth 0 of 72 */
{
break;
}
case 38: /* wheel is at 90 deg TDC #4, set our virtual CAS to tooth 18 of 72 */
{
break;
}
case 33: /* wheel is at 180 deg TDC #6 set our virtual CAS to tooth 36 of 72 */
{
break;
}
case 28: /* wheel is at 270 deg TDC #7 set our virtual CAS to tooth 54 of 72 */
{
break;
}
default :
{
Counters.crankSyncLosses++; /* use crankSyncLosses variable to store number of invalid count cases while attempting to sync*/
break;
}
Counters.PrimaryTeechDuringLow = 0; /* In any case reset counter */
}
else /* if the signal is low that means we can count the highs */
{
switch Counters.PrimaryTeethDuringHigh{
case 7: /* wheel is at 52 deg, 7 deg ATDC #8 set our virtual CAS to tooth 10.4 of 72 */
{
break;
}
case 12: /* wheel is at 147 deg, 12 deg ATDC #3 set our virtual CAS to tooth 29.4 of 72 */
{
break;
}
case 17: /* wheel is at 242 deg, 17 deg ATDC #5 set our virtual CAS to tooth 48.4 of 72 */
{
break;
}
case 22: /* wheel is at 337 deg, 22 deg ATDC #2 set our virtual CAS to tooth 67.4 of 72 */
{
break;
}
default :
{
Counters.crankSyncLosses++; /* use crankSyncLosses variable to store number of invalid/default count cases while attempting to sync*/
break;
}
}
Counters.PrimaryTeethDuringHigh = 0; /* In any case reset counter */
}
}
You snooze, you lose!
Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors
Okay I'll bite.seank wrote:Code: Select all
Counters.PrimaryTeechDuringLow = 0; /* In any case reset counter */

Teech?