I am assuming that you are implementing this in hardware inside the FPGA: Set up a seven bit down counter that reloads when it reaches zero count. Have zero count on the seven bit counter also toggle a D flip flop which is your final output. The reload value of the seven bit counter has to flip back and forth between 81 and 82 on each cycle. This will result in a total of (81+1)+(82+1) = 163 cycles input for each cycle on the D flip flop. 81 in binary: 1010001 82 in binary: 1010010 So, simply hardwire the high five reload bits as 10100. Wire the lsbit to the Q output of the flip flop and the 2nd lsbit to the not Q output of the flip flot. Bob Ammerman RAm Systems ----- Original Message ----- From: "Vic Lopez" To: Sent: Friday, November 22, 2002 5:21 PM Subject: Re: [OT]:Need to divide Frequency by 163. > I guess I could. It won't sample the incoming data right in the middle, > but little offset probably won't mess things up. -Vic > > -----Original Message----- > From: Barry Gershenfeld > To: PICLIST@MITVMA.MIT.EDU > Date: Fri, 22 Nov 2002 14:13:25 -0800 > Subject: Re: [OT]:Need to divide Frequency by 163. > > > >Hello, > > > I am in need to divide a 12.5 Mhz clock by 163. How can this be > > >done with a counter? I know that if this division were a power of > > two, > > >then it would be very straight forward, but this is not my case at > > all. > > >Any pointers will be greatly appreciated. -Vic > > > > If only it were an even number this would be straightforward. But > > you had to pick 163. Otherwise you divide by 2 at the end and > > the result is square. I don't suppose you could fudge it to > > 162 or 164... > > > > Barry > > > > -- > > http://www.piclist.com hint: To leave the PICList > > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > > > > > > > ********************************* > Get your free E-Mail and Homepage > Go to http://www.networld.com > ********************************* > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu