Am 06.11.2010 19:33, schrieb Kirk Wallace: > > Thanks Ulf. This is what I have so far: > http://www.wallacecompany.com/machine_shop/EMC2/AVR/strobe-1a.jpg > http://www.wallacecompany.com/machine_shop/EMC2/AVR/ServoPStart.comp
Hi Kirk Try this, the other one is worse. This looks cleaner, compiles and is tested. halcmd loadrt ServoPStart halcmd addf ServoPStart.0.doreset servo-thread halcmd addf ServoPStart.0.docount base-thread component ServoPStart "This component is part of a parport interface to an AVR ATtiny2313.(2010/11/05 kwall...@wallacecompany.com)"; pin out bit ServoStart "This is the output which goes high for one period at the input toggle."; pin out bit strobe "foobar"; pin out unsigned PCount=0 ""; //variable unsigned PCount=0; // Holds the number of periods since the toggle. function dostrobe nofp; function doreset nofp; license "GPL"; ;; FUNCTION(doreset) { PCount=0; } FUNCTION(dostrobe) { strobe=0; ServoStart=0; if (PCount==0) ServoStart=1; if (PCount==3) strobe=1; PCount++; } ------------------------------------------------------------------------------ The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users