Vic Lopez wrote: > 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. .... yes, it is a square wave. Vic: Build a counter that increments on every edge of your input clock. When the counter reaches 163, reset it to 0 and toggle your output. -Andy === Andrew Warren -- aiw@cypress.com === Principal Design Engineer === Cypress Semiconductor Corporation === === Opinions expressed above do not === necessarily represent those of === Cypress Semiconductor Corporation -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu