You could have the pulse counting code check a flag in memory then exit when it is set. The interrupt level code would then set the flag: cblock xxx flags endc interrupt_handler: ... bsf flags,0 pulse_count: bcf flags,0 pulse_count_loop: ... ... btfss flags,0 goto pulse_count_loop goto start_all_over Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! use mailto:listserv@mitvma.mit.edu?body=SET%20PICList%20DIGEST