??? 02/13/06 00:57 Read: times |
#109818 - The smartest thing ... Responding to: ???'s previous message |
It seems that the smartest thing one could do in this case is to select the slowest input clock frequency that will still allow everything to function. Someone has already touched on that in passing, but it will serve a number of useful purposes, not the least of which is saving power, since this looks as though it should be a battery-operated application.
If he's using a "character" LCD, which, IIRC, has a typical update execution time of not less than 40 microseconds, I'd say any sort of clock as fast as, or faster than that might be adequate, since it will still take a number of clock ticks to time out the minimal switch debounce interval. While I agree that many speed chess players can make more than a move or even two in a second, including the button press, it's unlikely that such a pace will proceed for long. For the sort of thing that's being built here, it's probably important to have considerable tactile feedback, and possibly even a noise-maker of some sort to provide a click when a button is pushed. Perhaps that can waste some more time, and it will be useful to ensure that that the button-push has been recognized. If it's possible, it should, indeed, waste as much of the total time wasted in a power-down mode, to maximize battery utilization. Unfortunately, the LCD, if it's of the HITACH 44780-based type, will consume more power than the MCU. A pair of real 7-segment clock displays, with separate segment inputs for each digit would probably yield longer battery life. All that's needed for them is a routine to complement the backplane and digit potential each time the debounce timer overflows. These displays often use too many pins to be practical on a DIP-40 part, but if you use pairs of 2-digit displays, the same 14 segments can be used to drive four of them with only four back plane-drive pins required to make them work if the multiplexing is properly timed. LCD's do respond rather slowly, so that should all be transparent to the casual observer. There is one condition that's been overlooked, I believe. Occasionally, and certainly at the end of a game, it's desirable to stop, but not clear, both clocks. If, for some reason, the game board has to be abandoned, time needs to be halted for both players, and, at the end of a game, it is sometimes of interest to compare the amount of time used by each competitor. With mechanical clocks, pressing both buttons simultaneously accomplishes this. Maybe that capability needs to be provided as well. RE |