> The strange thing is that once I turn on a standard DC power supply > unit(using the same AC outlet), the counter goes haywire. The DC power > supply unit is not connected to anything except the incoming mains. I move > the power supply unit to another mains(which is isolated from the > microcontroller) and the problem is solved. Is there anything I can do to > prevent this? This sounds like the DC power supply is putting lots of noise on the AC line, and the noise is confusing the counter. Your counter circuit needs a better power supply that can tolerate noise on the AC line. You should also check the ground connections and bypasses in your DC circuit. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu