This may be a little off course of the basic conversation but, I use a LOT of quadrature optical encoders (incremental type) in motion control applications. So far I have been purchasing off the shelf, proprietary motion controllers however, I would like to be able to use the PIC for the controller and have it read the encoder which at most would be around 25 kHz in frequency. I am using the PicBasic Pro compiler and am just starting to learn assembly code for the PIC. I think the compiled code will run fast enough. But, has anyone actually written code in the PicBasic language to read a quadrature encoder reliably, and if so, could you post it on the list for me to take a look. Also, I would like to be able to use the PIC as a PLC. Is it possible to do both in a single PIC or would one need to use separate PICs for each application. Any help will be greatly appreciated. I am sure you can tell I am fairly new to the PIC scene. Regards, Randy Abernathy 4626 Old Stilesboro Road NW Acworth, GA 30101 Phone / Fax: 770-974-5295 E-mail: cnc002@aol.com We specialize in service, installation and repair of industrial woodworking machinery -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.