Okay. This is where I hopefully don't sounds completley dumb.
I've been reading about big banging this and bit banging that but I have yet to run across an explaination outside of the scope of serial communication.
Conceptually I'm lost. Partially because I'm not comfortable with timers yet, partially because I have no idea what I'm talking about.
So to time an ignition event, what are you options. What's the opposite of bit banging? Maybe that would help me out. Or if someone could very basically explain the concept I'd be so appreciative. It's one of the few parts of coding that totally baffles me at the moment.
The concept of interupts, loops, some basics of a 16bit Timer starting/stopping/clearing/reading high/low bytes are somewhat familiar. But I don't know how different PICmicro chips are compared to the freescales, etc.
Thanks a bunch!
What does Bit Banging Ignition events mean!!!
-
- LQFP112 - Up with the play
- Posts: 160
- Joined: Tue Apr 08, 2008 9:14 pm
Re: What does Bit Banging Ignition events mean!!!
Apparently you suffer from exactly the same thing I do. Trying to over-complicate things :-)
"bit bang" is a fancy name for what seems to me to be the most normal and standard mode of operation of a micro controller that probably doesn't need a name at all.
It simply means to turn an output on or off via changing its value in a register from your code.
The implications are typically that you have to poll a condition to see when to bang that output and thus you use more cpu than you should, and have less accuracy than you should due to polling and action latencies combined.
The way we are intending to do it (which I have failed at so far, but have some ideas about) is to use the PIT timers to trigger interrupts that then quickly turn on and off the appropriate channels with the lowest possible latency. In this way we should come close to the accuracy of timer driven channels, but with the flexibility of being able to use pretty much any pin.
This is necessary as there are only 8 hardware timer channels available on our chip and they are taken for fuel and engine position duties.
I hope that clears it up for you. I was asking the exact same questions just a few months ago :-)
Fred.
"bit bang" is a fancy name for what seems to me to be the most normal and standard mode of operation of a micro controller that probably doesn't need a name at all.
It simply means to turn an output on or off via changing its value in a register from your code.
The implications are typically that you have to poll a condition to see when to bang that output and thus you use more cpu than you should, and have less accuracy than you should due to polling and action latencies combined.
The way we are intending to do it (which I have failed at so far, but have some ideas about) is to use the PIT timers to trigger interrupts that then quickly turn on and off the appropriate channels with the lowest possible latency. In this way we should come close to the accuracy of timer driven channels, but with the flexibility of being able to use pretty much any pin.
This is necessary as there are only 8 hardware timer channels available on our chip and they are taken for fuel and engine position duties.
I hope that clears it up for you. I was asking the exact same questions just a few months ago :-)
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!
-
- LQFP112 - Up with the play
- Posts: 160
- Joined: Tue Apr 08, 2008 9:14 pm
Re: What does Bit Banging Ignition events mean!!!
Okay. Yea, I think you did clear that up for me. I'm familiar with the concept very well as I've done quite a bit of that with my PICAXE chips over the years.
So I'm going to run down like a pseudo-code conceptual thing to make sure we're on the same page...
So I'm going to run down like a pseudo-code conceptual thing to make sure we're on the same page...
Code: Select all
mainloop:
eventduration = some calculated time
endevent = beginevent + eventduration
If timer1 = beginevent then
Pin1 = 1
endif
If timer1 = endevent then
Pin1 = 0
endif
goto mainloop
Re: What does Bit Banging Ignition events mean!!!
Yeah, pretty much, except now I'm guessing what your syntax means :-) The last time I played with "basic" was when I was 11 on a Mac Plus. That's a long time ago :-)
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!
-
- LQFP112 - Up with the play
- Posts: 160
- Joined: Tue Apr 08, 2008 9:14 pm
Re: What does Bit Banging Ignition events mean!!!
Psuedocode!
I'm not even sure it qualifies as basic...
PORTA = $00000010
Something like that would probably have made more sense to you!
I really need to break the basic out of me...
I'm not even sure it qualifies as basic...
PORTA = $00000010
Something like that would probably have made more sense to you!
I really need to break the basic out of me...
Re: What does Bit Banging Ignition events mean!!!
LOL, yeah, I know it was pseudo, but it could have done with more of these : () or more of this : english, or both?
Just messing, we are on the same page. I know exactly how you felt about bit banging, one of our more seasoned members was kind enough to explain it to me a while back after I had wrongly assumed it had some deep and dark meaning. In reality it means nothing except control a pin from your code without the use of hardware control mechanisms like timers.
Fred.
Just messing, we are on the same page. I know exactly how you felt about bit banging, one of our more seasoned members was kind enough to explain it to me a while back after I had wrongly assumed it had some deep and dark meaning. In reality it means nothing except control a pin from your code without the use of hardware control mechanisms like timers.
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!
-
- LQFP112 - Up with the play
- Posts: 160
- Joined: Tue Apr 08, 2008 9:14 pm
Re: What does Bit Banging Ignition events mean!!!
I think what I'm going to do, is bring back a small electronics care package next time I fly home... Now that I have a valid ID again (after my wallet was stolen...), and I won't get the terrorist treatment every time I fly.
I want to essentially program a rudementary FI controller in the ultra limited confines of the PICAXE environment, and maybe graduate to a raw MicroPIC in C or Assembly. Just to get the feel for everything without jumping into significantly more complicated machine right off the bat.
But since I'm not flying back up north for close to two months I'm going to have ants in my pants until then...
At least I get to fly to the USVI in a couple weeks to give me some quality beach time to think some of these things through.
I want to essentially program a rudementary FI controller in the ultra limited confines of the PICAXE environment, and maybe graduate to a raw MicroPIC in C or Assembly. Just to get the feel for everything without jumping into significantly more complicated machine right off the bat.
But since I'm not flying back up north for close to two months I'm going to have ants in my pants until then...
At least I get to fly to the USVI in a couple weeks to give me some quality beach time to think some of these things through.
Re: What does Bit Banging Ignition events mean!!!
: off topic :
@GartnerProspect
How was your stay in the Virgin Islands? I'm from St. Thomas, and am here now...
@GartnerProspect
How was your stay in the Virgin Islands? I'm from St. Thomas, and am here now...