View Single Post
Old 05-20-2008, 07:50 AM   #100 (permalink)
Yoshi
SuperMID designer
 
Yoshi's Avatar
 
Join Date: Mar 2008
Location: Yokohama, JAPAN
Posts: 37
Thanks: 0
Thanked 13 Times in 2 Posts
Quote:
Originally Posted by dcb View Post
Hi Yoshi!! Glad for the input, Let me just go point by point here with the current state of the mpguino project in case anyone is wondering.
Thank you for the warm message.
Following is my personal opinion and suggestions.
I hope you and team members will have better understanding what I'm saying, but it's up to you whether you adopt my suggestions or not.

Our microprocessor is 8 bit and it is less powerful than Windows PC Intel chip, therefore I tried to program it as simple as possible and as small as calc bits.
Quote:
A mpguino trip will overflow on distance at about 0.5 million miles.
My design is up to a single tank of gasoline distance.
Quote:
That is a nice feature . I was a little intimidated by the timers at first, so avoided the issue completely by:
1. creating a microSeconds(void) function based on the system clock.
2. creating an elapsedMicroSeconds(unsigned long startMicroseconds) function.
At the start of an event, you save a copy of microSeconds(), at the end you call elapsedMicroSeconds(start) to see how long the event was.
I saw your source.
It looks there was a bug in the millis() routine and they are going to remove the timer0_overflow_count variable.
Quote:
We are using a microSecondsPerGallon parameter currently. The data model is good for 1.2 million hours worth of fuel flow.
Again, my program is for a sigle tank trip, 99 hours 59 min 59 second max.
Quote:
P.S. what inspired the tachometer signal on the supermid?
The TACH signal is for my tachometer called SuperMID T-1.

One more note...
When we manipulate the interrupt driven variables, we need cli() and sei() functions to disable/enable interrupts before and after the manipulation.
Please refer to following example.
http://www.arduino.cc/cgi-bin/yabb2/...1201890734/2#2

Regards,
Yoshi
  Reply With Quote