$ 0 0 Take a look at the PULSIN statement, maybe that's enough for what you want to do with it. http://avrhelp.mcselec.com/pulsein.htm