View unanswered posts | View active topics It is currently Fri Dec 14, 2018 3:11 pm



Reply to topic  [ 8 posts ] 
What does Bit Banging Ignition events mean!!! 
Author Message
LQFP112 - Up with the play

Joined: Tue Apr 08, 2008 9:14 pm
Posts: 160
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! :D


Sat Apr 19, 2008 1:20 am
Profile
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15200
Location: Home sweet home!
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.

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


Sat Apr 19, 2008 1:32 am
Profile WWW
LQFP112 - Up with the play

Joined: Tue Apr 08, 2008 9:14 pm
Posts: 160
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...

Code:
mainloop:
eventduration = some calculated time
endevent = beginevent + eventduration

If timer1 = beginevent then
   Pin1 = 1
endif

If timer1 = endevent then
   Pin1 = 0
endif

goto mainloop


Sat Apr 19, 2008 2:05 am
Profile
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15200
Location: Home sweet home!
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!


Sat Apr 19, 2008 9:49 am
Profile WWW
LQFP112 - Up with the play

Joined: Tue Apr 08, 2008 9:14 pm
Posts: 160
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...


Sat Apr 19, 2008 10:29 pm
Profile
Moderator
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15200
Location: Home sweet home!
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.

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


Sat Apr 19, 2008 10:45 pm
Profile WWW
LQFP112 - Up with the play

Joined: Tue Apr 08, 2008 9:14 pm
Posts: 160
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.


Sat Apr 26, 2008 2:37 am
Profile
TO92 - Vaguely active

Joined: Fri Jun 20, 2008 5:55 pm
Posts: 1
: off topic :

@GartnerProspect
How was your stay in the Virgin Islands? I'm from St. Thomas, and am here now...


Fri Jun 20, 2008 6:03 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


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.