View unanswered posts | View active topics It is currently Mon Oct 15, 2018 11:59 am



Reply to topic  [ 87 posts ]  Go to page 1, 2, 3, 4, 5 ... 9  Next
XGATE PIT based bit bang fuel injection 
Author Message
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15185
Location: Home sweet home!
Sean and I have been discussing implementing this for our final injection solution. I thought we may as well document the dev process here. Hopefully the slack bastard actually replies to this one, unlike the loader one ;-)

So, lets cut to the chase!

We need three pieces of software for this:

  1. configure the timers and registers and data set for each event required
  2. turn pins on at specific times based on timer events and data set provided
  3. turn pins off at specific times based on timer events and data set provided

1) Sean is proposing that this run on the xgate, I like that idea. It will need some information passed to it, namely:

  • pin number to fire (1 - 12)
  • delay after input event to begin pulse (0 - 65535) in ticks
  • duration of pulse (0 - 65535) in ticks
  • ECT time stamp that the delay is based off (0 - 65535) absolute number - must handle roll over

This code will take the above info from registers populated from the s12 side in a function called by a decoder and setup the data and PIT registers to run the other two threads effectively.

2) fired by PIT timer - reads data set and switches pins ON as per setup done by 1)

3) fired by PIT timer - reads data set and switches pins OFF as per setup done by 1)

Sean, shoot holes in this! :-)

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!


Tue Mar 08, 2011 10:47 pm
Profile WWW
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15185
Location: Home sweet home!
My old PIT code did more or less this. The code for 1 can be found commented out in NipponDenso.c and the code for 2 and 3 can be found in igntionISR.c file. This code *almost* worked and worked for a short time perfectly until something went wrong. Something was a cumulative error that built up and then snowballed. I think.

Looking at this code could do one of two things:

A) poison your pure mind
B) help you see some ways of doing the job

It's up to you if you look at it or not :-)

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!


Tue Mar 08, 2011 10:57 pm
Profile WWW
LQFP112 - Up with the play

Joined: Tue Apr 08, 2008 9:14 pm
Posts: 160
Fred wrote:
This code *almost* worked and worked for a short time perfectly until something went wrong.


Ain't this always the truth mate!?!

Fred wrote:

Looking at this code could do one of two things:

A) poison your pure mind
B) help you see some ways of doing the job

It's up to you if you look at it or not :-)

Fred.


I'm interested. I always wanted to be a poisoned programmer. :lol2:


Wed Mar 09, 2011 3:50 pm
Profile
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15185
Location: Home sweet home!
I'd prefer people didn't look and purely came up with their own shlt by themselves. But, feel free if you're not developing 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!


Thu Mar 10, 2011 1:50 am
Profile WWW
LQFP144 - On Top Of The Game
User avatar

Joined: Mon Feb 11, 2008 10:52 pm
Posts: 549
Location: Arizona
I'll look after I get stuck or fail :) In which case I will be able to combine info from both. Updating the debs right now.....

_________________
You snooze, you lose!


Thu Mar 10, 2011 9:18 pm
Profile YIM
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15185
Location: Home sweet home!
Sean0 wrote:
I'll look after I get stuck or fail :) In which case I will be able to combine info from both. Updating the debs right now.....

Perfect!

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


Thu Mar 10, 2011 10:39 pm
Profile WWW
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15185
Location: Home sweet home!
viewtopic.php?f=8&t=57&p=16068#p16068 enjoy!

Edit: As discussed, let me know what interface stuff you need, do your commits, push them, and rebase on top of any minor firmware work that I do as required. Sweet? :-)

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


Thu Jul 21, 2011 10:02 am
Profile WWW
LQFP144 - On Top Of The Game
User avatar

Joined: Mon Feb 11, 2008 10:52 pm
Posts: 549
Location: Arizona
So far so good no measurable jitter.
Image sorry on a mobile phone ill resize later

_________________
You snooze, you lose!


Thu Jul 21, 2011 1:56 pm
Profile YIM
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15185
Location: Home sweet home!
Wait, what is the Camaro super duper ECU doing on the bench, man??!! LOL :-)

How is that triggered? Is it some how relative to the decoder? Is it just done with clock delays? Is it using the PIT timers? Tell us more :-)

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!


Thu Jul 21, 2011 2:07 pm
Profile WWW
LQFP144 - On Top Of The Game
User avatar

Joined: Mon Feb 11, 2008 10:52 pm
Posts: 549
Location: Arizona
I was anxious to get started . It is super though isn't it lol.

This was just some testing I was doing with clock delays. I wanted to see how strong things were. Jitter seems to be pretty much non existent. I'll continue to more on. Keep up the good work on the SM/Cheetah stuff.

_________________
You snooze, you lose!


Thu Jul 21, 2011 8:40 pm
Profile YIM
Display posts from previous:  Sort by  
Reply to topic   [ 87 posts ]  Go to page 1, 2, 3, 4, 5 ... 9  Next

Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF. ColorizeIt.