Depending on the speed have you looked at something like a 10F pic? Forrest Christian wrote: > I have an application where I need to end up with effectively a 24 bit > divide by-n counter, where n is going to be fixed at design time - > probably on the order of 10 million or so. I also need to do a compare > on the 24 bit value to output a single bit based on the current value of > the divide-by-n counter. > > Seems like an application for a FPGA, or perhaps the correct CPLD (if I > can find one which has enough flip/flops and/or logic)..... but all I > really need are three i/o pins, count, reset, and "comparator output" - > and it seems almost impossble to find a low pin count device which has > enough logic inside to do a 24 bit counter without also having a huge > number of pins. > > About the only thing I've found so far are some of the Atmel ATF family, > which are available in 40 or 44 pin packages, which is a bit big, and > perhaps the Cypress PSoC which might just do the trick. The problem > I'm finding with the CPLD's in particular is that there seems to be some > sort of unwritten rule that the flip-flop must connect directly to the > output pin, and you can't have extra flip-flops floating around not > associated with a pin. As a result, a CPLD which implements a 24 bit > counter, plus an additional output must have at least 25 output pins, > plus 2 input pins. Unfortunately, these seem to be few and far between. > > The FPGA's are just big, and most need config flash as well. > > I really would like to find something which is like a simple 16v8, but > has quite a few extra macrocells which are internal to the part which > are tied into the and array and not dedicated to a pin. That way you > could implement a counter or similar which is much wider than the > device's I/O, and which doesn't require some horrific quantity of pins > simply to get the amount of logic needed. > > So, have I missed any parts? > > -forrest > -- Vapour Forge Jake Anderson Project Manager Mobile: 0412 897 125 Email: jake@vapourforge.com Web Page: www.vapourforge.com Your source for custom IT services -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist