The tone generators range is 20-17000Hz according to the programming manual.

You've discovered a quirk that I've been playing with this afternoon, one that I decided was the cleanest way to leave the code.

The way that the numeric entry code works requires starting from 0. If we started from 20, then we wouldn't be able to directly enter any frequency starting with a 1, ie 123, 1234, 12345 Hz... For the same reason, the Cancel button needs to also clear to 0. Because of this, we cannot bound the value on the minimum end, so the code has to test that the value is > 20 when you press the Menu/CD/Knob.

But when we turn the knob left, we don't want to go below zero anyway since it doesn't make *any* sense. So we already have to do one compare operation per click anyway. But since we can't play anything below 20Hz, why go any lower when using the knob?

Turning the knob right is bounded at 17000 by a compare operation. I could have also put a minimum bound in to make it jump to 20Hz here too. But since these compares are happening for every click, I couldn't see any real benefit in doing so. Remember that the value is already sanity checked when we press Menu/CD/Knob...

I suppose I could look at making the value wrap around at each end though...having just re-read your post, I think that's sort what you were trying to suggest?
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.