Hi,
I'm not sure which is what here but I see only one WORD variable (Leader) being declared. If you expect PULSIN to return a value >255 then make sure to give it a WORD variable to store that result in.

/Henrik.