circuit using flipflop
dindreds,
I don't understand your "fraction of the costs". I do not think you are talking about money. The 12F675 is 1.70 or so.
The cost of a discrete logic chip is 0.25 to 0.40. I'll even add 0.15 per chip for the additional PCB space for say 0.55 per chip.
Someone can easily (using a trick or two) implement this with three chips (2 NANDS, 74XX00, and a Dual D flip flop, 74XX74). I'm sure there are some cool implementations with JK flip flops as well. Anyway, a three chip implementation costs 1.65 at the most.
Others may realize that this circuit is fairly simple and the logic is built (but maybe hidden) into other discrete chips. Multiplexers are good ways to implement logic for 1 to 3 variables (and some even have flip flops built into the outputs -- hmm, state machine on a chip?).
Still others may be able to do creative, out of the box, things with counters or shift registers as long has they can handle reset conditions. To make it easier to use these chips, I'd allow someone to use a reset line. The line can be active low or active high, I don't care.
There may be a one chip implementation out there, I know that there are *multiple* two chip implementations. In which case the costs are 1.10 at most. A single chip implementation would cost a third of the microcontroller (and not be much bigger) and perform much faster (if speed is a consideration).
The point here is to have fun trying. I am just looking at the problem more generally, pose the next step to the original question so to speak. Someone may get some benefit out of it (or the results) or atleast enjoy working out a neat simple problem. There are people wasting time on suduko and other puzzles for enjoyment. These types of problems (puzzles) are what I enjoy so I waste my time on them
-jonathan