Electronic Gurus

Trailbeast,
Arduino for me is cheap hardware, it has the micro and support stuff assembled, for less than I can buy parts. I do not use the Arduino development software. I use CodeVisionAVR and write directly in C. It is a trivial project, in my world someone could ask for it a 10:00 AM, I could get it done and go for early lunch.

Here is how it is done. Start with a tach signal that is conditioned for the input capability of the micro. An internal timer, is set up to trigger on an edge of the tach signal. There is a feature called an interrupt, when the edge happens, the code associated for using the timer gets run. The timer has adjustable clock rates based on a crystal oscillator. The timer is constatly counting up, reaching a maximum, and starts at zero .... It is what is called a free running timer. The time between edges is 1/4 revolution of engine for a V8. The reciprocal of time is frequency, RPM is frequency. The time is measured by taking the present timer count, minus the prior count. Each count is based on the clock rate that was set. So just simple grade school math. Subtraction, division, multiplication, yes the micro does that. With that said, if you are not displaying RPM, put the compare point directly, and just use raw difference of period. No division, or multiplying required by micro.

The next even easier part is the compare, "if (rpm >= SHIFTRPM)" a couple code lines control LEDs in the desired way, or the following "else" controls for normal LED condition. The >= is greater than or equal to.

So excluding the start code that initializes the micro, put there automatically by the compiler, the code written for the indicator is just several lines, at most. There are even setup wizards for timer and pin settings.

There may be a learning curve the first time. It may take a bit, to figure out methods, like how to incorprate features of the micro. That often involves using timers to measure time, output signals, read inputs, measure voltage, or communicate with other devices. Sometimes it takes a few parts, but often much can be done with a few resistors, capacitors, diodes, and transistors. Small part like those cost pennies.

Thanks for the very clear explanation (that helps) :-)

All these cool things we can do with electronics but so little time and brain space left at the end of the day.
I'll still check into it more as time allows.
I assume (hope) there is an online or downloadable list of command lines for that software, right?

Thanks Kit.