Too late. Already written and sent. Drinking my $30 beer right now!
So, two input pins, four output pins, for each of seven digits, and a zero button.That's a hell of a lot of pins you have there, but whatever. Here ya go. . . .
Your project is more complex than you imagine.You specify Up/Down counters without any user feedback (display). This alone is a killer for me.You don't specify error conditions. What happens when the MEGA fails, hangs in reset with all outputs HIGH (1111) which is not a valid BCD character?What is the ESD environment? Is it in a clean room, or an industrial (dirty, wet, Shakey, Hot, Cold) environment? You don't specify initial Conditions, min/max ranges. You don't specify the hardware refresh rate used to read the switches.How many nanoseconds does the Mega have to update its 4pin BCD output?Does the hardware 'read' the switches in any specific order.Are you going to provide hardware for testing?What is the 'DANGER' quotient? Does this device control mechanisms that have the possibility to endanger, injure humans?color me gone.Chuck.
Very good points that are missed by non-professional programmers. Kind of like my view on heart surgery, cut open chest fix heart and close chest. Three steps should not be worth more than say an oil change since the oil change has the same number of steps.
It looks very nice and I'm sure Pat did a great job. It looks like you are testing with only one digit at the moment but that is a good start, especially that it does not interfere with the other digits.Can you post the code in this thread? I'm curious about how the multiplexing is handled in this solution you have.
. . . As for the code, I am really not sure the etiquette on this sort of thing, but it doesn't feel right to "give away" his work, i'm sorry. . . .
I'm sure that everyone will see that is in the spirit of open source and the Creative Commons Attribution Share-Alike license which Arduino operates under. And you did commission it after all, and maybe even paid the $30 so it is yours to do as you like with. Or did you sign a non-disclosure agreement ?
maybe even paid the $30 so it is yours to do as you like with. Or did you sign a non-disclosure agreement ?
1) If someone has offered $30 for a functioning program for this application, accept the offer quickly before they change their mind. My intention was only to help you get started, not to deliver a working solution.
I like the trick incrementing the button values. Very neat.If I understood the circuit diagram correctly, only one set of 4 pins Arduino pins is required to load the data bus, irrespective of the number of swiches. The cathodes of the 7 segment displays and the corresponding commons of the rotary switches are pulled low in sequence. During the LOW for a particular display/switch combination, the Arduino must load the values corresponding to the switch (which it replaces) on the data bus.