How can i measure 0.5 micro second pulse width with pulse in function

Use the capture-compare functionality of the AVR.