> For a 166kHz (square wave osc), I would go for a timer ... > anyone go for a crystal osc. as possibly a better option? > {I am new to the field...please comment!} It comes down to the same thing. The timer will be based on the crystal 166000Hz ($28870) is 6.0241us per cycle. I've tried a few crystals but haven't found a hex or decimal value that is very helpful. It looks like you'll have to aim for an average of 166kHz rather than a constant. A 6.666666MHz would solve your problem Perhaps a 12MHz crystal for a 0.33333us instruction cycle time (18 for 6.000us and 19 for 6.333us). 6.000us = 166.667kHz and 6..333us = 157.895kHz. Work out the ratio of these two to average 166kHz -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu