Changed one var so my ticks are the same size as s12 stuff. Same pattern just different times
XGATE PIT based bit bang fuel injection
- SleepyKeys
- LQFP144 - On Top Of The Game
- Posts: 549
- Joined: Mon Feb 11, 2008 10:52 pm
- Location: Arizona
- Contact:
Re: XGATE PIT based bit bang fuel injection
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: XGATE PIT based bit bang fuel injection
Interesting, with the only xgate interrupt running(Metronome) set at a static 40.00ms the USB LA reads a bit extra. Thoughts???
I don't think it's my code, the longer the tock from the metro the more it skews. My interrupt only flips the LED and clears the interrupt. The down counter value is left alone.
xgateMetronome: ; PIT 2 ISR, called by PIT2 interrupt. Decrement out delayCounter.
;CIF
LDL R2, #PIT2_CFLAG_MASK
LDD R3, #PITTF
STB R2, R3, #ZERO_OFFSET
LDD R5, xgatePORTPFlip
JAL R5; jump to xgatePORTPFlip
RTS
I don't think it's my code, the longer the tock from the metro the more it skews. My interrupt only flips the LED and clears the interrupt. The down counter value is left alone.
xgateMetronome: ; PIT 2 ISR, called by PIT2 interrupt. Decrement out delayCounter.
;CIF
LDL R2, #PIT2_CFLAG_MASK
LDD R3, #PITTF
STB R2, R3, #ZERO_OFFSET
LDD R5, xgatePORTPFlip
JAL R5; jump to xgatePORTPFlip
RTS
You snooze, you lose!
Re: XGATE PIT based bit bang fuel injection
Try it with the bench test stuff from the ECT and see what you get. Could be a crystal tolerance thing. When I tested I had near perfect results, I think that was at your house!
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: XGATE PIT based bit bang fuel injection
IMO, the ideal high level subroutine to handle fuel injection or ignition would be passed something like this:
Pin #
Start time (in degrees)
Pulse width (in usec)
It would continue to output pulses until told to stop.
The subroutine would also receive position pulse times so that it could update the correlation between timer ticks and degrees.
Use of 32 bit timers make sense given the max period and the desired accuracy.
Pin #
Start time (in degrees)
Pulse width (in usec)
It would continue to output pulses until told to stop.
The subroutine would also receive position pulse times so that it could update the correlation between timer ticks and degrees.
Use of 32 bit timers make sense given the max period and the desired accuracy.
Open5xxxECU.org
- SleepyKeys
- LQFP144 - On Top Of The Game
- Posts: 549
- Joined: Mon Feb 11, 2008 10:52 pm
- Location: Arizona
- Contact:
Re: XGATE PIT based bit bang fuel injection
That's exactly what the params are now.
It could be useful to do that and that's how I originally thought stuff like that would/should work with an EFI system, but the truth is with a respectable input pattern you are always scheduling off of an input event every cycle.
Will post videos later today of it running my V8
It could be useful to do that and that's how I originally thought stuff like that would/should work with an EFI system, but the truth is with a respectable input pattern you are always scheduling off of an input event every cycle.
Will post videos later today of it running my V8
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: XGATE PIT based bit bang fuel injection
http://powerefi.com/files/xgate-test.mpeg
Alpha test Video!!!!!!!!
Engine is noticeably more responsive(remember we don't have any AE code yet).
Alpha test Video!!!!!!!!
Engine is noticeably more responsive(remember we don't have any AE code yet).
You snooze, you lose!
Re: XGATE PIT based bit bang fuel injection
What are the application requirements in terms of pulse time, pulse accuracy, min durations, etc? 1 degree accuracy is what, 17 usec at 10,000 rpm? That's 680 cpu clock ticks? Sounds doable for a tight loop on a dedicated processor.
Open5xxxECU.org
- SleepyKeys
- LQFP144 - On Top Of The Game
- Posts: 549
- Joined: Mon Feb 11, 2008 10:52 pm
- Location: Arizona
- Contact:
Re: XGATE PIT based bit bang fuel injection
+/- 1 tick @ .8usec currently
parameters are .8usec
parameters are .8usec
You snooze, you lose!
Re: XGATE PIT based bit bang fuel injection
So one can schedule any pin to change at some point in the future and it will occur at exactly that time +- .8 usec? That should work great.
I would encourage you to write as little as possible in assembler.
I would encourage you to write as little as possible in assembler.
Open5xxxECU.org
- SleepyKeys
- LQFP144 - On Top Of The Game
- Posts: 549
- Joined: Mon Feb 11, 2008 10:52 pm
- Location: Arizona
- Contact:
Re: XGATE PIT based bit bang fuel injection
Are you asking me to write a C port in addition to the binutils port I did ?
"So one can schedule any pin to change at some point in the future and it will occur at exactly that time +- .8 usec? That should work great. " yes
I originally wanted to do it at .1us but .8 should be fine and matches the main system's scale.
"So one can schedule any pin to change at some point in the future and it will occur at exactly that time +- .8 usec? That should work great. " yes
I originally wanted to do it at .1us but .8 should be fine and matches the main system's scale.
You snooze, you lose!