What about "Capture" ?
----------------------------------
What about "Capture" ?
----------------------------------
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Yup that's the much accurate way if the PIC have the CCP module. Case not, Pulsin may work... but accuracy is pretty poor.
So you can still detect the rising edge, start a timer, wait 'till falling edge. You have now the High Pulse measure. From there you reset the Timer and wait the next rising edge. There you have the Low pulse measure.
Few maths later, you have the duty cycle.
http://www.picbasic.co.uk/forum/show...36&postcount=4
also look at this one
http://www.picbasic.co.uk/forum/show...se+measurement
HTH
Last edited by mister_e; - 18th December 2006 at 05:10.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi again and thank your answers ,
Dear mister_e ,
I give to a circuit example in my first message (jaycar kit) use a 16F84A ,
This kit is working good and without any problem .
What is your comment ? or have you another idea ?
I think ,they must use very simple programme !
16F84 not have ccp module .
If you can help me ,thank you
if you can not ,thank you again![]()
regards
Ok, just to prove that the pulsin idea does work.........(within certain parameters anyways, I know it takes a finite amount of time for an injector to open and close and this amount would have to be accounted for in final calculations, and I also know that fuel rail pressure, system voltage, and injector/fuel temperature also have an effect on open/close times. I never said this method would be 100% accurate, but I'm sure the results can be tweaked thru software to get something fairly accurate.)
Do you have working hardware? In other words, do you have an input wire that could be or is connected directly to a PIC input pin? And if you connected an o'scope to that pin/wire, would the resultant signal on the 'scope follow/match the signal on the wire to the injector?
Without working hardware, further discussion would be fruitless...
So if you're just talking in theory, an idea you have...say so now so I (others?) don't use up too much time on this.
@skimask you are right ,
I work on proteus before ,
Now Im just build circuit on breadboard.
And Im take some shoot.
This is "duty cycle meter" working circuit ,I say before ..
Its working good on bench and my car ..
This is duty cycle shema
![]()
Last edited by MaxiBoost; - 27th December 2006 at 20:28.
I'm afraid this does not work; after the first pulsin has taken its reading, since the transition has *already* happenned, the next pulsin of the opposite polarity (level?) will take place only at the next-to-next pulse. Of course, if the duty cycle for a sequence is going to stay somewhat the same then this should make no difference. I was trying to decode an IR signal by using these consecutive pulsins, and got completelty wrong results.
Hi,
I am not sure about the fuel injection stuff. Possibly a variable duty and variable frequency. One option may be to use the portb on change interrupt feature. So for every falling or rising edge you get an interrupt. One problem is that depending on the timer prescaler you may run out of time if the frequency is too low causing a timer overflow. Again that can be accounted with ISR checking for timer overflow and incrementing a pseudo timer high byte counter making the timer a 16bit one.
Regards
Sougata
Hi,Sougata,
you're right ...
But the big problem is injectors are nor open 100% of the cycle !!!
a "100%" aperture equals, say, only 20 or 30 degrees at crankshaft ....
and this value has to be entered somewhere to measure something useful.
now, a simple "PULSIN" is enough to measure the ON duration in µs ... but maximal aperture ( vs. rotation speed ? ) has to be known to calculate a displayable percentage.
add to that needles inertia is not negligible at those timings ... and you'll see your measure is somewhat false !!!
Some data is missing here ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks