View Single Post
Old 05-20-2008, 08:51 AM   #101 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 269 Times in 212 Posts
Thanks Yoshi, you da man

Allow me respond for the benefit of the team.

Quote:
Originally Posted by Yoshi View Post
Our microprocessor is 8 bit and it is less powerful than Windows PC Intel chip,
LOL the cpu utilization on the mpguino is low, like 20% and theres plenty of free ram. It only does something interesting once a second when it displays the info. Actually thinking about upping the refresh rate to 1/2 a second. The atmega168 is more powerful than folks give it credit for, and the small interrupts will interrupt whatever is running to keep track of what the vehicle is doing. assembly NOT required

Quote:
Originally Posted by Yoshi View Post
My design is up to a single tank of gasoline distance.
Yup, there is a Trip class in mpguino so adding another arbitrary trip is a few lines of code.

Quote:
Originally Posted by Yoshi View Post
I saw your source.
I'm honored.

Quote:
Originally Posted by Yoshi View Post
It looks there was a bug in the millis() routine and they are going to remove the timer0_overflow_count variable.
You mean the arduino millis() that overflows after 9 hours. I'm aware of the bug, but didn't hear that they were going to remove timer0_overflow_count.
It is still there in arduino 11, but we can adapt if they do remove it. But I'm impressed at what a quick study you have made of the platform

Quote:
Originally Posted by Yoshi View Post
Again, my program is for a sigle tank trip, 99 hours 59 min 59 second max.
I'll have to take your word for it Many folks will appreciate having instant and tank and current and maybe a couple other trips to work with so they can track short and long term segments.

Quote:
Originally Posted by Yoshi View Post
The TACH signal is for my tachometer called SuperMID T-1.
Do you know if some cars do not put out an injector signal porportional to RPM? We were just going to add an injectorpulsesPer2Revolutions variable and do the RPM based on the number of pulses per second, or the microseconds between pulses.

Quote:
Originally Posted by Yoshi View Post
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
Maybe. It depends on the minimum time between events that affect a variable and how big the interrupt handlers are. Also sei and cli are global, might just want to mask the interrupts that share variables while you manipulate them. I will investigate further. I think arduino does it for you for attachInterrupt, which is just our injector signal. Also, I never quite got a handle on what happens if you get an interrupt while in an interrupt, does control return to the first interrupt eventually?

Quote:
Originally Posted by Yoshi View Post
Regards,
Yoshi
Thank you again Yoshi.

__________________
WINDMILLS DO NOT WORK THAT WAY!!!

Last edited by dcb; 05-20-2008 at 08:57 AM..
  Reply With Quote