So let me get this strait. It has come down to this as far as core functions/priority go.
Primary injector pulse width and angle controlled as accurately as the hardware will allow
timing angle controlled as accuratly as possible with less priority to pulse width(dwell)
secondary injector pulse width controlled as accurately as possible with less priority to angle
What ever is left over for additional I/O
Do I have that right?
Possible uses of our timer resources : ideas soon please!
- SleepyKeys
- LQFP144 - On Top Of The Game
- Posts: 549
- Joined: Mon Feb 11, 2008 10:52 pm
- Location: Arizona
- Contact:
Re: Possible uses of our timer resources : ideas soon please!
You snooze, you lose!
Re: Possible uses of our timer resources : ideas soon please!
Given that IC0 is of the highest possible priority, and IC1 next, you don't miss a tooth at all until you simple run out of processor time to run all of your interrupt code and/or they come in before you get a chance to store the value and clear the flag. This is why higher tooth and cylinder counts get lower max rpms.8InchesFlacid wrote:what happens when you miss an effectively unimportant tooth while doing something important
True, but the internal timers are no good for that, and the external ones are not up for discussion. (without sound reasoning from someone that really knows ;-) )And, I think the only real "other time" suggestions anyone mentioned were traction control related.
Sean, there are 8 IC/OC hardware accurate timers, ONLY these can output truly precisely, or record input truly precisely. There are 4 internal PIT timers that can generate an interrupt precisely, but under load, when that code runs is any body's guess. We may be able to do a subtraction to find out the latency on each pass and make it fairly accurate in that regard (load reg - count reg = latency).
As written in the first post (mostly) :
IC x 2 = engine position / RPM input to (at the moment 0.8us)
OC x 6 = injector control to (at the moment 0.8us)
PIT x 2 = ignition control (1 for start of dwell, one for end and fire of coil)
PIT x 2 = staged injector control (1 for open, 1 for close)
(PIT accurate to ~0.8us, but with latency that will be unpredictable and only accountable on the first trigger, the second one fires when it fires, probably around the 10us range)
Hopefully that clears it up and leaves it easy to implement whatever staged control is desired including i guess (though, this would raise the run time of the tooth code and lower the run time of the injector code) firing the staged injector earlier than main.
Admin.
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!
Re: Possible uses of our timer resources : ideas soon please!
Just for posperity, you should say how many channels you intend to have on these (keeping in mind overlap is indeed possible if I stick dual baby 1500cc injectors on my MiataFromHell (tm)seank wrote:So let me get this strait. It has come down to this as far as core functions/priority go.
Primary injector pulse width and angle controlled as accurately as the hardware will allow
timing angle controlled as accuratly as possible with less priority to pulse width(dwell)
secondary injector pulse width controlled as accurately as possible with less priority to angle
What ever is left over for additional I/O
Do I have that right?
- SleepyKeys
- LQFP144 - On Top Of The Game
- Posts: 549
- Joined: Mon Feb 11, 2008 10:52 pm
- Location: Arizona
- Contact:
Re: Possible uses of our timer resources : ideas soon please!
I was just referring to core function priority, not my needs necessarily. There was a lot of conversation and I just wanted to make sure I was up to speed. I'll start a new thread about possible combinations after I assess my goals. Nice (tm) BTW.8InchesFlacid wrote: Just for posperity, you should say how many channels you intend to have on these (keeping in mind overlap is indeed possible if I stick dual baby 1500cc injectors on my MiataFromHell (tm)
You snooze, you lose!
Re: Possible uses of our timer resources : ideas soon please!
As discussed in another thread it shouldn't be too hard to do a sequential bit banging fork/branch of the code for 8 10 12 cyls. each ISR would fire one of two injectors each time it was called. Easy. You just have to set the "action" to "do nothing" and leave the interrupt enabled. MUCH later is the time for that, we really need focus and a clear set of obtainable goals to work towards at the moment. When we reach those, that is the time to reassess what we are trying to achieve.
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!
Re: Possible uses of our timer resources : ideas soon please!
I'd like to point out that the modulus down counter that is part of the ECT module works very much in the same way as the PIT timers, and thus can be used in the same fashion for timing something or other. Currently it's setup to flash the "user led" such that new FreeEMS testers can verify the operation of their unit when they power it up and load the code to it.
Admin.
Admin.
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!
Re: Possible uses of our timer resources : ideas soon please!
My expirience,
MC9S12 80 pin
1 TIMER(IC) - CRANK
2 TIMER(IC) - CAM
3 TIMER(basic) - INJECTION CLOSE (+ STAGED, 16th ANGLE INDEPENDENT INJECTIONS TOTALLY)
4 TIMER(basic) - ANGLE EVENTS: KNOCK (OPEN/CLOSE WINDOW), TDC, MAINLOOPCALC, INJECTION START
5 TIMER(IC) - VVTI INTAKE
6 TIMER(IC) - VVTI EXHAUST
7 TIMER(basic) - DWELL
8 TIMER(basic) - SPARK
All harware ports are bitbanged, all talks about 'slow' are trash. my latency about 10us(up to 30 when there are too much masked ints in mainloop for synchronisation) at 10krpm its 1 deg. All events are angle scheduled. AFR is absolutely f..g stable. So Fred i am with you, you are going right way.
BR
Serj
MC9S12 80 pin
1 TIMER(IC) - CRANK
2 TIMER(IC) - CAM
3 TIMER(basic) - INJECTION CLOSE (+ STAGED, 16th ANGLE INDEPENDENT INJECTIONS TOTALLY)
4 TIMER(basic) - ANGLE EVENTS: KNOCK (OPEN/CLOSE WINDOW), TDC, MAINLOOPCALC, INJECTION START
5 TIMER(IC) - VVTI INTAKE
6 TIMER(IC) - VVTI EXHAUST
7 TIMER(basic) - DWELL
8 TIMER(basic) - SPARK
All harware ports are bitbanged, all talks about 'slow' are trash. my latency about 10us(up to 30 when there are too much masked ints in mainloop for synchronisation) at 10krpm its 1 deg. All events are angle scheduled. AFR is absolutely f..g stable. So Fred i am with you, you are going right way.
BR
Serj
Re: Possible uses of our timer resources : ideas soon please!
Thanks Serj, that's an OLD thread! :-) Is your stuff open source? We're on our way to making this thing work pretty soon, I think! Lots of progress recently.
Fred.
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!
Re: Possible uses of our timer resources : ideas soon please!
Fred, unfortunately no, but i can share with you with ideas and help with problems. concerning this 30-10 us jitter. in case xgate is used the jitter could be almost removed.
BR,
Serj
BR,
Serj
Re: Possible uses of our timer resources : ideas soon please!
Yes, with xgate, and no other interrupts, just matched sets of sequential bit bangs, there should be no jitter at all, just a slight delay :-)
Is your product commercial? Does it have a website we could take a look at?
Fred.
Is your product commercial? Does it have a website we could take a look at?
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!