On Tue, 2010-02-23 at 20:49 -0500, Ormund Williams wrote: > On Tue, 2010-02-23 at 16:06 -0800, Kirk Wallace wrote: > > Would anyone have code for an Attiny2313 that can check for an EMC2 > > watchdog? Or thoughts on what a program might look like? Maybe run a > > pair of counters that trigger on the up and down edge of the watchdog, > > count an internal clock source, then compare to high and low count > > limits? > > If you expand on that description I could knock something together. > What signal from EMC2 are we looking at? What's the highest frequency? > > Regards. > > __ > Ormund
I think the watchdog comes from the charge pump component: http://www.linuxcnc.org/docview/html//man/man9/charge_pump.9.html and toggles the output every thread period. If I put it in my servo period ( SERVO_PERIOD = 1000000 (nanosec)), the line will toggle every 1ms, or a frequency of 500 Hz(?). If it takes more than 2ms, plus some padding time, for the next rising edge to come, then there is a fault. If I knew what I was doing this should be pretty easy. Just set up a counter to set an interrupt at a certain count. The interrupt would set an output pin low. With enough time I could probably figure it out, along with typing out War and Peace. I suppose other features could be done on one of these micro's. Most everything I can think of, can be done with EMC2, but the micro could save on cabling. -- Kirk Wallace http://www.wallacecompany.com/machine_shop/ http://www.wallacecompany.com/E45/index.html California, USA ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users