Wiring Forum
http://wiring.org.co/cgi-bin/yabb/YaBB.pl
Wiring Hardware >> Tangible computing >> Ability to toggle a pin quickly
http://wiring.org.co/cgi-bin/yabb/YaBB.pl?num=1201628008

Message started by larryjoe701 on 01/29/08 at 17:33:26

Title: Ability to toggle a pin quickly
Post by larryjoe701 on 01/29/08 at 17:33:26
I'm using Parallax's Inkjet kit
http://www.parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/txtSearch/inkjet/List/1/ProductID/59/Default.aspx?SortField=ProductName%2cProductName with the Wiring board.  The inkjet head calls for some fairly precise timing (40 microJoules of energy must be delivered to activate an inkjet nozzle.)  At 21v it works out to 6microseconds that I need to toggle a pin on the Wiring board, or 4.5microseconds at 24v.  I don't have an oscilliscope with which to test the timings and I imagine that simply calling writeDigital(), delayMicros(), writeDigital() will introduce some inaccuracy due to functioncall overhead.

Does anyone know of a way to precisely toggle a pin?  Or have you tested precise timings and can you provide me with some information about how much overhead there is due to those calls?

Thanks
/me

Title: Re: Ability to toggle a pin quickly
Post by larryjoe701 on 01/29/08 at 20:05:55
I continued searching and found the pulseOut() function, which appears capable of doing what I need, except that I need to control twelve pins instead of just one.  I'm looking to connect each of the twelve lines of the inkjet control board to pins on my Wiring board for the fastest and simplest control.

I guess my real question is are the function calls fast enough and the pin manipulations fast enough to naively code a 6 microsecond delay and have it be quite close to 6 microseconds?

Wiring Forum » Powered by YaBB 2.5 AE!
YaBB Forum Software © 2000-2010. All Rights Reserved.