0-1-2-3-2-1-0 Counter

Discussion and support for MoTeC Power Distribution Modules

0-1-2-3-2-1-0 Counter

Postby david_wallis on Wed Nov 03, 2021 9:42 pm

Anyone got an example of how to do this? (if even possible?)

(
david_wallis
 
Posts: 3
Joined: Mon Nov 28, 2016 5:06 am

Re: 0-1-2-3-2-1-0 Counter

Postby David Ferguson on Thu Nov 04, 2021 2:15 am

Give us an idea of what you want to do. Count input up/down button presses? Single Keypad button that cycles through that sequence? Counter that updates with time (ie. once per second)?

And what are you going to do with the output of this counter? Switch on outputs, control wiper delays?

What other devices to you have attached to the PDM? (Keypad, MoTeC dash, etc)?
David Ferguson
Veracity Racing Data
Check out Shift RPM - https://shiftrpm.veracitydata.com
David Ferguson
Pro User
 
Posts: 1011
Joined: Fri Nov 07, 2008 1:45 am
Location: Paso Robles, California

Re: 0-1-2-3-2-1-0 Counter

Postby david_wallis on Fri Nov 05, 2021 4:51 pm

It would be for things like ign and lights.

Would have used the counter output to determine mode or output state.
It’s not a need but for example if doing lights on a single keypad button, I’d rather not have side, low, hi, off and rather toggle up and then back down. Attached of relevance is a c125 and a keypad. Was hoping not to have to use a dash to accomplish this.

David
david_wallis
 
Posts: 3
Joined: Mon Nov 28, 2016 5:06 am

Re: 0-1-2-3-2-1-0 Counter

Postby David Ferguson on Sat Nov 06, 2021 2:42 am

As someone that has designed many user interfaces using a very few inputs. I will suggest that you will not like this behavior very much. What happens is that you don't know when you press a button if the value it going to go up or down. If it goes the wrong way (or you want to go the other way), you have to press the button the maximum number of times to get the value you wanted.

A much better solution for multi-value control is to use a pair digital inputs wired to a Single-Pole Double-Throw (SPDT) toggle switch that is of type (Momentary on) - OFF - (Momentary Off). Pushing the switch up would increment the counter, pushing the switch down will decrement the counter. The user always knows whats going to happen, and if they use the wrong button, it's easy to reverse their change.

If you are going to just use a single button, then the "rollover" behavior is usually the best. Button always increments (or decrements), and when it reaches the end it starts back at the beginning.

I like the challenge of what you asked to do, so here is a PDM30 config that uses one button to count 0-1-2-3-2-1-0. I included some other counter samples that I have used as well.
Attachments
Counter Demo PDM30.pdm
(109.72 KiB) Downloaded 47 times
David Ferguson
Veracity Racing Data
Check out Shift RPM - https://shiftrpm.veracitydata.com
David Ferguson
Pro User
 
Posts: 1011
Joined: Fri Nov 07, 2008 1:45 am
Location: Paso Robles, California


Return to PDM15 PDM16 PDM30 and PDM32

Who is online

Users browsing this forum: No registered users and 3 guests