On Fri, 13 Aug 1999 10:53:04 -0600 Harrison Cooper writes: >I have a 16C54 design that I just fed into an input port the secondary >side >of a 6VAC transformer (yes, thru a resistor) so I can get either a 60 >Hz or >50 Hz signal (depending on where in the world it is), and use the TMR0 >and >prescaler to count the pulses to get a 1 second 'interupt', that is >basically a free running clock so I can generate delays and such. > >I've found every now and then, noisy power will cause my counters to >misbehave, so rather than fight that, I'll just add a crystal. I had a similar problem with a noisey power line. A realtime clock circuit (that generated DMX) would work great here in California, but would run fast in New York. After the equipment made a few trips across the country, I added a capacitor to ground so the current limit resistor and the capacitor formed a 60 Hz low pass filter. The system has now been working fine for a couple years. I also used this trick in another project, but then the client wanted a univeral input power supply. So we went with a switching power supply module to get the universal input and used a timer interrupt and counter to simulate the 60 Hz interrupt the code previously used (decrementing a "jiffy" counter until a second has gone by). So... I've had both ways (60 Hz and timer interrupt) work... Harold Harold Harold Hallikainen harold@hallikainen.com Hallikainen & Friends, Inc. See the FCC Rules at http://hallikainen.com/FccRules and comments filed in LPFM proceeding at http://hallikainen.com/lpfm ___________________________________________________________________ Get the Internet just the way you want it. Free software, free e-mail, and free Internet access for a month! Try Juno Web: http://dl.www.juno.com/dynoget/tagj.