> > I have been asked to divide a digital signal by 3. > 3 is an akward number. My first reaction is All good thoughts. I've tried to think of them all already - alas the situation is fairly well constrained. > to step back and take a system > wide view. Why 3? The customer says so :-) It's the input to a console for a piece of "rotating machinery" for a consumer application. The speed is much faster than they are normally used to because the equipment it's being used with is different than usual and the sensor is on a motor pulley running at up to 4000 rpm * - usually it's on a slower moving pulley but in this equipment there is no slower moving wheel. The divide by 3 happens to match a standard setting in the equipment. The processor is mask programmed and produced in zillion quantities. (* spits magnets nicely when you use 5 minute epoxy to fasten them :-) ). > How is the signal being used? Could the rest of the > system be easily modified to not require the divide or deal with a divide by > a power of 2? I asked that. They are still considering if any power of 2 division will strike some other standard ratio but the answer will probably be , "no".: > Is there a programmable part elsewhere in the system that can > compensate? No. As above. Mask programmed. > Are there any other spare gates from the rest of the circuit? If there are > spare inverters, these could be specified to be schmitt trigger and front > end the flip flops. No spare gates. > If not, 2 CMOS inverters and two resistors make a > schmitt trigger. If there are no suitable gates, you can do it with two > transistors and a few resistors. I built a 2 transistor Schmitt trigger to trial the result when using JK flip flops for the divide. Haven't had to do that for a few decades :-) Looked reasonably nice on the scope - didn't pursue it too far. The JK's didn't like it though - better but not clean enough for 100% reliable operation. Probably still not meeting the JK rise/fall time specs. I could have tried to improve the Schmitt and may well have succeeded but the component, board area and loading costs would have been in excess of the 2 diodes plus resistor required by the CD4040 solution. (2 transistors, 3+ resistors, probably a speed up cap by the time I was finished.) The 4040 solution works with hall and reed sensors up to 4600 rpm and as slow as I wished. Would be fun to get down to a true 1 chip solution but I doubt it's going to happen economically. A dual JK with a Schmitt clock would do it - but would proibably be non-standard enough to cost more overall. Some of the programmable/presettable dividers have beckoned but the lack of Schmitt input makes the 4040 solution about as good. All good fun though. Russell McMahon -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads