Decoding Nissan style Mitsi Electric 360 slot cam sensors

For discussing and developing different RPM/Position decoders using our superior modular architecture! One thread per pattern, please.
Locked
deviousKA
QFP80 - Contributor
Posts: 43
Joined: Tue Apr 01, 2008 10:36 pm
Location: Id, USA
Contact:

Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors

Post by deviousKA »

Question, how is your "virtual CAS" being incremented?

I follow your case structure and count methods, but how are you going to break down virtual events in between?

Edit, nm. Id guess you could increment it at 1/5th the rate of the incoming 360 pulse.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors

Post by Fred »

The trick is, for consistent counting he need to reset it when het gets sync from pure counting. I like the idea and I hope it all works :-)

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!
User avatar
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

Post by SleepyKeys »

deviousKA wrote:Question, how is your "virtual CAS" being incremented?

I follow your case structure and count methods, but how are you going to break down virtual events in between?

Edit, nm. Id guess you could increment it at 1/5th the rate of the incoming 360 pulse.
Yes, exactly(set the pulse accumulator to over flow at 5), this code is still missing quite a bit, but I thought I would throw it up there for comments/suggestions as we go.

Thanks :)
You snooze, you lose!
User avatar
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

Post by SleepyKeys »

Fred wrote:The trick is, for consistent counting he need to reset it when het gets sync from pure counting. I like the idea and I hope it all works :-)

Fred.
Thanks and yep I think it will, ECT FTW!
You snooze, you lose!
deviousKA
QFP80 - Contributor
Posts: 43
Joined: Tue Apr 01, 2008 10:36 pm
Location: Id, USA
Contact:

Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors

Post by deviousKA »

When first looking over the ECT I failed to notice the hardware counter/pulse accumulator, and was a little confused. Im certainly going to be playing around with it myself as I will be using the Nissan type mitsubishi optical CAS in many nissan/datsun applications. I dont plan to split it down any further than 24 events per 720deg engine rotation though (24 +1sync perhaps) for 4 and 6cyl.

I have done some reverse engineering of the nissan vh45 v8 ecu which uses a disc which I assume is similar to your Lt1, but unfortunately havent gotten into the CAS decoding on that. I do know that the CAS signals are fed into at least two of the MCU cores on the ecu (of which it has 4). I assume it uses a different approach to figuring out the engine angle (non timer based) where it reads engine angle directly from the CAS. Reading both rising/falling edges on the disc would provide 1 deg crank resolution per signal, so it can just use a compare match to perform fuel/ignition action.
User avatar
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

Post by SleepyKeys »

The LT1 had special hc11 cores made for GM, I think it's called hc11-F6. The LT1 ECU reads rising and falling as you said to give it a 1deg update. But I think they went a bit further and added similar math used in decoding lower count wheels. Since it gets a real 1deg update it could "guess" with great accuracy much finer values(.1 deg or something). In the timing table there are some fraction values.

I figured divide by 5 because it would yield 72 teeth per cycle, scale the numbers up and you have 50/720 :) I think it will interface with the scheduler quite easily.
You snooze, you lose!
deviousKA
QFP80 - Contributor
Posts: 43
Joined: Tue Apr 01, 2008 10:36 pm
Location: Id, USA
Contact:

Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors

Post by deviousKA »

Cool, the vh45 uses a hitachi 6303 (motorola 6801 with a few extra functions and higher pin count) as the main controller and a few other in house (JECS) MCU and/or PLC for supplementary control. The ecu provides sequential injection and C.O.P. on that engine.
User avatar
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

Post by SleepyKeys »

Hey guys I need your help finding info/examples on how to use the accumulator in 8-bit mode on PT0. EVERY piece of documentation I have come accross says how to the pulse accumulator in 16-bit mode on PT7. As Fred said 8-bit mode on PT0 would serve us better.

Thanks in advance,
Sean
You snooze, you lose!
User avatar
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

Post by SleepyKeys »

Image

I suppose a an ISR could be fired to check the 8-bit count register associated with a pin, then use the modulus operator to see if it needs to branch and run the full primaryISR loop, but that means an ISR is fired on ever 360x event. Or I totally missed something ;) (I hope that's the case)
You snooze, you lose!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Decoding Nissan style Mitsi Electric 360 slot cam sensors

Post by Fred »

HUH!!!
FreeScale wrote:When PACMX = 1, PBOVF bit can also be set if 8-bit pulse accumulator 1 (PAC1) reaches 0x00FF and an active
edge follows on PT1.
You phail at reading pdf files :-) Which is good because having jumperable inputs and outputs would have sucked...

Now get on with it :-)

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!
Locked