Trying to give a little back, A timer module
mosquito56
Posts: 387
· My project is going in to an airplane. When you rent an airplane, you pay by the hour. The airplane has a meter in it that keeps track of how long the plane is turned on. Every time you rent a plane you log in the times to keep track of how long you ran the engine. You also use this time for maintainance.
· The company that makes the standard meter is or was·the Hobbs company so they became known as the "Hobbs Meter".
· This is a module that updates a value called hobbsvalue. It updates every second. It also flashes an led on pin 27.
·· Put this in startup area. Make sure to put a "long hobbsvalue" is var section
· Put this anywhere that is convient.
Timerb is attached and commented on how to modify the freq. The timerb function uses the fact that when a counter rolls over the pin will blip high. Counter b sees this blip and updates a counter. Because the counter does not roll over quickly, this module probably only works for seconds and up.
Props out to Mike Green and a few others for the help in putting this together.
Hope someone can use this.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·······
······· "What do you mean, it doesn't have any tubes?"
······· "No such thing as a dumb question" unless it's on the internet
Post Edited (mosquito56) : 3/19/2008 5:09:39 PM GMT
· The company that makes the standard meter is or was·the Hobbs company so they became known as the "Hobbs Meter".
· This is a module that updates a value called hobbsvalue. It updates every second. It also flashes an led on pin 27.
·· Put this in startup area. Make sure to put a "long hobbsvalue" is var section
timerb.go 'start the timer object in another cog.
· Put this anywhere that is convient.
printstr(string("Hobbs")) if timerb.state 'timer sets the state hobbsvalue++ x:=timerb.ack 'ack turns of the state dec(hobbsvalue)
Timerb is attached and commented on how to modify the freq. The timerb function uses the fact that when a counter rolls over the pin will blip high. Counter b sees this blip and updates a counter. Because the counter does not roll over quickly, this module probably only works for seconds and up.
Props out to Mike Green and a few others for the help in putting this together.
Hope someone can use this.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·······
······· "What do you mean, it doesn't have any tubes?"
······· "No such thing as a dumb question" unless it's on the internet
Post Edited (mosquito56) : 3/19/2008 5:09:39 PM GMT
spin
1K
Comments
When I had a boat (before I was married) I had an hour meter on that engine that must have been similar to the one you described in that airplane. I believe it did say "Hobbs" on the face of the meter too.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Brian
uController.com - home of SpinStudio - the modular Development system for the Propeller
PropNIC - Add ethernet ability to your Propeller! PropJoy - Plug in a joystick and play some games!
SD card Adapter - mass storage for the masses Audio/Video adapter add composite video and sound to your Proto Board