I have to admit that subject has gone away a bit from my first posting. Btw, i have found what i was looking for on Microchip's froums. Please check the froum posting. *Need perfect delays?* http://forum.microchip.com/tm.aspx?m=135820 And i have succesfully adopted _WAIT_10us routine with HI-TECH PICC compiler. void _WAIT_10usX (unsigned char) { unsigned char micro; #asm movwf __WAIT_10usX$micro goto dec5 NOP goto $+1 goto $+1 goto $+1 dec5 decfsz __WAIT_10usX$micro,F goto $-5 return #endasm } But this only works exactly if i compile the code with optimizations disabled. I will try to port others as soon as possible. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist