View Single Post
Old 04-04-2008, 10:35 AM   #3 (permalink)
I"m not lurking!
s2man's Avatar
Join Date: Jan 2008
Location: Kansas City, MO
Posts: 128

Porthos - '96 Chevrolet Cavalier
90 day: 31.3 mpg (US)
Thanks: 0
Thanked 1 Time in 1 Post
Originally Posted by dcb View Post
Three is probably good enough and what I have the dummy signal generator doing above. The other value was the elapsed time according to the freeduino, but in thinking about it we probably don't need it.
I gotcha. We're just using different terms for the same data. Elapsed time is no problem. millis() rolls over about every 9 hours, but I doubt anyone will drive more than 9hrs straight.

Originally Posted by dcb View Post
Can we use the above output format?
Sure we can.

Originally Posted by dcb View Post
Is there a way to just use one timer to figure out when a second has passed?
Yep, [delete, delete, see below]

Originally Posted by dcb View Post
I.e. borrow the code from millis() and see if we can make a micros() function? I can look into that if you like.

My understanding is that external interrupts are handled by specific functions, not necessarily timers.
Ah, yes. Good thought. That would free up a timer, but would be less accurate. +-1ms out of one second is minimal, but +-1ms error out of the injector pulse could be major. That's why I suggested the 16bit timer for the injector pulse width. micros() would be better than millis(), but isn't that why we've got the timers? Perhaps we should use a timer on the injector pulse width, and code the one-second timer and/or the VSS counter. Or, we could the timer/counters now for expediency, and code our own later if we need to free them up. Hmm, lot's of solutions.

Your code sketch lays things out pretty well. I think we should put the Injector pulse width in an array, then average the array before sending it to the Palm. Nevermind. I see you're totaling the microseconds.

I'm working a river clean up this weekend, so I'll be offline. No coding or testing But I'll be camping and boating
Roll on,

  Reply With Quote